monadic-chat 0.4.2 → 0.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 840f1afe3ac1bac2709058c004e0181bc35dce391ac2774575cc7da3de5a31af
4
- data.tar.gz: a7d82295925a59e375c878e90832457e38a3b675e4ee6e952dd641b9053cf972
3
+ metadata.gz: a90d35d2c3a7fef4bbfff6df8d91ea464e461a45628f54edd841337572027ba3
4
+ data.tar.gz: 2427c0d1a25284eba43f2b246e5b26a00c3269faabe08183987d34d7ffb6e666
5
5
  SHA512:
6
- metadata.gz: 2577863d5326aa6b442906d71fbd0e1478300657597362e4c0bac1e42f8e5fc46ccf9b88ec515df53d96b4b21e7efd43cfa5884daf5ce65713324b0803e8a893
7
- data.tar.gz: 3b3c673acf3c2c46147dfaf95fd80c5c6a7fd88eaec22ef913816bf3da114f49af9c54bda36e31beff5149ac0ed280812ae42711232661397a2f3f6cb4c4c5c7
6
+ metadata.gz: 5960484908ca30dd0129951fdb405f06b37c2714ba319bd8a4bc7dd13e79105e415cf2b9670b0f135fa47f53e615d71d4c1c83ada2f900cf5ee85539545c54b2
7
+ data.tar.gz: a82640ea7156b27a43f3091f69db9ce0f3c4ac0d948414b220ba123e4ef14b307ed870ea14b36104da52aaea609da4d5e598485b781ff9c85d5e9740a9805e1b
data/CHANGELOG.md CHANGED
@@ -56,3 +56,11 @@
56
56
 
57
57
  - Issue of redundant token addition addressed
58
58
  - Default model changed to `gpt-3.5-turbo-0125`
59
+
60
+ ## [0.4.3] - 2024-5-13
61
+
62
+ - `gpt-4o` set as default model for both `normal` and `research` modes
63
+
64
+ ## [0.4.4] - 2024-7-18
65
+
66
+ - `gpt-4o-mini` set as default model for `normal` mode
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- monadic-chat (0.4.2)
4
+ monadic-chat (0.4.4)
5
5
  blingfire
6
6
  http
7
7
  kramdown
@@ -20,16 +20,18 @@ PATH
20
20
  GEM
21
21
  remote: https://rubygems.org/
22
22
  specs:
23
- addressable (2.8.6)
24
- public_suffix (>= 2.0.2, < 6.0)
23
+ addressable (2.8.7)
24
+ public_suffix (>= 2.0.2, < 7.0)
25
25
  base64 (0.2.0)
26
- bigdecimal (3.1.6)
26
+ bigdecimal (3.1.8)
27
27
  blingfire (0.2.1)
28
+ childprocess (5.0.0)
28
29
  diff-lcs (1.5.1)
29
30
  domain_name (0.6.20240107)
30
- ffi (1.16.3)
31
- ffi-compiler (1.0.1)
32
- ffi (>= 1.0.0)
31
+ ffi (1.17.0)
32
+ ffi (1.17.0-x86_64-darwin)
33
+ ffi-compiler (1.3.2)
34
+ ffi (>= 1.15.5)
33
35
  rake
34
36
  http (5.2.0)
35
37
  addressable (~> 2.8)
@@ -37,42 +39,45 @@ GEM
37
39
  http-cookie (~> 1.0)
38
40
  http-form_data (~> 2.2)
39
41
  llhttp-ffi (~> 0.5.0)
40
- http-cookie (1.0.5)
42
+ http-cookie (1.0.6)
41
43
  domain_name (~> 0.5)
42
44
  http-form_data (2.3.0)
43
45
  kramdown (2.4.0)
44
46
  rexml
45
- launchy (2.5.2)
47
+ launchy (3.0.1)
46
48
  addressable (~> 2.8)
49
+ childprocess (~> 5.0)
47
50
  llhttp-ffi (0.5.0)
48
51
  ffi-compiler (~> 1.0)
49
52
  rake (~> 13.0)
50
- oj (3.16.3)
53
+ oj (3.16.4)
51
54
  bigdecimal (>= 3.0)
52
55
  pastel (0.8.0)
53
56
  tty-color (~> 0.5)
54
- public_suffix (5.0.4)
55
- rake (13.1.0)
56
- rexml (3.2.6)
57
- rouge (4.2.0)
57
+ public_suffix (6.0.0)
58
+ rake (13.2.1)
59
+ rexml (3.3.2)
60
+ strscan
61
+ rouge (4.3.0)
58
62
  rspec (3.13.0)
59
63
  rspec-core (~> 3.13.0)
60
64
  rspec-expectations (~> 3.13.0)
61
65
  rspec-mocks (~> 3.13.0)
62
66
  rspec-core (3.13.0)
63
67
  rspec-support (~> 3.13.0)
64
- rspec-expectations (3.13.0)
68
+ rspec-expectations (3.13.1)
65
69
  diff-lcs (>= 1.2.0, < 2.0)
