forked from FlowiseAI/Flowise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Add multi modal to chat ollama (FlowiseAI#3499)
* add multi modal to chat ollama * update JSON mode description
- Loading branch information
1 parent
1e2dc03
commit 51e5591
Showing
6 changed files
with
60 additions
and
1,001 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/components/nodes/chatmodels/ChatOllama/FlowiseChatOllama.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ChatOllama as LCChatOllama, ChatOllamaInput } from '@langchain/ollama' | ||
import { IMultiModalOption, IVisionChatModal } from '../../../src' | ||
|
||
export class ChatOllama extends LCChatOllama implements IVisionChatModal { | ||
configuredModel: string | ||
configuredMaxToken?: number | ||
multiModalOption: IMultiModalOption | ||
id: string | ||
|
||
constructor(id: string, fields?: ChatOllamaInput) { | ||
super(fields) | ||
this.id = id | ||
this.configuredModel = fields?.model ?? '' | ||
} | ||
|
||
revertToOriginalModel(): void { | ||
this.model = this.configuredModel | ||
} | ||
|
||
setMultiModalOption(multiModalOption: IMultiModalOption): void { | ||
this.multiModalOption = multiModalOption | ||
} | ||
|
||
setVisionModel(): void { | ||
// pass | ||
} | ||
} |
Oops, something went wrong.