Skip to content

Commit

Permalink
feat(agent): use fallback only if LLM output is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D committed Oct 3, 2024
1 parent a9dc1a9 commit a6e582d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/agents/bee/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,12 @@ export class BeeAgentRunner {
} as const,
{
fallback: (stash) =>
[
{ key: "thought", value: "I now know the final answer." },
{ key: "final_answer", value: stash },
] as const,
stash
? [
{ key: "thought", value: "I now know the final answer." },
{ key: "final_answer", value: stash },
]
: [],
},
);

Expand Down

0 comments on commit a6e582d

Please sign in to comment.