mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
Merge pull request #853 from FlowiseAI/feature/ChatOpenAI-FineTuned
Feature/Update Custom ChatOpenAI
This commit is contained in:
+8
-7
@@ -2,7 +2,7 @@ import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Inter
|
|||||||
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
|
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
|
||||||
import { ChatOpenAI, OpenAIChatInput } from 'langchain/chat_models/openai'
|
import { ChatOpenAI, OpenAIChatInput } from 'langchain/chat_models/openai'
|
||||||
|
|
||||||
class ChatOpenAIFineTuned_ChatModels implements INode {
|
class ChatOpenAICustom_ChatModels implements INode {
|
||||||
label: string
|
label: string
|
||||||
name: string
|
name: string
|
||||||
version: number
|
version: number
|
||||||
@@ -15,19 +15,20 @@ class ChatOpenAIFineTuned_ChatModels implements INode {
|
|||||||
inputs: INodeParams[]
|
inputs: INodeParams[]
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.label = 'ChatOpenAI Fine-Tuned'
|
this.label = 'ChatOpenAI Custom'
|
||||||
this.name = 'chatOpenAIFineTuned'
|
this.name = 'chatOpenAICustom'
|
||||||
this.version = 1.0
|
this.version = 1.0
|
||||||
this.type = 'ChatOpenAI-FineTuned'
|
this.type = 'ChatOpenAI-Custom'
|
||||||
this.icon = 'openai.png'
|
this.icon = 'openai.png'
|
||||||
this.category = 'Chat Models'
|
this.category = 'Chat Models'
|
||||||
this.description = 'Wrapper around fine-tuned OpenAI LLM that use the Chat endpoint'
|
this.description = 'Custom/FineTuned model using OpenAI Chat compatible API'
|
||||||
this.baseClasses = [this.type, ...getBaseClasses(ChatOpenAI)]
|
this.baseClasses = [this.type, ...getBaseClasses(ChatOpenAI)]
|
||||||
this.credential = {
|
this.credential = {
|
||||||
label: 'Connect Credential',
|
label: 'Connect Credential',
|
||||||
name: 'credential',
|
name: 'credential',
|
||||||
type: 'credential',
|
type: 'credential',
|
||||||
credentialNames: ['openAIApi']
|
credentialNames: ['openAIApi'],
|
||||||
|
optional: true
|
||||||
}
|
}
|
||||||
this.inputs = [
|
this.inputs = [
|
||||||
{
|
{
|
||||||
@@ -146,4 +147,4 @@ class ChatOpenAIFineTuned_ChatModels implements INode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { nodeClass: ChatOpenAIFineTuned_ChatModels }
|
module.exports = { nodeClass: ChatOpenAICustom_ChatModels }
|
||||||
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Reference in New Issue
Block a user