Skip to content

Commit 776f818

Browse files
authored
Merge pull request #853 from FlowiseAI/feature/ChatOpenAI-FineTuned
Feature/Update Custom ChatOpenAI
2 parents c0672f7 + 1668419 commit 776f818

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/components/nodes/chatmodels/ChatOpenAIFineTuned/ChatOpenAIFineTuned.ts packages/components/nodes/chatmodels/ChatOpenAICustom/ChatOpenAICustom.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ICommonObject, INode, INodeData, INodeParams } from '../../../src/Inter
22
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'
33
import { ChatOpenAI, OpenAIChatInput } from 'langchain/chat_models/openai'
44

5-
class ChatOpenAIFineTuned_ChatModels implements INode {
5+
class ChatOpenAICustom_ChatModels implements INode {
66
label: string
77
name: string
88
version: number
@@ -15,19 +15,20 @@ class ChatOpenAIFineTuned_ChatModels implements INode {
1515
inputs: INodeParams[]
1616

1717
constructor() {
18-
this.label = 'ChatOpenAI Fine-Tuned'
19-
this.name = 'chatOpenAIFineTuned'
18+
this.label = 'ChatOpenAI Custom'
19+
this.name = 'chatOpenAICustom'
2020
this.version = 1.0
21-
this.type = 'ChatOpenAI-FineTuned'
21+
this.type = 'ChatOpenAI-Custom'
2222
this.icon = 'openai.png'
2323
this.category = 'Chat Models'
24-
this.description = 'Wrapper around fine-tuned OpenAI LLM that use the Chat endpoint'
24+
this.description = 'Custom/FineTuned model using OpenAI Chat compatible API'
2525
this.baseClasses = [this.type, ...getBaseClasses(ChatOpenAI)]
2626
this.credential = {
2727
label: 'Connect Credential',
2828
name: 'credential',
2929
type: 'credential',
30-
credentialNames: ['openAIApi']
30+
credentialNames: ['openAIApi'],
31+
optional: true
3132
}
3233
this.inputs = [
3334
{
@@ -146,4 +147,4 @@ class ChatOpenAIFineTuned_ChatModels implements INode {
146147
}
147148
}
148149

149-
module.exports = { nodeClass: ChatOpenAIFineTuned_ChatModels }
150+
module.exports = { nodeClass: ChatOpenAICustom_ChatModels }

0 commit comments

Comments
 (0)