Feature/add ability to upload file from chat (#3059)

add ability to upload file from chat
This commit is contained in:
Henry Heng
2024-08-25 13:22:48 +01:00
committed by GitHub
parent e8f5f07735
commit 66acd0c000
37 changed files with 1111 additions and 259 deletions
@@ -209,11 +209,11 @@ class Supervisor_MultiAgents implements INode {
prompt = messages.prompt
multiModalMessageContent = messages.multiModalMessageContent
if (llm.bindTools === undefined) {
if ((llm as any).bindTools === undefined) {
throw new Error(`This agent only compatible with function calling models.`)
}
const modelWithTool = llm.bindTools([tool])
const modelWithTool = (llm as any).bindTools([tool])
const outputParser = new ToolCallingAgentOutputParser()
@@ -464,11 +464,11 @@ class Supervisor_MultiAgents implements INode {
prompt = messages.prompt
multiModalMessageContent = messages.multiModalMessageContent
if (llm.bindTools === undefined) {
if ((llm as any).bindTools === undefined) {
throw new Error(`This agent only compatible with function calling models.`)
}
const modelWithTool = llm.bindTools([tool])
const modelWithTool = (llm as any).bindTools([tool])
const outputParser = new ToolCallingAgentOutputParser()