ruby-openai 7.3.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81b77c3ad0c06f3dc20d9902e136e8f5cde83ab6073fd421d3cf8ba0fb84d7b1
4
- data.tar.gz: e61927396de52b29f7de6fdaf4271715afaff51ef3c27f3bf9316673af31ad48
3
+ metadata.gz: db56b0b2e16d752cb827fcc80f47d6880187d4f3140c29d3519f9527539dcc29
4
+ data.tar.gz: dff6c57719e2cf0ae912b9815d58c9cb08c46ff3b1e7e71bf1c4952de605bbad
5
5
  SHA512:
6
- metadata.gz: 4f7849cb0907df734b1f37fe5eac6c7353ce06dcf2ed31571e45548944d848ca87b7b1ab4916dc021216ed96c17b4d415d749981620bc65c1efc575aff084ab3
7
- data.tar.gz: eaf47c514add119c4b1ee3f6efedc965f239f5fe57ef9232f834de62834364249ecd02beb86126ddc38c2a0757239c54f02c5a6839b9544214cec09ce0723690
6
+ metadata.gz: 6a2035500d97c58f4637ccfdc40cd09edb9545a77242ee4b02a6f53fb83b4c2dd616e2e8069265439067ab8f52d54c5316e42cf067b9096820ff67672914ce17
7
+ data.tar.gz: 1ba769f55b5ca75b48aadf906e4b75618e090681d4410f0e60da6d470d432901197106538912e17b24762587f956c8b5770c7e338083878d672596736bc5b891
data/.circleci/config.yml CHANGED
@@ -38,9 +38,9 @@ workflows:
38
38
  matrix:
39
39
  parameters:
40
40
  ruby-image:
41
- - cimg/ruby:2.6-node
42
41
  - cimg/ruby:2.7-node
43
42
  - cimg/ruby:3.0-node
44
43
  - cimg/ruby:3.1-node
45
44
  - cimg/ruby:3.2-node
46
45
  - cimg/ruby:3.3-node
46
+ - cimg/ruby:3.4-node
data/.gitignore CHANGED
@@ -65,5 +65,8 @@ build-iPhoneSimulator/
65
65
  .vscode
66
66
  .vs/
67
67
 
