gpterm 0.6.3 → 0.6.5

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/client.rb +7 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a21b914e291d4d6a0310355fb6412d746368437335af64bf7e9746ac6016983
4
- data.tar.gz: db7ea2ddae831143d371dfc9ee316f601d757994cb46bf0e5247357d8b73dba6
3
+ metadata.gz: e024b6f050f77e130bee02f5a1e56df3bd510c79cd7dedb84ae26b196ae9d942
4
+ data.tar.gz: dcbd7637acebad7bf14de4722eeb83a9bbb57cf5c52015529b07515e573dac3f
5
5
  SHA512:
6
- metadata.gz: a13a1d835c3a807cee3c35379d60462c13426eaf379487c41129583cdb06631f215d044d1cd9cb89fe0c5112a57fefa9fbbfea2edeb31930d2d6f2cfc0e64591
7
- data.tar.gz: c80160ccddc42a5292c951fa2b7aa8056abff75a2f8bb972dfca2318ac5211b23619dd2b52bacb0e8a9b72ff2033e60f6eb1676bf0cf559bec5e33f069cc387d
6
+ metadata.gz: 74f6fe4934dc5060c52085d2483a74dc98595c3208aa6917b45f2d47883c72c4b47e37670e9750745f7eb252233d636a2442afe0fa70f0b75b1970907b70780b
7
+ data.tar.gz: e1bad1a098380d95e1855ddfd413b2300a9224e6bca5db6aad5f4d8938d7b0356e34e6bd9fc21d7d47544dcbe5c692d67912ac5fff1f801eb239ba0c0c3dffa6
data/lib/client.rb CHANGED
@@ -79,9 +79,15 @@ class Client
79
79
  def continue_conversation(prompt)
80
80
  @messages << { role: "user", content: prompt }
81
81
 
82
+ model = @config["model"]
83
+
84
+ if !model || model.strip.length == 0
85
+ model = "gpt-4-turbo-preview"
86
+ end
87
+
82
88
  response = openai_client.chat(
83
89
  parameters: {
84
- model: @config["model"] || "gpt-4-turbo-preview",
90
+ model: model,
85
91
  messages: @messages,
86
92
  temperature: 0.6,
87
93
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gpterm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Hough
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-18 00:00:00.000000000 Z
11
+ date: 2024-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-openai