Fix Agent Chat History Retrieval (#4163)

fixed agents history from api
This commit is contained in:
Egor Kopylov
2025-03-13 14:39:37 +01:00
committed by GitHub
parent 829d2b1597
commit c6968ff385
+2 -2
View File
@@ -156,9 +156,9 @@ const getChatHistory = async ({
if (isAgentFlow) {
const startNode = nodes.find((node) => node.data.name === 'seqStart')
if (!startNode?.data?.inputs?.memory) return []
if (!startNode?.data?.inputs?.agentMemory) return prependMessages
const memoryNodeId = startNode.data.inputs.memory.split('.')[0].replace('{{', '')
const memoryNodeId = startNode.data.inputs.agentMemory.split('.')[0].replace('{{', '')
const memoryNode = nodes.find((node) => node.data.id === memoryNodeId)
if (memoryNode) {