fix memory nodes

This commit is contained in:
Henry
2023-11-27 15:34:28 +00:00
parent 17198d8524
commit 3536c2afec
21 changed files with 301 additions and 294 deletions
@@ -109,9 +109,8 @@ const initalizeDynamoDB = async (nodeData: INodeData, options: ICommonObject): P
})
const memory = new BufferMemoryExtended({
memoryKey,
memoryKey: memoryKey ?? 'chat_history',
chatHistory: dynamoDb,
returnMessages: true,
isSessionIdUsingChatMessageId
})
return memory
@@ -123,9 +123,8 @@ const initializeMongoDB = async (nodeData: INodeData, options: ICommonObject): P
}
return new BufferMemoryExtended({
memoryKey,
memoryKey: memoryKey ?? 'chat_history',
chatHistory: mongoDBChatMessageHistory,
returnMessages: true,
isSessionIdUsingChatMessageId
})
}
@@ -137,7 +137,7 @@ const initalizeRedis = async (nodeData: INodeData, options: ICommonObject): Prom
}
const memory = new BufferMemoryExtended({
memoryKey,
memoryKey: memoryKey ?? 'chat_history',
chatHistory: redisChatMessageHistory,
isSessionIdUsingChatMessageId
})
@@ -95,6 +95,7 @@ const initalizeUpstashRedis = async (nodeData: INodeData, options: ICommonObject
})
const memory = new BufferMemoryExtended({
memoryKey: 'chat_history',
chatHistory: redisChatMessageHistory,
isSessionIdUsingChatMessageId
})