mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34: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) {
|
||||
throw new NodeOperationError(this.getNode(), 'No prompt specified', {
|
||||
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",
|
||||
});
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
"Could not automatically set prompt from previous node. Please select 'Define below' in the Prompt parameter",
|
||||
{
|
||||
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",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
const assistantId = this.getNodeParameter('assistantId', i, '', { extractValue: true }) as string;
|
||||
|
|
|
@ -98,10 +98,14 @@ export function getPromptInputByType(options: {
|
|||
}
|
||||
|
||||
if (input === undefined) {
|
||||
throw new NodeOperationError(ctx.getNode(), 'No prompt specified', {
|
||||
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",
|
||||
});
|
||||
throw new NodeOperationError(
|
||||
ctx.getNode(),
|
||||
"Could not automatically set prompt from previous node. Please select 'Define below' in the Prompt parameter",
|
||||
{
|
||||
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",
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return input;
|
||||
|
|
Loading…
Reference in a new issue