Skip to content

Commit c6968ff

Browse files
authored
Fix Agent Chat History Retrieval (#4163)
fixed agents history from api
1 parent 829d2b1 commit c6968ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/server/src/utils/buildChatflow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ const getChatHistory = async ({
156156

157157
if (isAgentFlow) {
158158
const startNode = nodes.find((node) => node.data.name === 'seqStart')
159-
if (!startNode?.data?.inputs?.memory) return []
159+
if (!startNode?.data?.inputs?.agentMemory) return prependMessages
160160

161-
const memoryNodeId = startNode.data.inputs.memory.split('.')[0].replace('{{', '')
161+
const memoryNodeId = startNode.data.inputs.agentMemory.split('.')[0].replace('{{', '')
162162
const memoryNode = nodes.find((node) => node.data.id === memoryNodeId)
163163

164164
if (memoryNode) {

0 commit comments

Comments
 (0)