monadic-chat 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b894910f03beb26737b61d52bbe8dccde3afe592ca7366f32d7fd23a04ab5f01
4
- data.tar.gz: bc1c6f2f7f6623081fa163a3b8ad285afe67179f4b140d303e46482fcf15faea
3
+ metadata.gz: 3e2cd88bc8efbeb6fcc338449160fd6d100c42b44fa8d178816023fac853926c
4
+ data.tar.gz: e8ebe92f6b1ba1a4d583ce1d58469bcac453b0633ca5303a0f98cab53bc679ee
5
5
  SHA512:
6
- metadata.gz: 8c725e1764e683da1adbe8131ea70b67c66babeba8ab51a09d29ba056728120c61aa874510b7f5a599938770f86d136a063c538165ec6edcc9a5847c47af22d3
7
- data.tar.gz: 127ad0699ea96e9adf647dfb52564d9ecfc4a32749883bf1e8df6c9b97a125df88b1469270254405bbdecfd63b160c035746990d374972c171a867edcf12174f
6
+ metadata.gz: 401e24445a672a6fd451a80a225235d36cd520186918bc34dc9b7c86d9753e1ea0dddab5ecec319c7f1bca99c52024c95052264715715ab7bf54b3c36c9426ac
7
+ data.tar.gz: cb9e6c76f4086e72f58fbcec7e3c28b5106053c64659e3f7fe6997ceec44e6dfc7f8f07ef5dd5f092580822e84987389f75294f27704815cd48d70cbba87aefb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- monadic-chat (0.3.4)
4
+ monadic-chat (0.3.5)
5
5
  blingfire
6
6
  http
7
7
  kramdown
@@ -20,7 +20,7 @@ PATH
20
20
  GEM
21
21
  remote: https://rubygems.org/
22
22
  specs:
23
- addressable (2.8.2)
23
+ addressable (2.8.4)
24
24
  public_suffix (>= 2.0.2, < 6.0)
25
25
  blingfire (0.1.8)
26
26
  diff-lcs (1.5.0)
@@ -45,7 +45,7 @@ GEM
45
45
  llhttp-ffi (0.4.0)
46
46
  ffi-compiler (~> 1.0)
47
47
  rake (~> 13.0)
48
- oj (3.14.2)
48
+ oj (3.14.3)
49
49
  pastel (0.8.0)
50
50
  tty-color (~> 0.5)
51
51
  public_suffix (5.0.1)
@@ -106,6 +106,7 @@ GEM
106
106
  wisper (2.0.1)
107
107
 
108
108
  PLATFORMS
109
+ ruby
109
110
  x86_64-darwin-22
110
111
 
111
112
  DEPENDENCIES
data/README.md CHANGED
@@ -1,7 +1,20 @@
1
- <p align="center"><img src="./doc/img/monadic-chat.svg" width="500px"/></p>
1
+ <p>&nbsp;</p>
2
+
3
+ <p align="center"><img src="./doc/img/monadic-chat.png" width="500px"/></p>
2
4
 
3
5
  <p align="center"><b>Highly configurable CLI client app for OpenAI chat/text-completion API</b></p>
4
6
 
