mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
fix: Revert AI nodes batching (#15129)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user