mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-12 15:44:06 -08:00
fix(AI Transform Node): Remove prompt as it's already set in ASK AI endpoint (no-changelog) (#10496)
This commit is contained in:
parent
6d82fb9fc0
commit
d4012c7bf8
|
@ -68,16 +68,6 @@ function getPath(parameter: string) {
|
||||||
return (props.path ? `${props.path}.` : '') + parameter;
|
return (props.path ? `${props.path}.` : '') + parameter;
|
||||||
}
|
}
|
||||||
|
|
||||||
function createPrompt(prompt: string) {
|
|
||||||
return `
|
|
||||||
Important! The original input must remain unchanged. If there is a risk of modifying the original input, create a copy of it before making any changes. Use appropriate methods to ensure that the properties of objects are not directly altered.
|
|
||||||
|
|
||||||
Always return an array
|
|
||||||
|
|
||||||
${prompt}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSubmit() {
|
async function onSubmit() {
|
||||||
const { activeNode } = useNDVStore();
|
const { activeNode } = useNDVStore();
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
|
@ -111,7 +101,7 @@ async function onSubmit() {
|
||||||
: 'gpt-3.5-turbo-16k';
|
: 'gpt-3.5-turbo-16k';
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
question: createPrompt(prompt.value),
|
question: prompt.value,
|
||||||
context: {
|
context: {
|
||||||
schema: schemas.parentNodesSchemas,
|
schema: schemas.parentNodesSchemas,
|
||||||
inputSchema: schemas.inputSchema!,
|
inputSchema: schemas.inputSchema!,
|
||||||
|
|
Loading…
Reference in a new issue