llm-shell 0.7.0 → 0.7.1

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: 89ffe0d7aacb89de310acc7012fb8b383d9c27e0059536ff9ce7ea855f604c37
4
- data.tar.gz: eb1cd003da504a27f6859898c21339406536a4979cf0fea6f1d6740bb2ea9328
3
+ metadata.gz: 1b4d556b621ab4ce91e5c3c14f50ffa906e0158b10f7cbf619eab797dc3b53ee
4
+ data.tar.gz: 0f3dbaa8ebed80f9bb4f22559deddc34960ac3682b4c3e2712efb304c9f8be0e
5
5
  SHA512:
6
- metadata.gz: aa30fcd97acd567fa2c53d7c5936063e0442a3b9e8a2a4a2d721557dd704af57710f4e3d6389c0da9d9e2bf9babacb2e74f51f800f239c65a18d8da4d429f9c2
7
- data.tar.gz: '0900fcbd3c39c95c3941494f93863b8a11f78a69305c4d8dce31c3a87a2391f4940b97743c3f6812e3acb185be40d85f2a3003a5d75de19cc7f94153773f380c'
6
+ metadata.gz: da51e7bc421daaaf972ac3e4439100517d31810461dd9d7851895e95704537365fedac0aaad39d1a2a1b788fecd0eec3d7a49040e9f8a90e90b809e8e4416e57
7
+ data.tar.gz: 73bfabf14dee823e4bd6792210f29a4efc03a915591c853d7862d76f32f0f5fdc307c999321aef913a1977a4a56df19c6b299555dc287c6de9e51a515c4bd4b8
data/README.md CHANGED
@@ -160,6 +160,8 @@ Usage: llm-shell [OPTIONS]
160
160
  -o, --port [PORT] Optional. Sometimes required by ollama.
161
161
  -f, --files [GLOB] Optional. Glob pattern(s) separated by a comma.
162
162
  -t, --tools [TOOLS] Optional. One or more tool names to load automatically.
163
+ -r, --prompt [PROMPT] Optional. The prompt to use.
164
+ -v, --version Optional. Print the version and exit
163
165
  ```
164
166
 
165
167
  ## Install
@@ -16,7 +16,7 @@ class LLM::Shell::Command
16
16
  ##
17
17
  # Emits the system prompt to standard output
18
18
  # @return [void]
19
- def call = puts render(bot.messages.to_a[0])
19
+ def call = puts render(bot.messages[0])
20
20
 
21
21
  private
22
22
 
@@ -49,6 +49,8 @@ class LLM::Shell
49
49
  "\n\n", coderay(code, lang),
50
50
  "\n", Paint["<<< #{lang}", :blue, :bold]].join
51
51
  end
52
+ when :smart_quote
53
+ smart_quotes[node.value]
52
54
  when :text
53
55
  node.value
54
56
  else
@@ -56,13 +58,6 @@ class LLM::Shell
56
58
  end
57
59
  end
58
60
 
59
- def levels
60
- {
61
- 1 => :green, 2 => :blue, 3 => :green,
62
- 4 => :yellow, 5 => :red, 6 => :purple
63
- }
64
- end
65
-
66
61
  def preprocessor(text)
67
62
  text
68
63
  .gsub(/([^\n])\n(#+ )/, "\\1\n\n\\2")
@@ -77,5 +72,19 @@ class LLM::Shell
77
72
  lang = "text"
78
73
  retry
79
74
  end
75
+
76
+ def levels
77
+ {
78
+ 1 => :green, 2 => :blue, 3 => :green,
79
+ 4 => :yellow, 5 => :red, 6 => :purple
80
+ }
81
+ end
82
+
83
+ def smart_quotes
84
+ {
85
+ :lsquo => "'", :rsquo => "'",
86
+ :ldquo => '"', :rdquo => '"'
87
+ }
88
+ end
80
89
  end
81
90
  end
@@ -4,5 +4,5 @@ module LLM
4
4
  end unless defined?(LLM)
5
5
 
6
6
  class LLM::Shell
7
- VERSION = "0.7.0"
7
+ VERSION = "0.7.1"
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llm-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antar Azri
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.9'
19
+ version: '0.10'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.9'
26
+ version: '0.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: paint
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
260
260
  - !ruby/object:Gem::Version
261
261
  version: '0'
262
262
  requirements: []
263
- rubygems_version: 3.6.8
263
+ rubygems_version: 3.7.1
264
264
  specification_version: 4
265
265
  summary: llm-shell is an extensible, developer-oriented command-line console that
266
266
  can interact with multiple Large Language Models (LLMs).