68
+ # Just to make it quicker to test README examples that use /path/to as an example eg. when testing file upload.
69
+ /path/to/*
70
+
68
71
  # Mac
69
72
  .DS_Store
data/CHANGELOG.md CHANGED
@@ -5,6 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [8.0.0] - 2025-03-14
9
+
10
+ ### Added
11
+
12
+ - Add Responses endpoints - thanks to my excellent colleague [@simonx1](https://github.com/simonx1) for your work on this!
13
+ - Add docs for the Deepseek chat API.
14
+ - Add Models#delete - thanks to [bennysghost](https://github.com/bennysghost).
15
+
16
+ ### Fixed
17
+
18
+ - [BREAKING] Try to JSON parse everything. If it fails, fall back gracefully to returning the raw response. Thank you to [@gregszero](https://github.com/gregszero) and the many others who raised this issue.
19
+ - [BREAKING] An unknown file type will no longer prevent file upload, but instead raise a warning.
20
+ - [BREAKING] ruby-openai longer requires "faraday/multipart" for Faraday 1 users (Faraday 1 already includes it and it was causing a warning). Thanks to [ajGingrich](https://github.com/ajGingrich) for raising this!
21
+ - Add `user_data` and `evals` as options for known File types - thank you to [jontec](https://github.com/jontec) for this fix!
22
+ - Fix a syntax ambiguity in Client.rb - thank you to [viralpraxis](https://github.com/viralpraxis).
23
+
24
+ ### Removed
25
+
26
+ - [BREAKING] Backwards compatibility for `require "ruby/openai"` is removed - from v8 on you MUST use `require "openai"`. This fixes a deprecation warning with Ruby 3.4. Thanks to [@ndemianc](https://github.com/ndemianc) for this PR.
27
+ - [BREAKING] Removed support for Ruby 2.6. ruby-openai may still work with this version but it's no longer supported.
28
+ - Removed the 'OpenAI-Beta' header from Batches API requests.
29
+
30
+ ## [7.4.0] - 2025-02-10
31
+
32
+ ### Added
33
+
34
+ - Add support for OPENAI_ADMIN_TOKEN to allow for administrative endpoints to be called.
35
+ - Add support for Usage endpoints.
36
+
8
37
  ## [7.3.1] - 2024-10-15
9
38
 
10
39
  ### Fixed
data/Gemfile CHANGED
@@ -3,10 +3,11 @@ source "https://rubygems.org"
3
3
  # Include gem dependencies from ruby-openai.gemspec
4
4
  gemspec
5
5
 
6
+ # Development dependencies. Not included in the publised gem.
6
7
  gem "byebug", "~> 11.1.3"
7
- gem "dotenv", "~> 2.8.1"
8
- gem "rake", "~> 13.2"
8
+ gem "dotenv", "~> 2.8.1" # >= v3 will require removing support for Ruby 2.7 from CI.
9
+ gem "rake", "~> 13.2.1"
9
10
  gem "rspec", "~> 3.13"
10
- gem "rubocop", "~> 1.50.2"
11
- gem "vcr", "~> 6.1.0"
12
- gem "webmock", "~> 3.23.1"
11
+ gem "rubocop", "~> 1.74.0"
12
+ gem "vcr", "~> 6.3.1"
13
+ gem "webmock", "~> 3.25.1"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-openai (7.3.1)
4
+ ruby-openai (8.0.0)
5
5
  event_stream_parser (>= 0.3.0, < 2.0.0)
6
6
  faraday (>= 1)
7
7
  faraday-multipart (>= 1)
@@ -9,11 +9,11 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.8.6)
13
- public_suffix (>= 2.0.2, < 6.0)
12
+ addressable (2.8.7)
13
+ public_suffix (>= 2.0.2, < 7.0)
14
14
  ast (2.4.2)
15
15
  base64 (0.2.0)
16
- bigdecimal (3.1.8)
16
+ bigdecimal (3.1.9)
17
17
  byebug (11.1.3)
18
18
  crack (1.0.0)
19
19
  bigdecimal
@@ -28,18 +28,21 @@ GEM
28
28
  faraday-multipart (1.0.4)
29
29
  multipart-post (~> 2)
30
30
  faraday-net_http (3.0.2)
31
- hashdiff (1.1.0)
32
- json (2.6.3)
31
+ hashdiff (1.1.2)
32
+ json (2.10.2)
33
+ language_server-protocol (3.17.0.4)
34
+ lint_roller (1.1.0)
33
35
  multipart-post (2.3.0)
34
- parallel (1.22.1)
35
- parser (3.2.2.0)
36
+ parallel (1.26.3)
37
+ parser (3.3.7.1)
36
38
  ast (~> 2.4.1)
37
- public_suffix (5.0.5)
39
+ racc
40
+ public_suffix (6.0.1)
41
+ racc (1.8.1)
38
42
  rainbow (3.1.1)
39
43
  rake (13.2.1)
40
- regexp_parser (2.8.0)
41
- rexml (3.3.6)
42
- strscan
44
+ regexp_parser (2.10.0)
45
+ rexml (3.3.9)
43
46
  rspec (3.13.0)
44
47
  rspec-core (~> 3.13.0)
45
48
  rspec-expectations (~> 3.13.0)
@@ -53,24 +56,27 @@ GEM
53
56
  diff-lcs (>= 1.2.0, < 2.0)
54
57
  rspec-support (~> 3.13.0)
55
58
  rspec-support (3.13.1)
56
- rubocop (1.50.2)
59
+ rubocop (1.74.0)
57
60
  json (~> 2.3)
61
+ language_server-protocol (~> 3.17.0.2)
62
+ lint_roller (~> 1.1.0)
58
63
  parallel (~> 1.10)
59
- parser (>= 3.2.0.0)
64
+ parser (>= 3.3.0.2)
60
65
  rainbow (>= 2.2.2, < 4.0)
61
- regexp_parser (>= 1.8, < 3.0)
62
- rexml (>= 3.2.5, < 4.0)
63
- rubocop-ast (>= 1.28.0, < 2.0)
66
+ regexp_parser (>= 2.9.3, < 3.0)
67
+ rubocop-ast (>= 1.38.0, < 2.0)
64
68
  ruby-progressbar (~> 1.7)
65
- unicode-display_width (>= 2.4.0, < 3.0)
66
- rubocop-ast (1.28.0)
67
- parser (>= 3.2.1.0)
69
+ unicode-display_width (>= 2.4.0, < 4.0)
70
+ rubocop-ast (1.38.1)
71
+ parser (>= 3.3.1.0)
68
72
  ruby-progressbar (1.13.0)
69
73
  ruby2_keywords (0.0.5)
70
- strscan (3.1.0)
71
- unicode-display_width (2.4.2)
72
- vcr (6.1.0)
73
- webmock (3.23.1)
74
+ unicode-display_width (3.1.4)
75
+ unicode-emoji (~> 4.0, >= 4.0.4)
76
+ unicode-emoji (4.0.4)
77
+ vcr (6.3.1)
78
+ base64
79
+ webmock (3.25.1)
74
80
  addressable (>= 2.8.0)
75
81
  crack (>= 0.3.2)
76
82
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -81,12 +87,12 @@ PLATFORMS
81
87
  DEPENDENCIES
82
88
  byebug (~> 11.1.3)
83
89
  dotenv (~> 2.8.1)
84
- rake (~> 13.2)
90
+ rake (~> 13.2.1)
85
91
  rspec (~> 3.13)
86
- rubocop (~> 1.50.2)
92
+ rubocop (~> 1.74.0)
87
93
  ruby-openai!
88
- vcr (~> 6.1.0)
89
- webmock (~> 3.23.1)
94
+ vcr (~> 6.3.1)
95
+ webmock (~> 3.25.1)
90
96
 
91
97
  BUNDLED WITH
92
98
  2.4.5