fix(AI Agent Node): Escape curly brackets in tools description for non Tool agents (#11772)

This commit is contained in:
oleg
2024-11-19 17:56:52 +01:00
committed by GitHub
parent 1987363f79
commit 83abdfaf02
5 changed files with 271 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ export async function conversationalAgentExecute(
| BaseChatMemory
| undefined;
const tools = await getConnectedTools(this, nodeVersion >= 1.5);
const tools = await getConnectedTools(this, nodeVersion >= 1.5, true, true);
const outputParsers = await getOptionalOutputParsers(this);
await checkForStructuredTools(tools, this.getNode(), 'Conversational Agent');

View File

@@ -26,7 +26,7 @@ export async function planAndExecuteAgentExecute(
0,
)) as BaseChatModel;
const tools = await getConnectedTools(this, nodeVersion >= 1.5);
const tools = await getConnectedTools(this, nodeVersion >= 1.5, true, true);
await checkForStructuredTools(tools, this.getNode(), 'Plan & Execute Agent');
const outputParsers = await getOptionalOutputParsers(this);

View File

@@ -31,7 +31,7 @@ export async function reActAgentAgentExecute(
| BaseLanguageModel
| BaseChatModel;
const tools = await getConnectedTools(this, nodeVersion >= 1.5);
const tools = await getConnectedTools(this, nodeVersion >= 1.5, true, true);
await checkForStructuredTools(tools, this.getNode(), 'ReAct Agent');