66
70
  rspec-support (~> 3.13.0)
67
- rspec-mocks (3.13.0)
71
+ rspec-mocks (3.13.1)
68
72
  diff-lcs (>= 1.2.0, < 2.0)
69
73
  rspec-support (~> 3.13.0)
70
- rspec-support (3.13.0)
74
+ rspec-support (3.13.1)
71
75
  strings (0.2.1)
72
76
  strings-ansi (~> 0.2)
73
77
  unicode-display_width (>= 1.5, < 3.0)
74
78
  unicode_utils (~> 1.4)
75
79
  strings-ansi (0.2.0)
80
+ strscan (3.1.0)
76
81
  tty-box (0.7.0)
77
82
  pastel (~> 0.8)
78
83
  strings (~> 0.2.0)
data/README.md CHANGED
@@ -27,6 +27,8 @@
27
27
 
28
28
  **Change Log**
29
29
 
30
+ - [July 19, 2024] `gpt-4o-mini` set as the default model for `normal` mode
31
+ - [May 13, 2024] `gpt-4o` set as the default model for both `normal` and `research` modes
30
32
  - [February 9, 2024] Minor update; default model changed to `gpt-3.5-turbo-0125`
31
33
  - [November 10, 2023] Stability improvement; default model changed to `gpt-3.5-turbo`
32
34
  - [October 07, 2023] Stability improvement; default model changed to `gpt-3.5-turbo-0613`
@@ -305,13 +307,13 @@ Monadic Chat has two modes. The `normal` mode utilizes OpenAI's chat API to achi
305
307
 
306
308
  ### Normal Mode
307
309
 
308
- The current default language model for `normal` mode is `gpt-3.5-turbo-0125`.
310
+ The current default language model for `normal` mode is `gpt-4o-mini`.
309
311
 
310
312
  In the default configuration, the dialogue messages are reduced after ten turns by deleting the oldest ones (but not the messages that the `system` role has given as instructions).
311
313
 
312
314
  ### Research Mode
313
315
 
314
- The current default language model for `research` mode is `gpt-4-turbo-preview`.
316
+ The current default language model for `research` mode is `gpt-4o`.
315
317
 
316
318
  In `research` mode, the conversation between the user and the large-scale language model is accomplished with a mechanism that tracks the conversation history in a monadic structure. In the default configuration, the dialogue messages are reduced after ten turns by deleting the oldest ones (but not the messages that the `system` role has given as instructions).
317
319
 
@@ -16,9 +16,9 @@ RETRY_WAIT_TIME_SEC = 1
16
16
  module OpenAI
17
17
  def self.default_model(research_mode: false)
18
18
  if research_mode
19
- "gpt-4-turbo-preview"
20
- else
21
- "gpt-4"
19
+ "gpt-4o"
20
+ else # normal mode
21
+ "gpt-4o-mini"
22
22
  end
23
23
  end
24
24
 
@@ -28,6 +28,10 @@ module OpenAI
28
28
  "gpt-3.5-turbo-1106" => "chat/completions",
29
29
  "gpt-3.5-turbo" => "chat/completions",
30
30
  "gpt-3.5-turbo-16k" => "chat/completions",
31
+ "gpt-4o-mini-2024-07-18" => "chat/completions",
32
+ "gpt-4o-mini" => "chat/completions",
33
+ "gpt-4o" => "chat/completions",
34
+ "gpt-4o-2024-05-13" => "chat/completions",
31
35
  "gpt-4-0125-preview" => "chat/completions",
32
36
  "gpt-4-turbo-preview" => "chat/completions",
33
37
  "gpt-4-1106-preview" => "chat/completions",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MonadicChat
4
- VERSION = "0.4.2"
4
+ VERSION = "0.4.4"
5
5
  end
data/lib/monadic_chat.rb CHANGED
@@ -27,9 +27,9 @@ Oj.mimic_JSON
27
27
 
28
28
  module MonadicChat
29
29
  SETTINGS = {
30
- "normal_model" => "gpt-3.5-turbo-0125",
31
- "research_model" => "gpt-4-turbo-preview",
32
- "max_tokens_wiki" => 1000,
30
+ "normal_model" => "gpt-4o-mini",
31
+ "research_model" => "gpt-4o",
32
+ "max_tokens_wiki" => 1600,
33
33
  "num_retrials" => 2,
34
34
  "min_query_size" => 5,
35
35
  "timeout_sec" => 120
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monadic-chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - yohasebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-09 00:00:00.000000000 Z
11
+ date: 2024-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -346,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
346
346
  - !ruby/object:Gem::Version
347
347
  version: '0'
348
348
  requirements: []
349
- rubygems_version: 3.4.12
349
+ rubygems_version: 3.5.10
350
350
  signing_key:
351
351
  specification_version: 4
352
352
  summary: Highly configurable CLI client app for OpenAI chat/text-completion API