aia 0.5.14 → 0.5.15
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/.semver +1 -1
- data/CHANGELOG.md +4 -0
- data/README.md +5 -4
- data/lib/aia/main.rb +19 -10
- 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: 2d027907d70cb497a761f25ad65c2e9429f312cc9694466bf9a8db612a1ead0a
|
4
|
+
data.tar.gz: b76efb7bd589a685e9380d969db85f3df88c36fe888fd03e44819d26e339a353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b83635891018c810bf7c794a66bb7c0842e28d9152ceb444f5105468928b419575ce7f3f88e70528ef8dc87b46ab2246525e43726f9480a2f2ce8be00a850270
|
7
|
+
data.tar.gz: 979137d859737b3dec4f264d1e6c6611131b5fbbcb4682ec1dd5843a69c147754b0937414f9c891cc1e8b0a09d95129af83ba1432bc9b01e8465ff7562245ca9
|
data/.semver
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.5.15] 2024-03-30
|
4
|
+
- Added the ability to accept piped in text to be appeded to the end of the prompt text: curl $URL | aia ad_hoc
|
5
|
+
- Fixed bugs with entering directives as follow-up prompts during a chat session
|
6
|
+
|
3
7
|
## [0.5.14] 2024-03-09
|
4
8
|
- Directly access OpenAI to do text to speech when using the `--speak` option
|
5
9
|
- Added --voice to specify which voice to use
|
data/README.md
CHANGED
@@ -6,15 +6,16 @@ It leverages the `prompt_manager` gem to manage prompts for the `mods` and `sgpt
|
|
6
6
|
|
7
7
|
**Most Recent Change**: Refer to the [Changelog](CHANGELOG.md)
|
8
8
|
|
9
|
+
> v0.5.15
|
10
|
+
> - Support piped content by appending to end of prompt text
|
11
|
+
> - fixed bugs with directives entered as follow-up while in chat mode
|
12
|
+
>
|
9
13
|
> v0.5.14
|
10
14
|
> - Directly access OpenAI to do text to speech when using the `--speak` option
|
11
15
|
> - Added --voice to specify which voice to use
|
12
16
|
> - Added --speech_model to specify which TTS model to use
|
13
17
|
>
|
14
|
-
|
15
|
-
> - Added an initial integration for CLI-tool `llm` as a backend processor
|
16
|
-
> Its primary feature is its **ability to use local LLMs and APIs to keep all processing within your local workstation.**
|
17
|
-
>
|
18
|
+
|
18
19
|
|
19
20
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
20
21
|
|
data/lib/aia/main.rb
CHANGED
@@ -20,11 +20,16 @@ class AIA::Main
|
|
20
20
|
include AIA::DynamicContent
|
21
21
|
include AIA::UserQuery
|
22
22
|
|
23
|
-
attr_accessor :logger, :tools, :backend, :directive_output
|
23
|
+
attr_accessor :logger, :tools, :backend, :directive_output, :piped_content
|
24
24
|
|
25
25
|
attr_reader :spinner
|
26
26
|
|
27
27
|
def initialize(args= ARGV)
|
28
|
+
unless $stdin.tty?
|
29
|
+
@piped_content = $stdin.readlines.join.chomp
|
30
|
+
$stdin.reopen("/dev/tty")
|
31
|
+
end
|
32
|
+
|
28
33
|
@directive_output = ""
|
29
34
|
AIA::Tools.load_tools
|
30
35
|
|
@@ -48,6 +53,8 @@ class AIA::Main
|
|
48
53
|
|
49
54
|
@prompt = AIA::Prompt.new.prompt
|
50
55
|
|
56
|
+
@prompt.text += piped_content unless piped_content.nil?
|
57
|
+
|
51
58
|
# TODO: still should verify that the tools are ion the $PATH
|
52
59
|
# tools.class.verify_tools
|
53
60
|
end
|
@@ -63,7 +70,7 @@ class AIA::Main
|
|
63
70
|
# This will be recursive with the new options
|
64
71
|
# --next and --pipeline
|
65
72
|
def call
|
66
|
-
directive_output = @directives_processor.execute_my_directives
|
73
|
+
@directive_output = @directives_processor.execute_my_directives
|
67
74
|
|
68
75
|
if AIA.config.chat?
|
69
76
|
AIA.config.out_file = STDOUT
|
@@ -95,7 +102,7 @@ class AIA::Main
|
|
95
102
|
|
96
103
|
the_prompt = @prompt.to_s
|
97
104
|
|
98
|
-
the_prompt.prepend(directive_output + "\n") unless directive_output.nil? || directive_output.empty?
|
105
|
+
the_prompt.prepend(@directive_output + "\n") unless @directive_output.nil? || @directive_output.empty?
|
99
106
|
|
100
107
|
if AIA.config.terse?
|
101
108
|
the_prompt.prepend "Be terse in your response. "
|
@@ -191,9 +198,10 @@ class AIA::Main
|
|
191
198
|
directive = parts.shift
|
192
199
|
parameters = parts.join(' ')
|
193
200
|
AIA.config.directives << [directive, parameters]
|
194
|
-
|
201
|
+
|
202
|
+
@directive_output = @directives_processor.execute_my_directives
|
195
203
|
else
|
196
|
-
directive_output = ""
|
204
|
+
@directive_output = ""
|
197
205
|
end
|
198
206
|
|
199
207
|
result
|
@@ -210,18 +218,19 @@ class AIA::Main
|
|
210
218
|
the_prompt_text = render_env(the_prompt_text) if AIA.config.shell?
|
211
219
|
|
212
220
|
if handle_directives(the_prompt_text)
|
213
|
-
|
214
|
-
|
215
|
-
|
221
|
+
if @directive_output.nil? || @directive_output.empty?
|
222
|
+
# Do nothing
|
223
|
+
else
|
224
|
+
the_prompt_text = @directive_output
|
225
|
+
the_prompt_text = render_erb(the_prompt_text) if AIA.config.erb?
|
226
|
+
the_prompt_text = render_env(the_prompt_text) if AIA.config.shell?
|
216
227
|
result = get_and_display_result(the_prompt_text)
|
217
|
-
|
218
228
|
log_the_follow_up(the_prompt_text, result)
|
219
229
|
AIA.speak result
|
220
230
|
end
|
221
231
|
else
|
222
232
|
the_prompt_text = insert_terse_phrase(the_prompt_text)
|
223
233
|
result = get_and_display_result(the_prompt_text)
|
224
|
-
|
225
234
|
log_the_follow_up(the_prompt_text, result)
|
226
235
|
AIA.speak result
|
227
236
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dewayne VanHoozer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
316
|
- !ruby/object:Gem::Version
|
317
317
|
version: '0'
|
318
318
|
requirements: []
|
319
|
-
rubygems_version: 3.5.
|
319
|
+
rubygems_version: 3.5.7
|
320
320
|
signing_key:
|
321
321
|
specification_version: 4
|
322
322
|
summary: AI Assistant (aia) a command-line (CLI) utility
|