mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
fix(OpenAI Node): Show correct inputs for AI node (#14142)
This commit is contained in:
@@ -50,25 +50,22 @@ const configureNodeInputs = (
|
|||||||
) => {
|
) => {
|
||||||
if (resource === 'assistant' && operation === 'message') {
|
if (resource === 'assistant' && operation === 'message') {
|
||||||
const inputs: INodeInputConfiguration[] = [
|
const inputs: INodeInputConfiguration[] = [
|
||||||
{ type: NodeConnectionTypes.Main },
|
{ type: 'main' },
|
||||||
{ type: NodeConnectionTypes.AiTool, displayName: 'Tools' },
|
{ type: 'ai_tool', displayName: 'Tools' },
|
||||||
];
|
];
|
||||||
if (memory !== 'threadId') {
|
if (memory !== 'threadId') {
|
||||||
inputs.push({ type: NodeConnectionTypes.AiMemory, displayName: 'Memory', maxConnections: 1 });
|
inputs.push({ type: 'ai_memory', displayName: 'Memory', maxConnections: 1 });
|
||||||
}
|
}
|
||||||
return inputs;
|
return inputs;
|
||||||
}
|
}
|
||||||
if (resource === 'text' && operation === 'message') {
|
if (resource === 'text' && operation === 'message') {
|
||||||
if (hideTools === 'hide') {
|
if (hideTools === 'hide') {
|
||||||
return [NodeConnectionTypes.Main];
|
return ['main'];
|
||||||
}
|
}
|
||||||
return [
|
return [{ type: 'main' }, { type: 'ai_tool', displayName: 'Tools' }];
|
||||||
{ type: NodeConnectionTypes.Main },
|
|
||||||
{ type: NodeConnectionTypes.AiTool, displayName: 'Tools' },
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return [NodeConnectionTypes.Main];
|
return ['main'];
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line n8n-nodes-base/node-class-description-missing-subtitle
|
// eslint-disable-next-line n8n-nodes-base/node-class-description-missing-subtitle
|
||||||
|
|||||||
Reference in New Issue
Block a user