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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/openai +5 -1
  3. metadata +5 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6662b3d556ef03f4e07a6f5f853f5f62949af51ab1fb38603162ef51714503c0
4
- data.tar.gz: 64ac5a5907cb5e4df0fdfbf20919419612656017498308f25dabb32a31cef58a
3
+ metadata.gz: 9ceff9ceafa5d50d99036675fc0d85415da18a56e80bb0d6c0b408d4c6ca5325
4
+ data.tar.gz: d3b401c41cbb07d81d00877e4425c69c4630c5ccecd3f82be4e1082cb50ee408
5
5
  SHA512:
6
- metadata.gz: caa12a0dc09e98f85b2794973c54d822c3e27891f4bfec5f5903a42a892d0580f9105cffc13bf777dd3247ceb090cf026f0da7e457258b8f2de95bfd98872623
7
- data.tar.gz: 8f6eafc50d25b642e4a9fac1dc7f2f5531372838818ff23c61c5eefe995c70d99b0a6217400107a77945a04aa9fe3129984dae61553c66239a057385f1438d46
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
- response = client.completions( parameters: { model: @m, prompt: @q, max_tokens: @x })
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.2
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