7
+ <p>&nbsp;</p>
8
+
9
+ > **Note**
10
+ >
11
+ > **Monadic Chat** is currently being actively developed as a web browser application. The command-line version has been renamed to **Monadic Chat CLI**. New features will mainly be implemented in the web application version. At present, both versions have many common features, but please note that the format of the exported data files and the specifications for creating custom applications are different from each other.
12
+
13
+ - Monadic Chat: [https://github.com/yohasebe/monadic-chat](https://github.com/yohasebe/monadic-chat) (active)
14
+ - Monadic Chat CLI: [https://github.com/yohasebe/monadic-chat-cli](https://github.com/yohasebe/monadic-chat-cli) (this repo; less active)
15
+
16
+ <p>&nbsp;</p>
17
+
5
18
  <p align="center">
6
19
  <kbd><img src="https://user-images.githubusercontent.com/18207/224493072-9720b341-c70d-43b9-b996-ba7e9a7a6806.gif" width="100%" /></kbd>
7
20
  </p>
@@ -10,11 +23,11 @@
10
23
  <kbd><img src="https://user-images.githubusercontent.com/18207/225505520-53e6f2c4-84a8-4128-a005-3fe980ec2449.gif" width="100%" /></kbd>
11
24
  </p>
12
25
 
13
- > **Note**
14
- > This software is *work in progress* and *under active development*. It may be unstable, and the latest version may behave slightly differently than this document. Also, specifications may change in the future.
26
+ <p>&nbsp;</p>
15
27
 
16
28
  **Change Log**
17
29
 
30
+ - [June 11, 2023] The repository renamed to `monadic-chat-cli`
18
31
  - [April 05, 2023] `Wikipedia` app added (experimental, requires GPT-4)
19
32
  - [April 05, 2023] `monadic-chat new/del app_name` command
20
33
  - [April 02, 2023] Architecture refined here and there
Binary file
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <svg version="1.1" id="レイヤー_1" x="0px" y="0px" viewBox="0 0 1527.6 225" style="enable-background:new 0 0 1527.6 271.6;" xmlns="http://www.w3.org/2000/svg">
2
+ <svg version="1.1" id="レイヤー_1" x="0px" y="0px" style="enable-background:new 0 0 1527.6 271.6;" width="1000px" height="110px" viewBox="0 0 2048 225" xmlns="http://www.w3.org/2000/svg">
3
3
  <style type="text/css">
4
4
  .st0{fill:#333333;}
5
5
  .st1{font-family:'Arial-BoldMT';}
@@ -7,7 +7,7 @@
7
7
  .st3{fill:#EB742B;}
8
8
  .st4{fill:#999999;}
9
9
  </style>
10
- <text transform="matrix(1 0 0 1 0 188.7405)" class="st0 st1 st2" style="white-space: pre;">Monadic</text>
11
- <text transform="matrix(1 0 0 1 1038.769 188.7401)" class="st3 st1 st2" style="white-space: pre;">Chat</text>
12
- <text transform="matrix(1 0 0 1 892.245 188.7401)" class="st4 st1 st2" style="white-space: pre;">::</text>
10
+ <text class="st0 st1 st2" style="white-space: pre; font-size: 220px;" x="19" y="188.74">Monadic </text>
11
+ <text class="st3 st1 st2" style="white-space: pre;"><tspan x="1058.77" y="188.74"> Chat </tspan><tspan style="fill: rgb(153, 153, 153);">CLI</tspan></text>
12
+ <text class="st4 st1 st2" style="font-size: 240px; white-space: pre;" x="942.245" y="188.74">::</text>
13
13
  </svg>
@@ -83,7 +83,9 @@ module MonadicChat
83
83
  File.open(CONFIG, "w") do |f|
84
84
  SETTINGS["access_token"] = access_token
85
85
  f.write(JSON.pretty_generate(SETTINGS))
86
- print "New access token has been saved to #{CONFIG}\n" if message
86
+ print "New access token has been saved to #{CONFIG}\n\n" if message
87
+ print "Please #{PASTEL.bold.green("restart")} Monadic Chat\n"
88
+ exit
87
89
  end
88
90
  end
89
91
  elsif File.exist?(CONFIG)
@@ -107,7 +109,9 @@ module MonadicChat
107
109
  SETTINGS["access_token"] = access_token
108
110
  f.write(JSON.pretty_generate(SETTINGS))
109
111
  end
110
- print "Access token has been saved to #{CONFIG}\n" if message
112
+ print "Access token has been saved to #{CONFIG}\n\n" if message
113
+ print "Please #{PASTEL.bold.green("restart")} Monadic Chat\n"
114
+ exit
111
115
  end
112
116
  end
113
117
  completion || authenticate(overwrite: true)
@@ -22,11 +22,13 @@ module OpenAI
22
22
  {
23
23
  "text-davinci-003" => "completions",
24
24
  "gpt-4" => "chat/completions",
25
- "gpt-4-0314" => "chat/completions",
25
+ "gpt-4-0613" => "chat/completions",
26
26
  "gpt-4-32K" => "chat/completions",
27
- "gpt-4-32k-0314" => "chat/completions",
27
+ "gpt-4-32k-0613" => "chat/completions",
28
28
  "gpt-3.5-turbo" => "chat/completions",
29
- "gpt-3.5-turbo-0301" => "chat/completions"
29
+ "gpt-3.5-turbo-0613" => "chat/completions",
30
+ "gpt-3.5-turbo-16k" => "chat/completions",
31
+ "gpt-3.5-turbo-16k-0613" => "chat/completions"
30
32
  }[model]
31
33
  end
32
34
 
@@ -85,7 +85,7 @@ class MonadicApp
85
85
  menu.choice "#{BULLET} #{m["id"]}", m["id"]
86
86
  end
87
87
  when :normal
88
- models.filter { |m| OpenAI.model_to_method(m["id"]) == "chat/completions" }.sort_by { |m| -m["created"] }.each do |m|
88
+ models.filter { |m| OpenAI.model_to_method(m["id"]) == "chat/completions" && OpenAI.model_to_method(m["id"]) }.sort_by { |m| -m["created"] }.each do |m|
89
89
  menu.choice "#{BULLET} #{m["id"]}", m["id"]
90
90
  end
91
91
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MonadicChat
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
@@ -1,3 +1,3 @@
1
1
  {"messages": [
2
- {"role": "system", "content": "You are a consultant who responds to any questions asked by the user. the current date is {{DATE}}. Answer questions without a Wikipedia search if you are already knowledgeable enough. But if you encounter a question about something you do not know, say \"SEARCH_WIKI(query)\", read the snippets in the result, and then answer the question.\n\nEven if the user's question is in a language other than English, make a Wikipedia query in English and then answer in the user's language. "}
2
+ {"role": "system", "content": "You are a consultant who responds to any questions asked by the user. The current date is {{DATE}}. Answer questions without a Wikipedia search if you are already knowledgeable enough. But if you encounter a question about something you do not know, say \"SEARCH_WIKI(query)\", read the snippets in the result, and then answer the question.\n\nEven if the user's question is in a language other than English, make a Wikipedia query in English and then answer in the user's language. "}
3
3
  ]}
@@ -3,7 +3,7 @@
3
3
  require_relative "../../lib/monadic_app"
4
4
 
5
5
  class Wikipedia < MonadicApp
6
- DESC = "Sarches Wikipedia for you (experimental, requires GPT-4)"
6
+ DESC = "Searches Wikipedia for you (experimental, requires GPT-4)"
7
7
  COLOR = "white"
8
8
 
9
9
  attr_accessor :template, :config, :params, :completion
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.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - yohasebe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2023-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -290,6 +290,7 @@ files:
290
290
  - doc/img/how-research-mode-works.svg
291
291
  - doc/img/input-acess-token.png
292
292
  - doc/img/linguistic-html.png
293
+ - doc/img/monadic-chat.png
293
294
  - doc/img/monadic-chat.svg
294
295
  - doc/img/readme-example-beatles-html.png
295
296
  - doc/img/readme-example-beatles.png
@@ -345,7 +346,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
346
  - !ruby/object:Gem::Version
346
347
  version: '0'
347
348
  requirements: []
348
- rubygems_version: 3.4.9
349
+ rubygems_version: 3.4.12
349
350
  signing_key:
350
351
  specification_version: 4
351
352
  summary: Highly configurable CLI client app for OpenAI chat/text-completion API