Skip to content

Commit 6fb9bd1

Browse files
committed
Add const
1 parent cfaea0e commit 6fb9bd1

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

lib/openai/assistants.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module OpenAI
22
class Assistants
3+
BETA_VERSION = "v2".freeze
4+
35
def initialize(client:)
4-
@client = client.beta(assistants: "v2")
6+
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
57
end
68

79
def list

lib/openai/batches.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module OpenAI
22
class Batches
33
def initialize(client:)
4-
@client = client.beta(assistants: "v2")
4+
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
55
end
66

77
def list

lib/openai/messages.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module OpenAI
22
class Messages
33
def initialize(client:)
4-
@client = client.beta(assistants: "v2")
4+
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
55
end
66

77
def list(thread_id:, parameters: {})

lib/openai/run_steps.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module OpenAI
22
class RunSteps
33
def initialize(client:)
4-
@client = client.beta(assistants: "v2")
4+
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
55
end
66

77
def list(thread_id:, run_id:, parameters: {})

lib/openai/runs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module OpenAI
22
class Runs
33
def initialize(client:)
4-
@client = client.beta(assistants: "v2")
4+
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
55
end
66

77
def list(thread_id:, parameters: {})

lib/openai/threads.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module OpenAI
22
class Threads
33
def initialize(client:)
4-
@client = client.beta(assistants: "v2")
4+
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
55
end
66

77
def retrieve(id:)

0 commit comments

Comments
 (0)