ollama_chat 0.0.92 → 0.0.93
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/CHANGES.md +22 -0
- data/Rakefile +1 -1
- data/lib/ollama_chat/commands.rb +3 -3
- data/lib/ollama_chat/favourites_management.rb +2 -2
- data/lib/ollama_chat/input_content.rb +1 -1
- data/lib/ollama_chat/model_handling.rb +2 -2
- data/lib/ollama_chat/personae_management.rb +10 -10
- data/lib/ollama_chat/prompt_management.rb +7 -7
- data/lib/ollama_chat/session_management.rb +1 -1
- data/lib/ollama_chat/system_prompt_management.rb +7 -7
- data/lib/ollama_chat/tool_calling.rb +2 -2
- data/lib/ollama_chat/version.rb +1 -1
- data/ollama_chat.gemspec +3 -3
- data/spec/ollama_chat/input_content_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62fe4c92342045e9f11d60bd00e7772b8fee264c5c6736e967ce9fc8f09307c5
|
|
4
|
+
data.tar.gz: 07761b8ba1abdb1af75a9611e1191d9456e986d2af36304e7bf3b3c3a1840c58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88cf61861b63250453b049b33fc3d0db341f73512be7a7f12d054259f9f530d7752850141a2a89d9050199cf78b4e4b531bf01f5cc072e53a790efbdf0d187cf
|
|
7
|
+
data.tar.gz: ad0a856f65ce7696bf2479ef544e3e7ceac757087e4b139152a8c3d13f5ece9b44ee503fa689005976cdc0f12a76ea2d3cf6aa43dbfd3a9e39f5830ec18f0d07
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-06-21 v0.0.93
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Integrated search feedback into interactive chooser prompts across several modules:
|
|
8
|
+
- `lib/ollama_chat/commands.rb` (added `%s` format specifier)
|
|
9
|
+
- `lib/ollama_chat/favourites_management.rb`
|
|
10
|
+
- `lib/ollama_chat/input_content.rb` (file import selector)
|
|
11
|
+
- `lib/ollama_chat/model_handling.rb` (model and profile selection)
|
|
12
|
+
- `lib/ollama_chat/personae_management.rb`
|
|
13
|
+
- `lib/ollama_chat/prompt_management.rb` (template selectors)
|
|
14
|
+
- `lib/ollama_chat/system_prompt_management.rb`
|
|
15
|
+
- `lib/ollama_chat/tool_calling.rb` (tool capability selection)
|
|
16
|
+
- `lib/ollama_chat/session_management.rb` (chat session selector)
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Updated `ollama-ruby` dependency to **1.22.0** in the `Rakefile` and
|
|
21
|
+
`ollama_chat.gemspec`.
|
|
22
|
+
- Synchronized expectations in `spec/ollama_chat/input_content_spec.rb` to
|
|
23
|
+
match updated prompt formats.
|
|
24
|
+
|
|
3
25
|
## 2026-06-19 v0.0.92
|
|
4
26
|
|
|
5
27
|
### New Features
|
data/Rakefile
CHANGED
data/lib/ollama_chat/commands.rb
CHANGED
|
@@ -164,7 +164,7 @@ module OllamaChat::Commands
|
|
|
164
164
|
info_system_prompt
|
|
165
165
|
when 'reset'
|
|
166
166
|
if prompt = choose_system_prompt(
|
|
167
|
-
prompt: 'Which system law needs to be restored to its origin? '
|
|
167
|
+
prompt: 'Which system law needs to be restored to its origin? %s'
|
|
168
168
|
)
|
|
169
169
|
then
|
|
170
170
|
if reset_system_prompt_to_default(prompt.name)
|
|
@@ -437,7 +437,7 @@ module OllamaChat::Commands
|
|
|
437
437
|
when 'reset'
|
|
438
438
|
if prompt = choose_prompt(
|
|
439
439
|
default: true,
|
|
440
|
-
prompt: 'Which prompt needs to be restored to its origin? '
|
|
440
|
+
prompt: 'Which prompt needs to be restored to its origin? %s'
|
|
441
441
|
)
|
|
442
442
|
then
|
|
443
443
|
if reset_prompt_to_default(prompt.name)
|
|
@@ -450,7 +450,7 @@ module OllamaChat::Commands
|
|
|
450
450
|
prompt = suggest_prompts and next prompt
|
|
451
451
|
when nil
|
|
452
452
|
opts = go_command('e', opts)
|
|
453
|
-
if prompt = choose_prompt(prompt: 'Which template shall guide the next response? ').full?(&:to_s)
|
|
453
|
+
if prompt = choose_prompt(prompt: 'Which template shall guide the next response? %s').full?(&:to_s)
|
|
454
454
|
if opts[?e]
|
|
455
455
|
prompt = edit_text(prompt)
|
|
456
456
|
next prompt
|
|
@@ -51,7 +51,7 @@ module OllamaChat::FavouritesManagement
|
|
|
51
51
|
return
|
|
52
52
|
end
|
|
53
53
|
to_select.unshift('[EXIT]')
|
|
54
|
-
case chosen = choose_entry(to_select, prompt: 'Select an item to mark as favourite: ')
|
|
54
|
+
case chosen = choose_entry(to_select, prompt: 'Select an item to mark as favourite: %s')
|
|
55
55
|
when '[EXIT]', nil
|
|
56
56
|
STDOUT.puts "Cancelled."
|
|
57
57
|
return
|
|
@@ -77,7 +77,7 @@ module OllamaChat::FavouritesManagement
|
|
|
77
77
|
to_select = models::Favourite.where(context: type).map(&:name)
|
|
78
78
|
to_select = all_things.select { to_select.member?(_1.value) }
|
|
79
79
|
to_select = [ '[EXIT]' ] + to_select
|
|
80
|
-
case chosen = choose_entry(to_select, prompt: 'Select a favourite to remove: ')
|
|
80
|
+
case chosen = choose_entry(to_select, prompt: 'Select a favourite to remove: %s')
|
|
81
81
|
when '[EXIT]', nil
|
|
82
82
|
STDOUT.puts "Cancelled."
|
|
83
83
|
return
|
|
@@ -55,7 +55,7 @@ module OllamaChat::InputContent
|
|
|
55
55
|
files = patterns.flat_map { Pathname.glob(_1) }
|
|
56
56
|
files = files.reject { chosen&.member?(_1.expand_path) }.select { _1.file? }
|
|
57
57
|
files.unshift('[EXIT]')
|
|
58
|
-
case chosen_file = choose_entry(files, prompt: 'Select a file to import: ')
|
|
58
|
+
case chosen_file = choose_entry(files, prompt: 'Select a file to import: %s')
|
|
59
59
|
when '[EXIT]', nil
|
|
60
60
|
STDOUT.puts "Exiting chooser."
|
|
61
61
|
return
|
|
@@ -163,7 +163,7 @@ module OllamaChat::ModelHandling
|
|
|
163
163
|
def choose_profile_for_model(model_name)
|
|
164
164
|
profiles = models::ModelOptions.where(model_name:).order(:profile).map(&:profile)
|
|
165
165
|
profiles = [ '[EXIT]' ] + profiles
|
|
166
|
-
case chosen = choose_entry(profiles, prompt: "Choose profile for #{bold{model_name}}: ")
|
|
166
|
+
case chosen = choose_entry(profiles, prompt: "Choose profile for #{bold{model_name}}: %s")
|
|
167
167
|
when '[EXIT]', nil
|
|
168
168
|
STDOUT.puts "Cancelled."
|
|
169
169
|
return
|
|
@@ -366,7 +366,7 @@ module OllamaChat::ModelHandling
|
|
|
366
366
|
elsif cli_model == ''
|
|
367
367
|
choose_entry(
|
|
368
368
|
models,
|
|
369
|
-
prompt: "Which digital oracle shall we consult?"
|
|
369
|
+
prompt: "Which digital oracle shall we consult? %s"
|
|
370
370
|
)&.value || current_model
|
|
371
371
|
else
|
|
372
372
|
cli_model || current_model
|
|
@@ -91,7 +91,7 @@ module OllamaChat::PersonaeManagement
|
|
|
91
91
|
# @return [String, nil] The name of the persona that was set as default,
|
|
92
92
|
# or nil if the selection was cancelled or no persona was chosen.
|
|
93
93
|
def set_default_persona
|
|
94
|
-
if persona = choose_persona(none: true, prompt: 'Who would you like to talk to today? ')
|
|
94
|
+
if persona = choose_persona(none: true, prompt: 'Who would you like to talk to today? %s')
|
|
95
95
|
set_default_persona_name(persona)
|
|
96
96
|
end
|
|
97
97
|
end
|
|
@@ -214,7 +214,7 @@ module OllamaChat::PersonaeManagement
|
|
|
214
214
|
# @return [String] A JSON object with deletion status on success,
|
|
215
215
|
# or nil if persona was not selected or deletion was cancelled
|
|
216
216
|
def delete_persona
|
|
217
|
-
if persona = choose_persona(prompt: 'Which persona is no longer needed? ')
|
|
217
|
+
if persona = choose_persona(prompt: 'Which persona is no longer needed? %s')
|
|
218
218
|
pathname = persona_name_to_pathname(persona)
|
|
219
219
|
backup_pathname = persona_backup_pathname(persona)
|
|
220
220
|
if pathname.exist?
|
|
@@ -245,7 +245,7 @@ module OllamaChat::PersonaeManagement
|
|
|
245
245
|
#
|
|
246
246
|
# @return [String, nil] persona name or nil if cancelled
|
|
247
247
|
def edit_persona
|
|
248
|
-
if persona = choose_persona(prompt: 'Which persona needs some polishing? ')
|
|
248
|
+
if persona = choose_persona(prompt: 'Which persona needs some polishing? %s')
|
|
249
249
|
pathname = persona_name_to_pathname(persona)
|
|
250
250
|
old_content = pathname.read
|
|
251
251
|
if edit_file(pathname)
|
|
@@ -265,7 +265,7 @@ module OllamaChat::PersonaeManagement
|
|
|
265
265
|
# @return [String, nil] the filesystem path of the selected persona,
|
|
266
266
|
# or nil if the selection was cancelled.
|
|
267
267
|
def select_persona_path
|
|
268
|
-
persona = choose_persona(prompt: "Which persona's path do you need? ") or return
|
|
268
|
+
persona = choose_persona(prompt: "Which persona's path do you need? %s") or return
|
|
269
269
|
path = persona_name_to_pathname(persona).to_s
|
|
270
270
|
perform_copy_to_clipboard(text: path, edit: false)
|
|
271
271
|
@prefill_prompt = path
|
|
@@ -279,7 +279,7 @@ module OllamaChat::PersonaeManagement
|
|
|
279
279
|
# location using `File.write`. This ensures a safe copy is preserved before
|
|
280
280
|
# any modifications are made to the original file.
|
|
281
281
|
def backup_persona
|
|
282
|
-
if persona = choose_persona(prompt: 'Which persona should be safely archived? ')
|
|
282
|
+
if persona = choose_persona(prompt: 'Which persona should be safely archived? %s')
|
|
283
283
|
pathname = persona_name_to_pathname(persona)
|
|
284
284
|
old_content = pathname.read
|
|
285
285
|
backup_pathname = persona_backup_pathname(persona)
|
|
@@ -317,7 +317,7 @@ module OllamaChat::PersonaeManagement
|
|
|
317
317
|
#
|
|
318
318
|
# Shows the persona's profile using kramdown formatting with ansi parsing.
|
|
319
319
|
def info_persona
|
|
320
|
-
if persona = choose_persona(prompt: 'Who would you like to learn more about? ')
|
|
320
|
+
if persona = choose_persona(prompt: 'Who would you like to learn more about? %s')
|
|
321
321
|
description = persona_description(persona) or return
|
|
322
322
|
use_pager do |output|
|
|
323
323
|
output.puts kramdown_ansi_parse(description)
|
|
@@ -378,7 +378,7 @@ module OllamaChat::PersonaeManagement
|
|
|
378
378
|
# (default: 'Select a persona: ')
|
|
379
379
|
# @return [String, Symbol, nil] The selected persona name, :none, or nil if
|
|
380
380
|
# user exits
|
|
381
|
-
def choose_persona(chosen: nil, none: false, prompt: 'Select a persona: ')
|
|
381
|
+
def choose_persona(chosen: nil, none: false, prompt: 'Select a persona: %s')
|
|
382
382
|
personae_list = available_personae_names.
|
|
383
383
|
reject { chosen&.member?(_1) }
|
|
384
384
|
if personae_list.empty?
|
|
@@ -405,7 +405,7 @@ module OllamaChat::PersonaeManagement
|
|
|
405
405
|
def load_personae
|
|
406
406
|
chosen = Set[]
|
|
407
407
|
choose_with_state do
|
|
408
|
-
while persona = choose_persona(chosen: chosen, prompt: 'Who else should join the conversation? ')
|
|
408
|
+
while persona = choose_persona(chosen: chosen, prompt: 'Who else should join the conversation? %s')
|
|
409
409
|
persona == :none and next
|
|
410
410
|
chosen << persona
|
|
411
411
|
end
|
|
@@ -534,7 +534,7 @@ module OllamaChat::PersonaeManagement
|
|
|
534
534
|
# @return [self, nil] returns self on success, or nil if the operation was
|
|
535
535
|
# cancelled during persona selection or name entry.
|
|
536
536
|
def duplicate_persona
|
|
537
|
-
persona = choose_persona(prompt: 'Which persona shall serve as the blueprint? ') or return
|
|
537
|
+
persona = choose_persona(prompt: 'Which persona shall serve as the blueprint? %s') or return
|
|
538
538
|
pathname = persona_name_to_pathname(persona)
|
|
539
539
|
new_persona_name = determine_valid_new_name_for_persona('to ducplicate as') or return
|
|
540
540
|
new_pathname = persona_name_to_pathname(new_persona_name)
|
|
@@ -586,7 +586,7 @@ module OllamaChat::PersonaeManagement
|
|
|
586
586
|
# @return [self, nil] returns self if the export was successful, or nil if
|
|
587
587
|
# the process was cancelled during persona selection or filename entry.
|
|
588
588
|
def export_persona
|
|
589
|
-
persona = choose_persona(prompt: 'Which persona are you taking with you? ') or return
|
|
589
|
+
persona = choose_persona(prompt: 'Which persona are you taking with you? %s') or return
|
|
590
590
|
pathname = persona_name_to_pathname(persona)
|
|
591
591
|
content = pathname.read
|
|
592
592
|
STDOUT.puts kramdown_ansi_parse(
|
|
@@ -30,7 +30,7 @@ module OllamaChat::PromptManagement
|
|
|
30
30
|
#
|
|
31
31
|
# @return [OllamaChat::Database::Models::Prompt, nil] the selected prompt
|
|
32
32
|
# model, or nil if the user chooses '[EXIT]' or cancels the selection.
|
|
33
|
-
def choose_prompt(default: nil, prompt: 'Select a prompt template: ')
|
|
33
|
+
def choose_prompt(default: nil, prompt: 'Select a prompt template: %s')
|
|
34
34
|
prompts = all_prompts(default: default)
|
|
35
35
|
prompts.unshift('[EXIT]')
|
|
36
36
|
case chosen = choose_entry(prompts, prompt:)
|
|
@@ -46,7 +46,7 @@ module OllamaChat::PromptManagement
|
|
|
46
46
|
#
|
|
47
47
|
# @return [self, nil] the current context on success, or nil if cancelled
|
|
48
48
|
def info_prompt
|
|
49
|
-
if prompt = choose_prompt(prompt: 'Which blueprint would you like to inspect? ')
|
|
49
|
+
if prompt = choose_prompt(prompt: 'Which blueprint would you like to inspect? %s')
|
|
50
50
|
use_pager do |output|
|
|
51
51
|
output.puts kramdown_ansi_parse(<<~EOT)
|
|
52
52
|
# Prompt #{prompt.name}
|
|
@@ -99,7 +99,7 @@ module OllamaChat::PromptManagement
|
|
|
99
99
|
# Interactively selects an existing non-default prompt and deletes it after
|
|
100
100
|
# confirmation.
|
|
101
101
|
def choose_and_delete_prompt
|
|
102
|
-
prompt = choose_prompt(default: false, prompt: 'Which template has outlived its usefulness? ') or return
|
|
102
|
+
prompt = choose_prompt(default: false, prompt: 'Which template has outlived its usefulness? %s') or return
|
|
103
103
|
STDOUT.puts kramdown_ansi_parse(
|
|
104
104
|
prompt.to_s + "\n---"
|
|
105
105
|
)
|
|
@@ -115,7 +115,7 @@ module OllamaChat::PromptManagement
|
|
|
115
115
|
#
|
|
116
116
|
# @return [self, nil] the current context on success, or nil if cancelled
|
|
117
117
|
def choose_and_edit_prompt
|
|
118
|
-
prompt = choose_prompt(prompt: 'Which spell needs some fine-tuning? ') or return
|
|
118
|
+
prompt = choose_prompt(prompt: 'Which spell needs some fine-tuning? %s') or return
|
|
119
119
|
prompt.metadata['content'] = edit_text(prompt.metadata['content'].to_s)
|
|
120
120
|
prompt.save
|
|
121
121
|
self
|
|
@@ -133,7 +133,7 @@ module OllamaChat::PromptManagement
|
|
|
133
133
|
# @return [self, nil] the current context on success, or nil if the user
|
|
134
134
|
# cancelled the operation or no prompt was selected.
|
|
135
135
|
def duplicate_prompt
|
|
136
|
-
prompt = choose_prompt(prompt: 'Which prompt shall be the basis for a new one? ') or return
|
|
136
|
+
prompt = choose_prompt(prompt: 'Which prompt shall be the basis for a new one? %s') or return
|
|
137
137
|
STDOUT.puts kramdown_ansi_parse(
|
|
138
138
|
prompt.to_s + "\n---"
|
|
139
139
|
)
|
|
@@ -204,7 +204,7 @@ module OllamaChat::PromptManagement
|
|
|
204
204
|
# @return [self, nil] returns self if the export was successful, or nil if
|
|
205
205
|
# the process was cancelled during prompt selection or filename entry.
|
|
206
206
|
def export_prompt
|
|
207
|
-
prompt = choose_prompt(prompt: 'Which template are you exporting to disk? ') or return
|
|
207
|
+
prompt = choose_prompt(prompt: 'Which template are you exporting to disk? %s') or return
|
|
208
208
|
STDOUT.puts kramdown_ansi_parse(
|
|
209
209
|
prompt.to_s + "\n---"
|
|
210
210
|
)
|
|
@@ -241,7 +241,7 @@ module OllamaChat::PromptManagement
|
|
|
241
241
|
# was cancelled.
|
|
242
242
|
def suggest_prompts
|
|
243
243
|
# Let the user pick a prompt template (e.g., suggest_coding, suggest_roleplaying)
|
|
244
|
-
instruction = choose_prompt(prompt: 'Which suggestion strategy shall we employ? ') or return
|
|
244
|
+
instruction = choose_prompt(prompt: 'Which suggestion strategy shall we employ? %s') or return
|
|
245
245
|
|
|
246
246
|
# Build the context by gathering all current conversation messages
|
|
247
247
|
history = prepare_conversation_history
|
|
@@ -506,7 +506,7 @@ module OllamaChat::SessionManagement
|
|
|
506
506
|
else
|
|
507
507
|
offer_new_session and sessions.unshift(SearchUI::Wrapper.new('[new]', display: '[NEW]'))
|
|
508
508
|
sessions = sessions.unshift(SearchUI::Wrapper.new('[exit]', display: '[EXIT]'))
|
|
509
|
-
value = choose_entry(sessions, prompt: 'Select a chat session: ')&.value
|
|
509
|
+
value = choose_entry(sessions, prompt: 'Select a chat session: %s')&.value
|
|
510
510
|
if value == '[new]'
|
|
511
511
|
return new_session
|
|
512
512
|
end
|
|
@@ -87,7 +87,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
87
87
|
prompts.unshift('[MODEL DEFAULT]').unshift('[EXIT]')
|
|
88
88
|
chosen = choose_entry(
|
|
89
89
|
prompts,
|
|
90
|
-
prompt: 'Which governing law shall we enact?'
|
|
90
|
+
prompt: 'Which governing law shall we enact? %s'
|
|
91
91
|
)
|
|
92
92
|
system_prompt_name =
|
|
93
93
|
case chosen
|
|
@@ -112,7 +112,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
112
112
|
# (default: 'Select a system prompt: ')
|
|
113
113
|
#
|
|
114
114
|
# @return [Object, nil] the selected system prompt object, or nil if cancelled
|
|
115
|
-
def choose_system_prompt(prompt: 'Select a system prompt: ')
|
|
115
|
+
def choose_system_prompt(prompt: 'Select a system prompt: %s')
|
|
116
116
|
prompts = all_system_prompts
|
|
117
117
|
prompts.unshift('[EXIT]')
|
|
118
118
|
case chosen = choose_entry(prompts, prompt:)
|
|
@@ -128,7 +128,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
128
128
|
#
|
|
129
129
|
# @return [self, nil] the current context on success, or nil if cancelled
|
|
130
130
|
def info_system_prompt
|
|
131
|
-
if system_prompt = choose_system_prompt(prompt: 'Which system law would you like to review? ')
|
|
131
|
+
if system_prompt = choose_system_prompt(prompt: 'Which system law would you like to review? %s')
|
|
132
132
|
use_pager do |output|
|
|
133
133
|
output.puts kramdown_ansi_parse(<<~EOT)
|
|
134
134
|
# System Prompt #{system_prompt.name}
|
|
@@ -170,7 +170,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
170
170
|
# @return [self, nil] the current context on success, or nil if cancelled
|
|
171
171
|
def choose_and_edit_system_prompt
|
|
172
172
|
system_prompt = choose_system_prompt(
|
|
173
|
-
prompt: 'Which system directive needs rewriting? '
|
|
173
|
+
prompt: 'Which system directive needs rewriting? %s'
|
|
174
174
|
) or return
|
|
175
175
|
system_prompt.metadata['content'] = edit_text(system_prompt.metadata['content'].to_s)
|
|
176
176
|
system_prompt.save
|
|
@@ -183,7 +183,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
183
183
|
#
|
|
184
184
|
# @return [self, nil] the current context on success, or nil if cancelled
|
|
185
185
|
def choose_and_delete_system_prompt
|
|
186
|
-
system_prompt = choose_system_prompt(prompt: 'Which old rule is now obsolete? ') or return
|
|
186
|
+
system_prompt = choose_system_prompt(prompt: 'Which old rule is now obsolete? %s') or return
|
|
187
187
|
STDOUT.puts kramdown_ansi_parse(
|
|
188
188
|
system_prompt.to_s + "\n---"
|
|
189
189
|
)
|
|
@@ -226,7 +226,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
226
226
|
# @return [self, nil] the current context on success, or nil if the user
|
|
227
227
|
# cancelled the operation or no system prompt was selected.
|
|
228
228
|
def duplicate_system_prompt
|
|
229
|
-
system_prompt = choose_system_prompt(prompt: 'Which core logic shall be cloned? ') or return
|
|
229
|
+
system_prompt = choose_system_prompt(prompt: 'Which core logic shall be cloned? %s') or return
|
|
230
230
|
STDOUT.puts kramdown_ansi_parse(
|
|
231
231
|
system_prompt.to_s + "\n---"
|
|
232
232
|
)
|
|
@@ -281,7 +281,7 @@ module OllamaChat::SystemPromptManagement
|
|
|
281
281
|
# @return [self, nil] returns self if the export was successful, or nil if
|
|
282
282
|
# the process was cancelled during system prompt selection or filename entry.
|
|
283
283
|
def export_system_prompt
|
|
284
|
-
prompt = choose_system_prompt(prompt: 'Which system prompt are you archiving to disk? ') or return
|
|
284
|
+
prompt = choose_system_prompt(prompt: 'Which system prompt are you archiving to disk? %s') or return
|
|
285
285
|
STDOUT.puts kramdown_ansi_parse(
|
|
286
286
|
prompt.to_s + "\n---"
|
|
287
287
|
)
|
|
@@ -130,7 +130,7 @@ module OllamaChat::ToolCalling
|
|
|
130
130
|
select_tools = [ '[EXIT]' ] + select_tools
|
|
131
131
|
chosen = choose_entry(
|
|
132
132
|
select_tools,
|
|
133
|
-
prompt: 'Which capabilities should be granted to the model?'
|
|
133
|
+
prompt: 'Which capabilities should be granted to the model? %s'
|
|
134
134
|
)
|
|
135
135
|
case chosen
|
|
136
136
|
when '[EXIT]', nil
|
|
@@ -161,7 +161,7 @@ module OllamaChat::ToolCalling
|
|
|
161
161
|
select_tools = [ '[EXIT]' ] + select_tools
|
|
162
162
|
chosen = choose_entry(
|
|
163
163
|
select_tools,
|
|
164
|
-
prompt: 'Which capabilities should be granted to the model?'
|
|
164
|
+
prompt: 'Which capabilities should be granted to the model? %s'
|
|
165
165
|
)
|
|
166
166
|
case chosen
|
|
167
167
|
when '[EXIT]', nil
|
data/lib/ollama_chat/version.rb
CHANGED
data/ollama_chat.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ollama_chat 0.0.
|
|
2
|
+
# stub: ollama_chat 0.0.93 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ollama_chat".freeze
|
|
6
|
-
s.version = "0.0.
|
|
6
|
+
s.version = "0.0.93".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
|
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
|
|
|
34
34
|
s.add_development_dependency(%q<context_spook>.freeze, [">= 0".freeze])
|
|
35
35
|
s.add_development_dependency(%q<utils>.freeze, [">= 0".freeze])
|
|
36
36
|
s.add_runtime_dependency(%q<excon>.freeze, ["~> 1.0".freeze])
|
|
37
|
-
s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 1.
|
|
37
|
+
s.add_runtime_dependency(%q<ollama-ruby>.freeze, ["~> 1.22".freeze])
|
|
38
38
|
s.add_runtime_dependency(%q<documentrix>.freeze, [">= 0.6.0".freeze])
|
|
39
39
|
s.add_runtime_dependency(%q<unix_socks>.freeze, [">= 0.4".freeze])
|
|
40
40
|
s.add_runtime_dependency(%q<rss>.freeze, ["~> 0.3".freeze])
|
|
@@ -51,7 +51,7 @@ describe OllamaChat::InputContent do
|
|
|
51
51
|
expect(chat).to receive(:choose_entry).
|
|
52
52
|
with(
|
|
53
53
|
files.unshift('[EXIT]'),
|
|
54
|
-
prompt: 'Select a file to import: ',
|
|
54
|
+
prompt: 'Select a file to import: %s',
|
|
55
55
|
).and_return(files[1])
|
|
56
56
|
|
|
57
57
|
result = chat.choose_filename('spec/assets/**/*.txt')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ollama_chat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.93
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
@@ -155,14 +155,14 @@ dependencies:
|
|
|
155
155
|
requirements:
|
|
156
156
|
- - "~>"
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '1.
|
|
158
|
+
version: '1.22'
|
|
159
159
|
type: :runtime
|
|
160
160
|
prerelease: false
|
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
|
162
162
|
requirements:
|
|
163
163
|
- - "~>"
|
|
164
164
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '1.
|
|
165
|
+
version: '1.22'
|
|
166
166
|
- !ruby/object:Gem::Dependency
|
|
167
167
|
name: documentrix
|
|
168
168
|
requirement: !ruby/object:Gem::Requirement
|