UNPKG

@n8n/n8n-nodes-langchain

Version:
45 lines (39 loc) 1.35 kB
/** * Redis Chat Memory Node - Version 1.4 * Stores the chat history in Redis. */ export interface LcMemoryRedisChatV14Params { /** * Session ID * @builderHint Use 'Connected Chat Trigger Node' (fromInput) if there is a Chat Trigger node earlier in the workflow. Otherwise use 'Define below' (customKey). * @default fromInput */ sessionIdType?: 'fromInput' | 'customKey' | Expression<string>; /** * The key to use to store session ID in the memory * @displayOptions.show { sessionIdType: ["customKey"] } */ sessionKey?: string | Expression<string>; /** * For how long the session should be stored in seconds. If set to 0 it will not expire. * @default 0 */ sessionTTL?: number | Expression<number>; /** * Context Window Length * @hint How many past interactions the model receives as context * @default 5 */ contextWindowLength?: number | Expression<number>; } export interface LcMemoryRedisChatV14Credentials { redis: CredentialReference; } interface LcMemoryRedisChatV14NodeBase { type: '@n8n/n8n-nodes-langchain.memoryRedisChat'; version: 1.4; } export type LcMemoryRedisChatV14ParamsNode = LcMemoryRedisChatV14NodeBase & { config: NodeConfig<LcMemoryRedisChatV14Params> & { credentials?: LcMemoryRedisChatV14Credentials }; }; export type LcMemoryRedisChatV14Node = LcMemoryRedisChatV14ParamsNode;