Skip to content

Commit

Permalink
fix(langchain): Fix ZeroShotAgent createPrompt with correct formatted…
Browse files Browse the repository at this point in the history
… tool names (#7510)
  • Loading branch information
thu2004 authored Jan 22, 2025
1 parent 29ad109 commit fe37032
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langchain/src/agents/mrkl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class ZeroShotAgent extends Agent {
.map((tool) => `${tool.name}: ${tool.description}`)
.join("\n");

const toolNames = tools.map((tool) => tool.name);
const toolNames = tools.map((tool) => `"${tool.name}"`).join(", ");

const formatInstructions = renderTemplate(FORMAT_INSTRUCTIONS, "f-string", {
tool_names: toolNames,
Expand Down

0 comments on commit fe37032

Please sign in to comment.