foobara-llm-backed-command 1.0.3 → 1.0.5
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/CHANGELOG.md +8 -0
- data/src/llm_backed_execute_method.rb +12 -5
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bbfda70465d0dd751df1d79999f6dd5189a6774b39d8e55607b722cfc7b288d0
|
|
4
|
+
data.tar.gz: ff13ba493ed240546ecd4987397f64f428bec9fa9e231ec1cfe261b38ae773c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dccc5de9be7bcb7df823e9a216e1f797beee65cc1b82db659b61f34310d1e9c49f4120f5159f65384c44f8dc409e9d4f67e2f729cf7e4e69f4efa35f1840737
|
|
7
|
+
data.tar.gz: 7985b5eff2620d827daa42333076b031d5ddf014f2a0f9d8599cf428e584a5eddc5573ee03ca55e3957e0c1ccb0335feedc03d7f5851e31f9d75861fb2d7abb5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.0.5] - 2026-10-10
|
|
2
|
+
|
|
3
|
+
- Assume the LLM just failed to encode the result is unparsable and the result_type is :string
|
|
4
|
+
|
|
5
|
+
## [1.0.4] - 2026-09-22
|
|
6
|
+
|
|
7
|
+
- Make use of newest foobara-* gems
|
|
8
|
+
|
|
1
9
|
## [1.0.3] - 2026-09-11
|
|
2
10
|
|
|
3
11
|
- Handle removed JSON.fast_generate
|
|
@@ -167,16 +167,23 @@ module Foobara
|
|
|
167
167
|
JSON.parse(fencepostless_answer)
|
|
168
168
|
else
|
|
169
169
|
# simplecov:disable
|
|
170
|
+
# TODO: raise some specific error here
|
|
170
171
|
raise
|
|
171
172
|
# simplecov:enable
|
|
172
173
|
end
|
|
173
174
|
rescue JSON::ParserError => e
|
|
174
|
-
# TODO:
|
|
175
|
+
# TODO: should we retry letting it see the error?
|
|
175
176
|
# simplecov:disable
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
if self.class.result_type.extends?(Foobara::BuiltinTypes[:string])
|
|
178
|
+
# let's assume the LLM just didn't bother JSON encoding the string... maybe not safe?
|
|
179
|
+
fencepostless_answer
|
|
180
|
+
else
|
|
181
|
+
# TODO: figure out how to test this code path
|
|
182
|
+
add_runtime_error :could_not_parse_result_json,
|
|
183
|
+
"Could not parse result JSON: #{e.message}",
|
|
184
|
+
raw_answer: answer,
|
|
185
|
+
stripped_answer: fencepostless_answer
|
|
186
|
+
end
|
|
180
187
|
# simplecov:enable
|
|
181
188
|
end
|
|
182
189
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foobara-llm-backed-command
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miles Georgi
|
|
@@ -15,7 +15,7 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - ">="
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.
|
|
18
|
+
version: 0.7.3
|
|
19
19
|
- - "<"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: 2.0.0
|
|
@@ -25,7 +25,7 @@ dependencies:
|
|
|
25
25
|
requirements:
|
|
26
26
|
- - ">="
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: 0.
|
|
28
|
+
version: 0.7.3
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: 2.0.0
|
|
@@ -35,7 +35,7 @@ dependencies:
|
|
|
35
35
|
requirements:
|
|
36
36
|
- - ">="
|
|
37
37
|
- !ruby/object:Gem::Version
|
|
38
|
-
version: 1.0.
|
|
38
|
+
version: 1.0.6
|
|
39
39
|
- - "<"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
41
|
version: 2.0.0
|
|
@@ -45,7 +45,7 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 1.0.
|
|
48
|
+
version: 1.0.6
|
|
49
49
|
- - "<"
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
51
|
version: 2.0.0
|
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
- !ruby/object:Gem::Version
|
|
108
108
|
version: '0'
|
|
109
109
|
requirements: []
|
|
110
|
-
rubygems_version: 4.0.
|
|
110
|
+
rubygems_version: 4.0.20
|
|
111
111
|
specification_version: 4
|
|
112
112
|
summary: Provides an easy way to implement a command whose logic is managed by an
|
|
113
113
|
LLM
|