mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
fix(OpenAI Node): Fix tool parameter parsing issue (#11201)
This commit is contained in:
@@ -278,7 +278,7 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
|||||||
for (const tool of externalTools ?? []) {
|
for (const tool of externalTools ?? []) {
|
||||||
if (tool.name === functionName) {
|
if (tool.name === functionName) {
|
||||||
const parsedArgs: { input: string } = jsonParse(functionArgs);
|
const parsedArgs: { input: string } = jsonParse(functionArgs);
|
||||||
const functionInput = parsedArgs.input ?? functionArgs;
|
const functionInput = parsedArgs.input ?? parsedArgs ?? functionArgs;
|
||||||
functionResponse = await tool.invoke(functionInput);
|
functionResponse = await tool.invoke(functionInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user