openai-term 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/openai +5 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ceff9ceafa5d50d99036675fc0d85415da18a56e80bb0d6c0b408d4c6ca5325
|
4
|
+
data.tar.gz: d3b401c41cbb07d81d00877e4425c69c4630c5ccecd3f82be4e1082cb50ee408
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c2796bf28a6de76dc9bde4db90772a1a360fa68c86c64b46c09fbe398177457574db59b4b0641fbee2ae9298734cf6d97e0ed8cb42c0a79eac84a1d452915ae
|
7
|
+
data.tar.gz: 3c95325c3e3d4103fb2bcfe2b4390cc491e4b603c7398059a5eacca5eb8e8ea243cbd56cb2644c7a432e2dda2e0a5d6de9c237d7ff674c2652263a2cbeab8343
|
data/bin/openai
CHANGED
@@ -60,7 +60,11 @@ end
|
|
60
60
|
# REQUEST RESPONSE
|
61
61
|
client = OpenAI::Client.new(access_token: @ai)
|
62
62
|
|
63
|
-
|
63
|
+
begin
|
64
|
+
response = client.completions( parameters: { model: @m, prompt: @q, max_tokens: @x })
|
65
|
+
rescue => error
|
66
|
+
p error
|
67
|
+
end
|
64
68
|
|
65
69
|
#PRINT RESPONSE
|
66
70
|
begin
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openai-term
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
@@ -38,10 +38,11 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.23'
|
41
|
-
description: This is a pretty straight forward interface to OpenAI with the option
|
41
|
+
description: 'This is a pretty straight forward interface to OpenAI with the option
|
42
42
|
to select the AI model and the maximum token length (number of maximum words in
|
43
|
-
the AI's response). You will use the -t option to supply the query to OpenAI or
|
44
|
-
the -f option to read the query from a text file instead.
|
43
|
+
the AI''s response). You will use the -t option to supply the query to OpenAI or
|
44
|
+
the -f option to read the query from a text file instead. New in 0.1.3: Rescue error
|
45
|
+
on OpenAI connection.'
|
45
46
|
email: g@isene.com
|
46
47
|
executables:
|
47
48
|
- openai
|