Skip to content

Commit

Permalink
Merge pull request #946 from FlowiseAI/feature/OpenAI
Browse files Browse the repository at this point in the history
Feature/Update OpenAI models
  • Loading branch information
HenryHengZJ authored Sep 20, 2023
2 parents c0d9484 + 096451f commit 171c765
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class GoogleVertexAI_ChatModels implements INode {
const maxOutputTokens = nodeData.inputs?.maxOutputTokens as string
const topP = nodeData.inputs?.topP as string

const obj: Partial<GoogleVertexAIChatInput> = {
const obj: GoogleVertexAIChatInput<GoogleAuthOptions> = {
temperature: parseFloat(temperature),
model: modelName
}
Expand Down
20 changes: 8 additions & 12 deletions packages/components/nodes/llms/OpenAI/OpenAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class OpenAI_LLMs implements INode {
constructor() {
this.label = 'OpenAI'
this.name = 'openAI'
this.version = 1.0
this.version = 2.0
this.type = 'OpenAI'
this.icon = 'openai.png'
this.category = 'LLMs'
Expand All @@ -36,23 +36,19 @@ class OpenAI_LLMs implements INode {
type: 'options',
options: [
{
label: 'text-davinci-003',
name: 'text-davinci-003'
label: 'gpt-3.5-turbo-instruct',
name: 'gpt-3.5-turbo-instruct'
},
{
label: 'text-davinci-002',
name: 'text-davinci-002'
label: 'babbage-002',
name: 'babbage-002'
},
{
label: 'text-curie-001',
name: 'text-curie-001'
},
{
label: 'text-babbage-001',
name: 'text-babbage-001'
label: 'davinci-002',
name: 'davinci-002'
}
],
default: 'text-davinci-003',
default: 'gpt-3.5-turbo-instruct',
optional: true
},
{
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"google-auth-library": "^9.0.0",
"graphql": "^16.6.0",
"html-to-text": "^9.0.5",
"langchain": "^0.0.147",
"langchain": "^0.0.152",
"langfuse-langchain": "^1.0.14-alpha.0",
"langsmith": "^0.0.32",
"linkifyjs": "^4.1.1",
Expand Down
66 changes: 27 additions & 39 deletions packages/server/marketplaces/chatflows/Multiple VectorDB.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
"id": "openAI_2",
"label": "OpenAI",
"name": "openAI",
"version": 1,
"version": 2,
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
Expand All @@ -347,23 +347,19 @@
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
"label": "gpt-3.5-turbo-instruct",
"name": "gpt-3.5-turbo-instruct"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
"label": "babbage-002",
"name": "babbage-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
"label": "davinci-002",
"name": "davinci-002"
}
],
"default": "text-davinci-003",
"default": "gpt-3.5-turbo-instruct",
"optional": true,
"id": "openAI_2-input-modelName-options"
},
Expand Down Expand Up @@ -442,7 +438,7 @@
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
Expand Down Expand Up @@ -743,7 +739,7 @@
"id": "openAI_3",
"label": "OpenAI",
"name": "openAI",
"version": 1,
"version": 2,
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
Expand All @@ -762,23 +758,19 @@
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
"label": "gpt-3.5-turbo-instruct",
"name": "gpt-3.5-turbo-instruct"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
"label": "babbage-002",
"name": "babbage-002"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
"label": "davinci-002",
"name": "davinci-002"
}
],
"default": "text-davinci-003",
"default": "gpt-3.5-turbo-instruct",
"optional": true,
"id": "openAI_3-input-modelName-options"
},
Expand Down Expand Up @@ -857,7 +849,7 @@
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
Expand Down Expand Up @@ -1008,7 +1000,7 @@
"id": "openAI_4",
"label": "OpenAI",
"name": "openAI",
"version": 1,
"version": 2,
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
Expand All @@ -1027,23 +1019,19 @@
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
"label": "gpt-3.5-turbo-instruct",
"name": "gpt-3.5-turbo-instruct"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
"label": "babbage-002",
"name": "babbage-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
"label": "davinci-002",
"name": "davinci-002"
}
],
"default": "text-davinci-003",
"default": "gpt-3.5-turbo-instruct",
"optional": true,
"id": "openAI_4-input-modelName-options"
},
Expand Down Expand Up @@ -1122,7 +1110,7 @@
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
Expand Down
45 changes: 19 additions & 26 deletions packages/server/marketplaces/chatflows/Prompt Chaining.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
"id": "openAI_1",
"label": "OpenAI",
"name": "openAI",
"version": 1,
"version": 2,
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
Expand All @@ -315,23 +315,19 @@
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
"label": "gpt-3.5-turbo-instruct",
"name": "gpt-3.5-turbo-instruct"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
"label": "babbage-002",
"name": "babbage-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
"label": "davinci-002",
"name": "davinci-002"
}
],
"default": "text-davinci-003",
"default": "gpt-3.5-turbo-instruct",
"optional": true,
"id": "openAI_1-input-modelName-options"
},
Expand Down Expand Up @@ -410,7 +406,7 @@
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
Expand Down Expand Up @@ -452,7 +448,7 @@
"id": "openAI_2",
"label": "OpenAI",
"name": "openAI",
"version": 1,
"version": 2,
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
Expand All @@ -471,23 +467,19 @@
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
"label": "gpt-3.5-turbo-instruct",
"name": "gpt-3.5-turbo-instruct"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
"label": "babbage-002",
"name": "babbage-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
"label": "davinci-002",
"name": "davinci-002"
}
],
"default": "text-davinci-003",
"default": "gpt-3.5-turbo-instruct",
"optional": true,
"id": "openAI_2-input-modelName-options"
},
Expand Down Expand Up @@ -565,8 +557,9 @@
}
],
"inputAnchors": [],
"default": "gpt-3.5-turbo-instruct",
"inputs": {
"modelName": "text-davinci-003",
"modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
Expand Down
22 changes: 9 additions & 13 deletions packages/server/marketplaces/chatflows/Simple LLM Chain.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"id": "openAI_0",
"label": "OpenAI",
"name": "openAI",
"version": 1,
"version": 2,
"type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs",
Expand All @@ -174,23 +174,19 @@
"type": "options",
"options": [
{
"label": "text-davinci-003",
"name": "text-davinci-003"
},
{
"label": "text-davinci-002",
"name": "text-davinci-002"
"label": "gpt-3.5-turbo-instruct",
"name": "gpt-3.5-turbo-instruct"
},
{
"label": "text-curie-001",
"name": "text-curie-001"
"label": "babbage-002",
"name": "babbage-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
"label": "davinci-002",
"name": "davinci-002"
}
],
"default": "text-davinci-003",
"default": "gpt-3.5-turbo-instruct",
"optional": true,
"id": "openAI_0-input-modelName-options"
},
Expand Down Expand Up @@ -269,7 +265,7 @@
],
"inputAnchors": [],
"inputs": {
"modelName": "text-davinci-003",
"modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7,
"maxTokens": "",
"topP": "",
Expand Down
Loading

0 comments on commit 171c765

Please sign in to comment.