Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'label' undefined errors for sequential agents #3585

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/server/src/utils/buildAgentGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ export const buildAgentGraph = async (
// Send loading next agent indicator
if (reasoning.next && reasoning.next !== 'FINISH' && reasoning.next !== 'END') {
if (sseStreamer) {
sseStreamer.streamNextAgentEvent(chatId, mapNameToLabel[reasoning.next].label || reasoning.next)
sseStreamer.streamNextAgentEvent(chatId, mapNameToLabel[reasoning.next]?.label || reasoning.next)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/utils/buildChatflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export const utilBuildChatflow = async (req: Request, isInternal: boolean = fals

/*** Get session ID ***/
const memoryNode = findMemoryNode(nodes, edges)
const memoryType = memoryNode?.data.label
const memoryType = memoryNode?.data?.label
let sessionId = getMemorySessionId(memoryNode, incomingInput, chatId, isInternal)

/*** Get Ending Node with Directed Graph ***/
Expand Down