mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
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:
@@ -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'),
|
||||||
|
|||||||
Reference in New Issue
Block a user