mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 09:01:06 +03:00
Chore/LC v0.3 (#3517)
* bump langchain version to 0.3, upgrades on all chat models * update all docs loader to have documents and text output options * fix pnpm lock file
This commit is contained in:
@@ -2,6 +2,9 @@ import { AnthropicInput, ChatAnthropic as LangchainChatAnthropic } from '@langch
|
||||
import { type BaseChatModelParams } from '@langchain/core/language_models/chat_models'
|
||||
import { IVisionChatModal, IMultiModalOption } from '../../../src'
|
||||
|
||||
const DEFAULT_IMAGE_MODEL = 'claude-3-5-haiku-latest'
|
||||
const DEFAULT_IMAGE_MAX_TOKEN = 2048
|
||||
|
||||
export class ChatAnthropic extends LangchainChatAnthropic implements IVisionChatModal {
|
||||
configuredModel: string
|
||||
configuredMaxToken: number
|
||||
@@ -27,8 +30,8 @@ export class ChatAnthropic extends LangchainChatAnthropic implements IVisionChat
|
||||
|
||||
setVisionModel(): void {
|
||||
if (!this.modelName.startsWith('claude-3')) {
|
||||
this.modelName = 'claude-3-haiku-20240307'
|
||||
this.maxTokens = this.configuredMaxToken ? this.configuredMaxToken : 2048
|
||||
this.modelName = DEFAULT_IMAGE_MODEL
|
||||
this.maxTokens = this.configuredMaxToken ? this.configuredMaxToken : DEFAULT_IMAGE_MAX_TOKEN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user