chatgpt-rb 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/chatgpt-rb +7 -1
- data/lib/chatgpt_rb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9c3a20f294a53407477460d0bcf1efc53524a4986cf1129c365f597a93766adc
|
|
4
|
+
data.tar.gz: 75999a3494afb6b8726a1510c6e16ec29e8dc55015212175befef7f5fac3a766
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5a4aaa0890191fdd4c4b5221c49a3ce094e4d69f0ffd699207fa8987515fb4e12dd6ffcb349cd2015205e99ee65660b57c72f7c8c05e6a471703d557f50dbcaa
|
|
7
|
+
data.tar.gz: 409b9eb640141bdd46ebbaf8b131c43b8f72d6e1e3b4da75c0f729ff9cf5bba1cb2b87a2536ddcf4fc906f6008f360a8694a5029ba57f43d55263f08783e10c6
|
data/bin/chatgpt-rb
CHANGED
|
@@ -11,6 +11,7 @@ options = {
|
|
|
11
11
|
model: "gpt-3.5-turbo",
|
|
12
12
|
base_uri: "https://api.openai.com/v1",
|
|
13
13
|
functions_files: [],
|
|
14
|
+
temperature: 0.7,
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
OptionParser.new do |opts|
|
|
@@ -39,6 +40,10 @@ OptionParser.new do |opts|
|
|
|
39
40
|
opts.on("-p", "--prompt PROMPT", "Declare the PROMPT for your conversation") do |prompt|
|
|
40
41
|
options[:prompt] = prompt
|
|
41
42
|
end
|
|
43
|
+
|
|
44
|
+
opts.on("-t", "--temperature TEMPERATURE", "Set the temperature for the conversation") do |temperature|
|
|
45
|
+
options[:temperature] = temperature.to_f
|
|
46
|
+
end
|
|
42
47
|
end.parse!
|
|
43
48
|
|
|
44
49
|
begin
|
|
@@ -61,10 +66,11 @@ begin
|
|
|
61
66
|
end
|
|
62
67
|
|
|
63
68
|
if options[:prompt]
|
|
69
|
+
options[:prompt] = File.exist?(options[:prompt]) ? File.read(options[:prompt]) : options[:prompt]
|
|
64
70
|
puts "prompt> ".colorize(:blue) + options[:prompt]
|
|
65
71
|
end
|
|
66
72
|
|
|
67
|
-
conversation = ChatgptRb::Conversation.new(api_key: options.fetch(:key), model: options.fetch(:model), base_uri: options.fetch(:base_uri), messages:, functions:, prompt: options[:prompt])
|
|
73
|
+
conversation = ChatgptRb::Conversation.new(api_key: options.fetch(:key), model: options.fetch(:model), base_uri: options.fetch(:base_uri), messages:, functions:, prompt: options[:prompt], temperature: options.fetch(:temperature))
|
|
68
74
|
|
|
69
75
|
commands = [
|
|
70
76
|
{
|
data/lib/chatgpt_rb/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chatgpt-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Breckenridge
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|