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: a8033849f6ba2e137ede7ef837ba585f2e6705149e1a65c1282c971b524efbc7
4
- data.tar.gz: 59bfa9001aa1badda383fc35a73dafa7fbf3d5adfec50bba217c291e74e25751
3
+ metadata.gz: 17e0b9d6feedfe8e61c6ed2bd44aec231bbe258cd3bae1bcead1e926f2284353
4
+ data.tar.gz: 1da54afc40dfac2588af5dafe318d9dfb735f19285d3546b3ac2d2a2c12cc66d
5
5
  SHA512:
6
- metadata.gz: 5625b3b2d52a6193b387c1031ca4950273a81eb872f349ccd43f2c63607e9f15615f17a26b1852d2d4a2d86585ffbb0ada7a816e23303babe2fc05bc86e4df41
7
- data.tar.gz: ba10c928d42bce2d8cd20e5a98d6652ec8241b3e1a10cda7625e2b299307a1aa08561c36185733c65b2795ec08aa61024e6b7f87097d3bf08ff73d90d181746b
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 part of an agent implementation. " \
21
- "Your task is to decide which command to run next.\n\n"
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: #{goal}\n\n"
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.\n\n"
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. It will choose GiveUp if it runs into an " \
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
@@ -167,7 +167,7 @@ module Foobara
167
167
  *self.class.built_result_type.target_class.attributes_type.element_types.keys
168
168
  )
169
169
  else
170
- inputs[:result]
170
+ [inputs[:result], nil]
171
171
  end
172
172
  end
173
173
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi