ruby-openai 4.3.0 → 4.3.1
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 +4 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile.lock +1 -1
- data/README.md +4 -4
- data/lib/openai/http.rb +2 -2
- data/lib/openai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53106fa1f3731bc10d9ab14609fe6db5eb1f439d100acdba6ddbc43b76abb015
|
|
4
|
+
data.tar.gz: be123d1eccd0035d8b5c4cbd390f4392d66461230a5ec0ebbb0a0d1c3b0b0e8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
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"
|
|
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"
|
|
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.
|
|
100
|
+
next value unless value.respond_to?(:close) # File or IO object.
|
|
101
101
|
|
|
102
|
-
# Doesn't seem like OpenAI
|
|
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)
|
data/lib/openai/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2023-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|