mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 07:01:04 +03:00
Update utils isFlowValidForStream
Some chains/agents streaming are not working atm, disabling streaming for those chains/agents
This commit is contained in:
@@ -680,10 +680,16 @@ export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNod
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
let isValidChainOrAgent = false
|
||||||
isChatOrLLMsExist &&
|
if (endingNodeData.category === 'Chains') {
|
||||||
(endingNodeData.category === 'Chains' || endingNodeData.name === 'openAIFunctionAgent') &&
|
// Chains that are not available to stream
|
||||||
!isVectorStoreFaiss(endingNodeData) &&
|
const blacklistChains = ['openApiChain']
|
||||||
process.env.EXECUTION_MODE !== 'child'
|
isValidChainOrAgent = !blacklistChains.includes(endingNodeData.name)
|
||||||
)
|
} else if (endingNodeData.category === 'Agents') {
|
||||||
|
// Agent that are available to stream
|
||||||
|
const whitelistAgents = ['openAIFunctionAgent']
|
||||||
|
isValidChainOrAgent = whitelistAgents.includes(endingNodeData.name)
|
||||||
|
}
|
||||||
|
|
||||||
|
return isChatOrLLMsExist && isValidChainOrAgent && !isVectorStoreFaiss(endingNodeData) && process.env.EXECUTION_MODE !== 'child'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user