Bugfix/Supervisor Node AzureChatOpenAI (#5448)

Integrate AzureChatOpenAI into the Supervisor node to handle user requests alongside ChatOpenAI. This enhancement allows for improved multi-agent conversation management.
This commit is contained in:
Henry Heng 2025-11-07 11:51:54 +00:00 committed by GitHub
parent 3fafd15a80
commit 94cae3b66f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import { ChatOpenAI } from '../../chatmodels/ChatOpenAI/FlowiseChatOpenAI'
import { ChatAnthropic } from '../../chatmodels/ChatAnthropic/FlowiseChatAnthropic' import { ChatAnthropic } from '../../chatmodels/ChatAnthropic/FlowiseChatAnthropic'
import { addImagesToMessages, llmSupportsVision } from '../../../src/multiModalUtils' import { addImagesToMessages, llmSupportsVision } from '../../../src/multiModalUtils'
import { ChatGoogleGenerativeAI } from '../../chatmodels/ChatGoogleGenerativeAI/FlowiseChatGoogleGenerativeAI' import { ChatGoogleGenerativeAI } from '../../chatmodels/ChatGoogleGenerativeAI/FlowiseChatGoogleGenerativeAI'
import { AzureChatOpenAI } from '../../chatmodels/AzureChatOpenAI/FlowiseAzureChatOpenAI'
const sysPrompt = `You are a supervisor tasked with managing a conversation between the following workers: {team_members}. const sysPrompt = `You are a supervisor tasked with managing a conversation between the following workers: {team_members}.
Given the following user request, respond with the worker to act next. Given the following user request, respond with the worker to act next.
@ -242,7 +243,7 @@ class Supervisor_MultiAgents implements INode {
} }
} }
}) })
} else if (llm instanceof ChatOpenAI) { } else if (llm instanceof ChatOpenAI || llm instanceof AzureChatOpenAI) {
let prompt = ChatPromptTemplate.fromMessages([ let prompt = ChatPromptTemplate.fromMessages([
['system', systemPrompt], ['system', systemPrompt],
new MessagesPlaceholder('messages'), new MessagesPlaceholder('messages'),