ruby-openai 6.4.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +15 -0
- data/lib/openai/client.rb +4 -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: f3db6f0c15b1015a875950a23ad157cb9f6f4eaed2005c35f75fd97197ee3dd6
|
4
|
+
data.tar.gz: e11f7020b2db2d627646c584feb7dfb2163f3bd8233860e5115ffe0f8d65c681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76100b527ed276b83190df15c1241be39d58288285e93caaeb20ca94c937082e1d19dd99b9ea69e1758352105e749e38940f1f0192b97c50fb18a8e81d321911
|
7
|
+
data.tar.gz: 425db82e5ae928dba3136351b697ac53335ffbce5afb81c98920efda2a0b4c600cf83a8273c8c627ad4b25a352ba76d2e77d88f00a48d4993dcbbc318077be53
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +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
|
+
## [6.5.0] - 2024-03-31
|
9
|
+
|
10
|
+
### Added
|
11
|
+
|
12
|
+
- Add back the deprecated Completions endpoint that I removed a bit prematurely. Thanks, [@mishranant](https://github.com/
|
13
|
+
mishranant) and everyone who requested this.
|
14
|
+
|
8
15
|
## [6.4.0] - 2024-03-27
|
9
16
|
|
10
17
|
### Added
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -399,6 +399,21 @@ end
|
|
399
399
|
# => "The weather is nice 🌞"
|
400
400
|
```
|
401
401
|
|
402
|
+
### Completions
|
403
|
+
|
404
|
+
Hit the OpenAI API for a completion using other GPT-3 models:
|
405
|
+
|
406
|
+
```ruby
|
407
|
+
response = client.completions(
|
408
|
+
parameters: {
|
409
|
+
model: "text-davinci-001",
|
410
|
+
prompt: "Once upon a time",
|
411
|
+
max_tokens: 5
|
412
|
+
})
|
413
|
+
puts response["choices"].map { |c| c["text"] }
|
414
|
+
# => [", there lived a great"]
|
415
|
+
```
|
416
|
+
|
402
417
|
### Edits
|
403
418
|
|
404
419
|
Send a string and some instructions for what to do to the string:
|
data/lib/openai/client.rb
CHANGED
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: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: event_stream_parser
|