Skip to content

Commit

Permalink
wip: add fallback for tool parameter parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
burivuhster committed Oct 10, 2024
1 parent 6ec6b51 commit 3f8fb32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
for (const tool of externalTools ?? []) {
if (tool.name === functionName) {
const parsedArgs: { input: string } = jsonParse(functionArgs);
const functionInput = parsedArgs.input ?? functionArgs;
const functionInput = parsedArgs.input ?? parsedArgs ?? functionArgs;
functionResponse = await tool.invoke(functionInput);
}
}
Expand Down

0 comments on commit 3f8fb32

Please sign in to comment.