mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Postgres Chat Memory, Redis Chat Memory, Xata): Add support for context window length (#10203)
This commit is contained in:
@@ -10,7 +10,7 @@ import type { BufferWindowMemoryInput } from 'langchain/memory';
|
||||
import { BufferWindowMemory } from 'langchain/memory';
|
||||
import { logWrapper } from '../../../utils/logWrapper';
|
||||
import { getConnectionHintNoticeField } from '../../../utils/sharedFields';
|
||||
import { sessionIdOption, sessionKeyProperty } from '../descriptions';
|
||||
import { sessionIdOption, sessionKeyProperty, contextWindowLengthProperty } from '../descriptions';
|
||||
import { getSessionId } from '../../../utils/helpers';
|
||||
|
||||
class MemoryChatBufferSingleton {
|
||||
@@ -130,13 +130,7 @@ export class MemoryBufferWindow implements INodeType {
|
||||
},
|
||||
},
|
||||
sessionKeyProperty,
|
||||
{
|
||||
displayName: 'Context Window Length',
|
||||
name: 'contextWindowLength',
|
||||
type: 'number',
|
||||
default: 5,
|
||||
description: 'The number of previous messages to consider for context',
|
||||
},
|
||||
contextWindowLengthProperty,
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user