mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(OpenAI Node): Fix tool parameter parsing issue (#11201)
This commit is contained in:
parent
fade9e43c8
commit
5a1d81ad91
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue