openai.rb 0.0.6 → 0.0.7
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/Gemfile.lock +1 -1
- data/lib/openai/api/response.rb +13 -0
- 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: 23e9a409c6e868480483be60137e752b4d81a136ea97a60f590706f3065a0215
|
|
4
|
+
data.tar.gz: 1a9d471c94cb570a162a01018ea4562e7fd3568d13f22e74ac039ac038bd3a06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52568892f512b722bcc2dca470dc157fe7574c82d8430fccad8bdbdbeca930e83202cd3c9f2ed5a749c803ae41d32cf25a1f122d0baa61e6f6800e60c6b1e2db
|
|
7
|
+
data.tar.gz: 373da7bc94a9c3e531c722da6adbbf3ead6e9513081ff00e9abf31e0c295519773a67ed9974cb192ab3b82db20b695563457f65f2e894bee5205ebd9c4a326f2
|
data/Gemfile.lock
CHANGED
data/lib/openai/api/response.rb
CHANGED
|
@@ -143,8 +143,21 @@ class OpenAI
|
|
|
143
143
|
class ChatCompletion < Response
|
|
144
144
|
class Choice < Response
|
|
145
145
|
class Message < Response
|
|
146
|
+
class FunctionCall < Response
|
|
147
|
+
include Memoizable
|
|
148
|
+
|
|
149
|
+
field :name
|
|
150
|
+
field :arguments
|
|
151
|
+
|
|
152
|
+
def parsed_arguments
|
|
153
|
+
JSON.parse(arguments, symbolize_names: true)
|
|
154
|
+
end
|
|
155
|
+
memoize :parsed_arguments
|
|
156
|
+
end
|
|
157
|
+
|
|
146
158
|
field :role
|
|
147
159
|
field :content
|
|
160
|
+
field :function_call, wrapper: FunctionCall
|
|
148
161
|
end
|
|
149
162
|
|
|
150
163
|
field :index
|
data/lib/openai/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: openai.rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2023-10-
|
|
12
|
+
date: 2023-10-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: abstract_type
|