fix: childprocess chatId.

This commit is contained in:
Jeffrey-Wang
2023-06-12 21:52:46 +08:00
parent fd9d6fcb03
commit fe6737a6cb
4 changed files with 10 additions and 4 deletions
+1 -3
View File
@@ -1,6 +1,5 @@
import { IChildProcessMessage, IReactFlowNode, IReactFlowObject, IRunChatflowMessageValue, INodeData } from './Interface'
import { buildLangchain, constructGraphs, getEndingNode, getStartingNodes, resolveVariables } from './utils'
import { getChatId } from './index'
export class ChildProcess {
/**
@@ -24,7 +23,7 @@ export class ChildProcess {
await sendToParentProcess('start', '_')
// Create a Queue and add our initial node in it
const { endingNodeData, chatflow, incomingInput, componentNodes } = messageValue
const { endingNodeData, chatflow, chatId, incomingInput, componentNodes } = messageValue
let nodeToExecuteData: INodeData
let addToChatFlowPool: any = {}
@@ -77,7 +76,6 @@ export class ChildProcess {
const { startingNodeIds, depthQueue } = getStartingNodes(nonDirectedGraph, endingNodeId)
/*** BFS to traverse from Starting Nodes to Ending Node ***/
const chatId = await getChatId(chatflow.id)
const reactFlowNodes = await buildLangchain(
startingNodeIds,
nodes,