mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 16:44:07 -08:00
feat(OpenAI Node, Agent Node, Basic LLM Chain Node): Update title of an error when missing chatInput
This commit is contained in:
parent
8e6ddfe028
commit
e06b75ccd2
|
@ -181,10 +181,14 @@ export async function execute(this: IExecuteFunctions, i: number): Promise<INode
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input === undefined) {
|
if (input === undefined) {
|
||||||
throw new NodeOperationError(this.getNode(), 'No prompt specified', {
|
throw new NodeOperationError(
|
||||||
|
this.getNode(),
|
||||||
|
"Could not automatically set prompt from previous node. Please select 'Define below' in the Prompt parameter",
|
||||||
|
{
|
||||||
description:
|
description:
|
||||||
"Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter",
|
"Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter",
|
||||||
});
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const assistantId = this.getNodeParameter('assistantId', i, '', { extractValue: true }) as string;
|
const assistantId = this.getNodeParameter('assistantId', i, '', { extractValue: true }) as string;
|
||||||
|
|
|
@ -98,10 +98,14 @@ export function getPromptInputByType(options: {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input === undefined) {
|
if (input === undefined) {
|
||||||
throw new NodeOperationError(ctx.getNode(), 'No prompt specified', {
|
throw new NodeOperationError(
|
||||||
|
ctx.getNode(),
|
||||||
|
"Could not automatically set prompt from previous node. Please select 'Define below' in the Prompt parameter",
|
||||||
|
{
|
||||||
description:
|
description:
|
||||||
"Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter",
|
"Expected to find the prompt in an input field called 'chatInput' (this is what the chat trigger node outputs). To use something else, change the 'Prompt' parameter",
|
||||||
});
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
|
|
Loading…
Reference in a new issue