openai-term 1.0.0 → 1.1.0

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 +6 -7
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cc2ef0acdef82bc39ba989179889cbeda29564a8e2d01b23f39ce1e502f43929
4
- data.tar.gz: 95691aa7a8fe4a5c20973d2421fd82e0f64de72b81aa1af6eddb189e2d2a89b6
3
+ metadata.gz: 530ec219ffa111a4c438093a26773103d987fb6d856e97332fa8b868b82e9d8e
4
+ data.tar.gz: 577408b5babe6504ef2e12dc96c214163c34fd70e619ce0b7bdc7d5ec92daa95
5
5
  SHA512:
6
- metadata.gz: 4d297e98de6a0b0f124dccd1d9f0db9a71c80d271a1dc3dc7eb336ef82539be668cb878e9cf91736d6083f6cefeb89141e5bc34d118708fa6abe998c1272c9f4
7
- data.tar.gz: 4e5366d42797d2d6cba8357a0b1fbf067d469b3579d457675f2b99ce3590ee7b914f77885a5225562047cc7b996cb0363f108030f4a5a61c782fcaa4f3e97580
6
+ metadata.gz: c02abaa82d7ebb2013dd05965c2f6700849dfcb921847b12bf5a483380eb7d5487069a319ee18d9932b920d04dbe1874b7f3b89753c922f73680f53d9e1fe8d0
7
+ data.tar.gz: 0ef0c53ea3542fa61dd235773658c12f3f9f27d2792b085d380e6de9ecc732cc1365b6c1f490c67df904ea87383b3ab2a93fa4398af55837e6c5ddc8a4f95e59
data/bin/openai CHANGED
@@ -44,13 +44,12 @@ else
44
44
  end
45
45
 
46
46
  # PROCESS QUERY
47
- if @f
48
- @q = File.read(@f)
49
- elsif @t
50
- @q = @t
51
- else
52
- puts "You must supply a query in form of a text file (option -f file) or text (option -t text)\n\n"
53
- exit
47
+ @q = ""
48
+ @q += @t if @t
49
+ @q += File.read(@f) if @f
50
+ unless @f or @t
51
+ puts "You must supply a query in form of a text file (option -f file) and/or text (option -t text)\n\n"
52
+ exit
54
53
  end
55
54
 
56
55
  # REQUEST AND PRINT RESPONSE
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.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -41,9 +41,9 @@ 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.0.0: Added the
45
- functionality to create images via the -i option (in conjunction with either the
46
- -t or the -f option).'
44
+ the -f option to read the query from a text file instead. New in 1.1.0: Added the
45
+ opportunity to supply both a text (-t) and a text file (-f) as a query (you can
46
+ combine the two to e.g. ask openai to describe the content of a file).'
47
47
  email: g@isene.com
48
48
  executables:
49
49
  - openai