Skip to content

Commit

Permalink
fix: make agent_observe consistent with agent to avoid err
Browse files Browse the repository at this point in the history
When running the agent_observe.ts example with a simple ollama setup,
I was getting this error:

>  LinePrefixParserError: The generated output does not adhere to the schema.  Nothing valid has been parsed yet!

agent.ts works fine, so fixing the tool order and totalMaxRetries to
be more consistent and to avoid the error.

Signed-off-by: Mark Sturdevant <mark.sturdevant@ibm.com>
  • Loading branch information
markstur committed Nov 27, 2024
1 parent 77a9a78 commit 116356d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/agent_observe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import { getPrompt } from "./helpers/prompt.js";
import { WikipediaTool } from "bee-agent-framework/tools/search/wikipedia";

const llm = getChatLLM();

const agent = new BeeAgent({
llm,
memory: new TokenMemory({ llm }),
tools: [new WikipediaTool(), new OpenMeteoTool()],
tools: [new OpenMeteoTool(), new WikipediaTool()],
});

try {
Expand All @@ -28,7 +27,7 @@ try {
execution: {
maxIterations: 8,
maxRetriesPerStep: 3,
totalMaxRetries: 10,
totalMaxRetries: 0,
},
},
)
Expand Down

0 comments on commit 116356d

Please sign in to comment.