openai-term 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/openai +3 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7807f8bc3c8150a78ad1bd08c3995c63f5767c7c403332184eb53657e234395c
|
4
|
+
data.tar.gz: 9a410c45e8f255e723bc7ed9022eb019d612f0caf4faf6eeafc4b8a8df696e93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 511193fd306c068eced18f852b27fff11b7b92507074f8d28857bdaa86f5183e68170c3a61e1fe8fafc1daa9a64ba3c0ac961aa35619f8475314f92231f2fe01
|
7
|
+
data.tar.gz: bb7be835e14c8dc9084b82edc58b72b48ca19442be7d85182cc3be2c0d26a3538e6fa9277b02ad005d796bfb94e78696b504cd2aa6b06f9b76224762c0218e36
|
data/bin/openai
CHANGED
@@ -64,8 +64,9 @@ begin
|
|
64
64
|
response = client.completions( parameters: { model: @m, prompt: @q, max_tokens: @x })
|
65
65
|
begin
|
66
66
|
output = response["choices"][0]["text"]
|
67
|
-
rescue
|
68
|
-
|
67
|
+
rescue => error
|
68
|
+
p error
|
69
|
+
output = response["error"]["message"]
|
69
70
|
end
|
70
71
|
puts output.strip + "\n\n"
|
71
72
|
end
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
@@ -41,9 +41,8 @@ dependencies:
|
|
41
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
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 1.1.
|
45
|
-
|
46
|
-
combine the two to e.g. ask openai to describe the content of a file).'
|
44
|
+
the -f option to read the query from a text file instead. New in 1.1.1: Better
|
45
|
+
error handling.'
|
47
46
|
email: g@isene.com
|
48
47
|
executables:
|
49
48
|
- openai
|