foobara-agent 0.0.19 → 0.0.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17e0b9d6feedfe8e61c6ed2bd44aec231bbe258cd3bae1bcead1e926f2284353
|
4
|
+
data.tar.gz: 1da54afc40dfac2588af5dafe318d9dfb735f19285d3546b3ac2d2a2c12cc66d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0209f85310b217e70efaffba83b1664f7fafb42dd003016f55cc1b49493460e3d345095011da5ad864ab253da9984a16cb393f6e3302ca67fcb7267404f1929
|
7
|
+
data.tar.gz: 6a1ae78c7b2dd0eff8ef6395a0dfd8e1135467e1f942f89ac6a29aa34b4a3916626186a81b541f9784dc23dd46acdba9f0baa1e3d2292cd4672d93d403572347
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## [0.0.21] - 2025-07-23
|
2
|
+
|
3
|
+
- Attempt to fix some regressions in some demo projects by reverting some llm instruction changes
|
4
|
+
|
5
|
+
## [0.0.20] - 2025-07-23
|
6
|
+
|
7
|
+
- Fix bug with result type being an array without any message to the user
|
8
|
+
|
1
9
|
## [0.0.19] - 2025-07-23
|
2
10
|
|
3
11
|
- Skip result: input if result is a Model and properly cast result
|
@@ -17,8 +17,15 @@ module Foobara
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def build_llm_instructions(assistant_association_depth, goal, previous_goals)
|
20
|
-
instructions = "You are
|
21
|
-
|
20
|
+
instructions = "You are the implementation of a command called #{scoped_full_name}"
|
21
|
+
|
22
|
+
instructions += if description && !description.empty?
|
23
|
+
" which has the following description:\n\n#{description}\n\n"
|
24
|
+
else
|
25
|
+
# :nocov:
|
26
|
+
". "
|
27
|
+
# :nocov:
|
28
|
+
end
|
22
29
|
|
23
30
|
result_schema = result_json_schema(assistant_association_depth)
|
24
31
|
|
@@ -31,25 +38,13 @@ module Foobara
|
|
31
38
|
end
|
32
39
|
end
|
33
40
|
|
34
|
-
instructions += "You are working towards accomplishing the following goal
|
35
|
-
|
36
|
-
instructions += "You will answer with the name of the next command to run and, if needed, its inputs. " \
|
37
|
-
"Choose whichever command is best to make progress towards accomplishing the current goal " \
|
38
|
-
"based on the progress made so far. " \
|
39
|
-
"If the goal has been accomplished then choose the " \
|
40
|
-
"NotifyUserThatCurrentGoalHasBeenAccomplished command. " \
|
41
|
-
"If you are stuck either due to errors " \
|
42
|
-
"or because you do not have the command you need to accomplish the " \
|
43
|
-
"goal, then choose GiveUp.\n\n"
|
41
|
+
instructions += "You are working towards accomplishing the following goal:\n\n#{goal}\n\n"
|
44
42
|
|
43
|
+
instructions += "Your response of which command to run next should match the following JSON schema:"
|
44
|
+
instructions += "\n\n#{result_schema}\n\n"
|
45
45
|
instructions += "You can get more details about the inputs and result schemas for a specific command by " \
|
46
|
-
"choosing the DescribeCommand command
|
47
|
-
|
48
|
-
instructions += "Your result type is described by the following JSON schema:" \
|
49
|
-
"\n\n#{result_schema}\n\n" \
|
50
|
-
"You will reply with nothing more than the JSON that you've " \
|
51
|
-
"generated that adheres to this result type schema " \
|
52
|
-
"so that the calling code " \
|
46
|
+
"choosing the DescribeCommand command. " \
|
47
|
+
"You will reply with nothing more than the JSON you've generated so that the calling code " \
|
53
48
|
"can successfully parse your answer."
|
54
49
|
|
55
50
|
instructions
|
@@ -59,8 +54,7 @@ module Foobara
|
|
59
54
|
description "Returns the name of the next command to run and its inputs given the progress " \
|
60
55
|
"towards accomplishing the current goal. " \
|
61
56
|
"If the goal has been accomplished it will choose the " \
|
62
|
-
"NotifyUserThatCurrentGoalHasBeenAccomplished command.
|
63
|
-
"error it cannot get around or does not believe it has the proper commands to accomplish its goal."
|
57
|
+
"NotifyUserThatCurrentGoalHasBeenAccomplished command."
|
64
58
|
|
65
59
|
result do
|
66
60
|
command :string, :required
|