Merge branch 'main' into FEATURE/Vision

This commit is contained in:
Henry Heng
2024-02-14 18:06:33 +08:00
committed by GitHub
130 changed files with 6581 additions and 284 deletions
+13 -1
View File
@@ -821,7 +821,16 @@ export const findAvailableConfigs = (reactFlowNodes: IReactFlowNode[], component
*/
export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNodeData: INodeData) => {
const streamAvailableLLMs = {
'Chat Models': ['azureChatOpenAI', 'chatOpenAI', 'chatAnthropic', 'chatOllama', 'awsChatBedrock', 'chatMistralAI'],
'Chat Models': [
'azureChatOpenAI',
'chatOpenAI',
'chatOpenAI_LlamaIndex',
'chatAnthropic',
'chatAnthropic_LlamaIndex',
'chatOllama',
'awsChatBedrock',
'chatMistralAI'
],
LLMs: ['azureOpenAI', 'openAI', 'ollama']
}
@@ -844,6 +853,9 @@ export const isFlowValidForStream = (reactFlowNodes: IReactFlowNode[], endingNod
// Agent that are available to stream
const whitelistAgents = ['openAIFunctionAgent', 'csvAgent', 'airtableAgent', 'conversationalRetrievalAgent']
isValidChainOrAgent = whitelistAgents.includes(endingNodeData.name)
} else if (endingNodeData.category === 'Engine') {
const whitelistEngine = ['contextChatEngine', 'simpleChatEngine', 'queryEngine', 'subQuestionQueryEngine']
isValidChainOrAgent = whitelistEngine.includes(endingNodeData.name)
}
// If no output parser, flow is available to stream