Skip to content

Commit

Permalink
Merge pull request #470 from alexrudall/7.0.1
Browse files Browse the repository at this point in the history
7.0.1
  • Loading branch information
alexrudall authored Apr 29, 2024
2 parents 9ff065c + a589ea6 commit 5bd35bb
Show file tree
Hide file tree
Showing 78 changed files with 6,408 additions and 190 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.0.1] - 2024-04-30

### Fixed

- Update to v2 of Assistants in Messages, Runs, RunSteps and Threads - thanks to [@willywg](https://github.com/willywg) and others for pointing this out.

## [7.0.0] - 2024-04-27

### Added
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ruby-openai (7.0.0)
ruby-openai (7.0.1)
event_stream_parser (>= 0.3.0, < 2.0.0)
faraday (>= 1)
faraday-multipart (>= 1)
Expand Down
4 changes: 3 additions & 1 deletion lib/openai/assistants.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module OpenAI
class Assistants
BETA_VERSION = "v2".freeze

def initialize(client:)
@client = client.beta(assistants: "v2")
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
end

def list
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/batches.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module OpenAI
class Batches
def initialize(client:)
@client = client.beta(assistants: "v1")
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
end

def list
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/messages.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module OpenAI
class Messages
def initialize(client:)
@client = client.beta(assistants: "v1")
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
end

def list(thread_id:, parameters: {})
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/run_steps.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module OpenAI
class RunSteps
def initialize(client:)
@client = client.beta(assistants: "v1")
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
end

def list(thread_id:, run_id:, parameters: {})
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/runs.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module OpenAI
class Runs
def initialize(client:)
@client = client.beta(assistants: "v1")
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
end

def list(thread_id:, parameters: {})
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/threads.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module OpenAI
class Threads
def initialize(client:)
@client = client.beta(assistants: "v1")
@client = client.beta(assistants: OpenAI::Assistants::BETA_VERSION)
end

def retrieve(id:)
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module OpenAI
VERSION = "7.0.0".freeze
VERSION = "7.0.1".freeze
end
62 changes: 62 additions & 0 deletions spec/fixtures/cassettes/batches_cancel.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions spec/fixtures/cassettes/batches_cancel_input.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 86 additions & 0 deletions spec/fixtures/cassettes/batches_cancel_setup.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5bd35bb

Please sign in to comment.