Skip to content

Commit

Permalink
feat(agent): switch to a new system prompt (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas2D authored Sep 27, 2024
1 parent b1f6104 commit 9f41663
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 592 deletions.
6 changes: 4 additions & 2 deletions src/agents/bee/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { GetRunContext } from "@/context.js";
import { BeeAgentRunner } from "@/agents/bee/runner.js";
import { BeeAgentError } from "@/agents/bee/errors.js";
import { BeeIterationToolResult } from "@/agents/bee/parser.js";
import { assign } from "@/internals/helpers/object.js";

export interface BeeInput {
llm: ChatLLM<ChatLLMOutput>;
Expand Down Expand Up @@ -128,9 +129,10 @@ export class BeeAgent extends BaseAgent<BeeRunInput, BeeRunOutput, BeeRunOptions
for (const key of ["partialUpdate", "update"] as const) {
await emitter.emit(key, {
data: {
...iteration.state,
tool_output: output,
},
update: { key: "tool_output", value: output },
update: { key: "tool_output", value: output, parsedValue: output },
meta: { success, ...meta },
});
}
Expand All @@ -152,7 +154,7 @@ export class BeeAgent extends BaseAgent<BeeRunInput, BeeRunOutput, BeeRunOptions
}),
);

iteration.state.tool_output = output;
assign(iteration.state, { tool_output: output });
}
if (iteration.state.final_answer) {
finalMessage = BaseMessage.of({
Expand Down
182 changes: 0 additions & 182 deletions src/agents/bee/parser.test.ts

This file was deleted.

Loading

0 comments on commit 9f41663

Please sign in to comment.