ruby-openai 4.3.0 → 4.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 666cf605fbc981b59131ef5005ec32fd0eabd604f924d907ae0ee0d707b739bb
4
- data.tar.gz: fe938931bad97952bd8829ab1ec336896c12ed247c18bc62f3df116917919498
3
+ metadata.gz: 53106fa1f3731bc10d9ab14609fe6db5eb1f439d100acdba6ddbc43b76abb015
4
+ data.tar.gz: be123d1eccd0035d8b5c4cbd390f4392d66461230a5ec0ebbb0a0d1c3b0b0e8a
5
5
  SHA512:
6
- metadata.gz: 2799064a7bbfc79dc47ea4168b0a7755e53aad89e3f3d55a79defba569592141aca70bdfd86747d1690b4ab72acf0d542844d6dd7f1fc8e235c6e3bf7f911854
7
- data.tar.gz: d81441ee5b5a1b4070c438ae02f363b95f133d571971c9876bd1cc239225cbd193955c4ce23efbba0c45af6d2726d06bd6d27b418a2a682edcf9de5c1c701b7f
6
+ metadata.gz: e5d6b68594c5ef30595f7921456795a3f05c0aac613126ea50612459a88c3dee15e91f30d07bb9bc2ce8bf6effda80969d4b9f90ed4927349a9b77d90659f550
7
+ data.tar.gz: 3e96a3800503abd981999a5751b142c31566f8c34eb2e624d2858e165abc949413987b6046d6942a7f3fc7695af0dca1e70b874f08258a8e593def845daebed8
data/CHANGELOG.md CHANGED
@@ -5,7 +5,13 @@ 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
- ## [4.3.0] - 2023-06-20
8
+ ## [4.3.1] - 2023-08-13
9
+
10
+ ### Fixed
11
+
12
+ - Tempfiles can now be sent to the API as well as Files, eg for Whisper. Thanks to [@codergeek121](https://github.com/codergeek121) for the fix!
13
+
14
+ ## [4.3.0] - 2023-08-12
9
15
 
10
16
  ### Added
11
17
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-openai (4.3.0)
4
+ ruby-openai (4.3.1)
5
5
  faraday (>= 1)
6
6
  faraday-multipart (>= 1)
7
7
 
data/README.md CHANGED
@@ -79,8 +79,8 @@ client = OpenAI::Client.new(
79
79
  request_timeout: 240,
80
80
  extra_headers: {
81
81
  "X-Proxy-TTL" => "43200", # For https://github.com/6/openai-caching-proxy-worker#specifying-a-cache-ttl
82
- "X-Proxy-Refresh": "true" # For https://github.com/6/openai-caching-proxy-worker#refreshing-the-cache
83
- "Helicone-Auth": "Bearer HELICONE_API_KEY", # For https://docs.helicone.ai/getting-started/integration-method/openai-proxy
82
+ "X-Proxy-Refresh": "true", # For https://github.com/6/openai-caching-proxy-worker#refreshing-the-cache
83
+ "Helicone-Auth": "Bearer HELICONE_API_KEY" # For https://docs.helicone.ai/getting-started/integration-method/openai-proxy
84
84
  }
85
85
  )
86
86
  ```
@@ -95,8 +95,8 @@ OpenAI.configure do |config|
95
95
  config.request_timeout = 240 # Optional
96
96
  config.extra_headers = {
97
97
  "X-Proxy-TTL" => "43200", # For https://github.com/6/openai-caching-proxy-worker#specifying-a-cache-ttl
98
- "X-Proxy-Refresh": "true" # For https://github.com/6/openai-caching-proxy-worker#refreshing-the-cache
99
- "Helicone-Auth": "Bearer HELICONE_API_KEY", # For https://docs.helicone.ai/getting-started/integration-method/openai-proxy
98
+ "X-Proxy-Refresh": "true", # For https://github.com/6/openai-caching-proxy-worker#refreshing-the-cache
99
+ "Helicone-Auth": "Bearer HELICONE_API_KEY" # For https://docs.helicone.ai/getting-started/integration-method/openai-proxy
100
100
  } # Optional
101
101
  end
102
102
  ```
data/lib/openai/http.rb CHANGED
@@ -97,9 +97,9 @@ module OpenAI
97
97
 
98
98
  def multipart_parameters(parameters)
99
99
  parameters&.transform_values do |value|
100
- next value unless value.is_a?(File)
100
+ next value unless value.respond_to?(:close) # File or IO object.
101
101
 
102
- # Doesn't seem like OpenAI need mime_type yet, so not worth
102
+ # Doesn't seem like OpenAI needs mime_type yet, so not worth
103
103
  # the library to figure this out. Hence the empty string
104
104
  # as the second argument.
105
105
  Faraday::UploadIO.new(value, "", value.path)
@@ -1,3 +1,3 @@
1
1
  module OpenAI
2
- VERSION = "4.3.0".freeze
2
+ VERSION = "4.3.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-12 00:00:00.000000000 Z
11
+ date: 2023-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday