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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72e52493a36fa127172247c0db2f53153cdbb9ff1f3025d007fe9638e9298a77
4
- data.tar.gz: 011f3c8fd9b2704f57a65bd406d7ea62efcfe17637c90a95ce3db97c02cfc3a5
3
+ metadata.gz: 6ee67a9b3d968722ffe2901e657fb79d3b07f0b3e67f0fd61e4b07735c1c5743
4
+ data.tar.gz: 878ef00970a2fbcbdafd07976771b8c37115e5a2d4bf25741858e2608783a58d
5
5
  SHA512:
6
- metadata.gz: 7a3dcb467a183d8d7c73b0a3cdc1026e26e07f84957044c4dd7d2ba586fefb68af85aacf092f460005f99191e2ec609b545bf987cec3511538423e4fdcbad768
7
- data.tar.gz: b71e17545c81c4399bcb485e750f6222d8ca43c1744452e7477aadb988f8eec4dfbfb9aa4b28308d930153f336a77dd4b916add2c4c454c4c78da399cd658848
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)
@@ -1,3 +1,3 @@
1
1
  module OpenAI
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.3.0".freeze
3
3
  end
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.2.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: 2020-09-17 00:00:00.000000000 Z
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.1.2
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