openai 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openai/client.rb +2 -1
- data/lib/openai/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee67a9b3d968722ffe2901e657fb79d3b07f0b3e67f0fd61e4b07735c1c5743
|
4
|
+
data.tar.gz: 878ef00970a2fbcbdafd07976771b8c37115e5a2d4bf25741858e2608783a58d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c598a3ae743d03d52127897c4bce139d8ce57f853b3f9f091438003fde3c78c22c4356ef8c32fce7961da5f3b18df1a610306031922778d53bf802d1157dac62
|
7
|
+
data.tar.gz: 68d607a2a3e618db3e3f9c49b6eaae56efb0496ce63051609c837cde318df4308213cb1b13c8228f3a33643dd4e088ed79ab988c2c6215672096bd2f157c9b0d
|
data/lib/openai/client.rb
CHANGED
@@ -31,7 +31,7 @@ module OpenAI
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
def completions(prompt: nil, max_tokens: nil, temperature: nil, top_p: nil, n: nil, logprobs: nil, echo: nil, stop: nil, presence_penalty: nil, frequency_penalty: nil, engine: default_engine)
|
34
|
+
def completions(prompt: nil, max_tokens: nil, temperature: nil, top_p: nil, n: nil, logprobs: nil, echo: nil, stop: nil, presence_penalty: nil, frequency_penalty: nil, best_of: nil, engine: default_engine)
|
35
35
|
body = {
|
36
36
|
"prompt" => prompt,
|
37
37
|
"max_tokens" => max_tokens,
|
@@ -43,6 +43,7 @@ module OpenAI
|
|
43
43
|
"stop" => stop,
|
44
44
|
"presence_penalty" => presence_penalty,
|
45
45
|
"frequency_penalty" => frequency_penalty,
|
46
|
+
"best_of" => best_of,
|
46
47
|
}.compact
|
47
48
|
|
48
49
|
completion = post("/v1/engines/#{engine}/completions", body: body)
|
data/lib/openai/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nilesh Trivedi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-02-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
|
-
rubygems_version: 3.
|
117
|
+
rubygems_version: 3.2.33
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: OpenAI API client library to access GPT-3 in Ruby
|