disabled ouput parser streaming

This commit is contained in:
Henry
2023-10-31 14:07:29 +00:00
parent 8857530f29
commit f57a08f59b
11 changed files with 32 additions and 28 deletions
+10 -1
View File
@@ -804,7 +804,16 @@ export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNod
isValidChainOrAgent = whitelistAgents.includes(endingNodeData.name)
}
return isChatOrLLMsExist && isValidChainOrAgent
// If no output parser, flow is available to stream
let isOutputParserExist = false
for (const flowNode of reactFlowNodes) {
const data = flowNode.data
if (data.category.includes('Output Parser')) {
isOutputParserExist = true
}
}
return isChatOrLLMsExist && isValidChainOrAgent && !isOutputParserExist
}
/**