fix: Revert AI nodes batching (#15129)

This commit is contained in:
oleg
2025-05-06 11:18:11 +02:00
committed by GitHub
parent ca0e7ffe3b
commit 939ff97ec4
12 changed files with 205 additions and 632 deletions

View File

@@ -8,11 +8,6 @@ import { NodeConnectionTypes, NodeOperationError, UnexpectedError } from 'n8n-wo
import { ChainRetrievalQa } from '../ChainRetrievalQa.node';
jest.mock('n8n-workflow', () => ({
...jest.requireActual('n8n-workflow'),
sleep: jest.fn(),
}));
const createExecuteFunctionsMock = (
parameters: IDataObject,
fakeLlm: BaseLanguageModel,
@@ -85,12 +80,7 @@ describe('ChainRetrievalQa', () => {
const params = {
promptType: 'define',
text: 'What is the capital of France?',
options: {
batching: {
batchSize: 1,
delayBetweenBatches: 100,
},
},
options: {},
};
const result = await node.execute.call(
@@ -124,12 +114,7 @@ describe('ChainRetrievalQa', () => {
const params = {
promptType: 'define',
text: 'What is the capital of France?',
options: {
batching: {
batchSize: 1,
delayBetweenBatches: 100,
},
},
options: {},
};
const result = await node.execute.call(
@@ -173,10 +158,6 @@ describe('ChainRetrievalQa', () => {
text: 'What is the capital of France?',
options: {
systemPromptTemplate: customSystemPrompt,
batching: {
batchSize: 1,
delayBetweenBatches: 100,
},
},
};
@@ -204,12 +185,7 @@ describe('ChainRetrievalQa', () => {
const params = {
promptType: 'define',
text: undefined, // undefined query
options: {
batching: {
batchSize: 1,
delayBetweenBatches: 100,
},
},
options: {},
};
await expect(
@@ -235,12 +211,7 @@ describe('ChainRetrievalQa', () => {
const params = {
promptType: 'define',
text: 'What is the capital of France?',
options: {
batching: {
batchSize: 1,
delayBetweenBatches: 100,
},
},
options: {},
};
// Override continueOnFail to return true