mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Feature/add ability to upload file from chat (#3059)
add ability to upload file from chat
This commit is contained in:
@@ -89,7 +89,7 @@ class AWSChatBedrock_ChatModels implements INode {
|
||||
name: 'allowImageUploads',
|
||||
type: 'boolean',
|
||||
description:
|
||||
'Only works with claude-3-* models when image is being uploaded from chat. Compatible with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent',
|
||||
'Only works with claude-3-* models when image is being uploaded from chat. Compatible with LLMChain, Conversation Chain, ReAct Agent, Conversational Agent, Tool Agent',
|
||||
default: false,
|
||||
optional: true
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ class AzureChatOpenAI_ChatModels implements INode {
|
||||
name: 'allowImageUploads',
|
||||
type: 'boolean',
|
||||
description:
|
||||
'Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent',
|
||||
'Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, Conversational Agent, Tool Agent',
|
||||
default: false,
|
||||
optional: true
|
||||
},
|
||||
|
||||
@@ -84,7 +84,7 @@ class ChatAnthropic_ChatModels implements INode {
|
||||
name: 'allowImageUploads',
|
||||
type: 'boolean',
|
||||
description:
|
||||
'Automatically uses claude-3-* models when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent',
|
||||
'Automatically uses claude-3-* models when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, Conversational Agent, Tool Agent',
|
||||
default: false,
|
||||
optional: true
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AnthropicInput, ChatAnthropic as LangchainChatAnthropic } from '@langchain/anthropic'
|
||||
import { BaseLLMParams } from '@langchain/core/language_models/llms'
|
||||
import { type BaseChatModelParams } from '@langchain/core/language_models/chat_models'
|
||||
import { IVisionChatModal, IMultiModalOption } from '../../../src'
|
||||
|
||||
export class ChatAnthropic extends LangchainChatAnthropic implements IVisionChatModal {
|
||||
@@ -8,8 +8,9 @@ export class ChatAnthropic extends LangchainChatAnthropic implements IVisionChat
|
||||
multiModalOption: IMultiModalOption
|
||||
id: string
|
||||
|
||||
constructor(id: string, fields: Partial<AnthropicInput> & BaseLLMParams & { anthropicApiKey?: string }) {
|
||||
super(fields)
|
||||
constructor(id: string, fields?: Partial<AnthropicInput> & BaseChatModelParams) {
|
||||
// @ts-ignore
|
||||
super(fields ?? {})
|
||||
this.id = id
|
||||
this.configuredModel = fields?.modelName || ''
|
||||
this.configuredMaxToken = fields?.maxTokens ?? 2048
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ class GoogleGenerativeAI_ChatModels implements INode {
|
||||
name: 'allowImageUploads',
|
||||
type: 'boolean',
|
||||
description:
|
||||
'Automatically uses vision model when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent',
|
||||
'Automatically uses vision model when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, Conversational Agent, Tool Agent',
|
||||
default: false,
|
||||
optional: true
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ class ChatOpenAI_ChatModels implements INode {
|
||||
name: 'allowImageUploads',
|
||||
type: 'boolean',
|
||||
description:
|
||||
'Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent',
|
||||
'Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, Conversational Agent, Tool Agent',
|
||||
default: false,
|
||||
optional: true
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user