Merge pull request #946 from FlowiseAI/feature/OpenAI

Feature/Update OpenAI models
This commit is contained in:
Henry Heng 2023-09-21 00:05:08 +01:00 committed by GitHub
commit 171c765004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 74 additions and 105 deletions

View File

@ -114,7 +114,7 @@ class GoogleVertexAI_ChatModels implements INode {
const maxOutputTokens = nodeData.inputs?.maxOutputTokens as string const maxOutputTokens = nodeData.inputs?.maxOutputTokens as string
const topP = nodeData.inputs?.topP as string const topP = nodeData.inputs?.topP as string
const obj: Partial<GoogleVertexAIChatInput> = { const obj: GoogleVertexAIChatInput<GoogleAuthOptions> = {
temperature: parseFloat(temperature), temperature: parseFloat(temperature),
model: modelName model: modelName
} }

View File

@ -17,7 +17,7 @@ class OpenAI_LLMs implements INode {
constructor() { constructor() {
this.label = 'OpenAI' this.label = 'OpenAI'
this.name = 'openAI' this.name = 'openAI'
this.version = 1.0 this.version = 2.0
this.type = 'OpenAI' this.type = 'OpenAI'
this.icon = 'openai.png' this.icon = 'openai.png'
this.category = 'LLMs' this.category = 'LLMs'
@ -36,23 +36,19 @@ class OpenAI_LLMs implements INode {
type: 'options', type: 'options',
options: [ options: [
{ {
label: 'text-davinci-003', label: 'gpt-3.5-turbo-instruct',
name: 'text-davinci-003' name: 'gpt-3.5-turbo-instruct'
}, },
{ {
label: 'text-davinci-002', label: 'babbage-002',
name: 'text-davinci-002' name: 'babbage-002'
}, },
{ {
label: 'text-curie-001', label: 'davinci-002',
name: 'text-curie-001' name: 'davinci-002'
},
{
label: 'text-babbage-001',
name: 'text-babbage-001'
} }
], ],
default: 'text-davinci-003', default: 'gpt-3.5-turbo-instruct',
optional: true optional: true
}, },
{ {

View File

@ -42,7 +42,7 @@
"google-auth-library": "^9.0.0", "google-auth-library": "^9.0.0",
"graphql": "^16.6.0", "graphql": "^16.6.0",
"html-to-text": "^9.0.5", "html-to-text": "^9.0.5",
"langchain": "^0.0.147", "langchain": "^0.0.152",
"langfuse-langchain": "^1.0.14-alpha.0", "langfuse-langchain": "^1.0.14-alpha.0",
"langsmith": "^0.0.32", "langsmith": "^0.0.32",
"linkifyjs": "^4.1.1", "linkifyjs": "^4.1.1",

View File

@ -328,7 +328,7 @@
"id": "openAI_2", "id": "openAI_2",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -347,23 +347,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_2-input-modelName-options" "id": "openAI_2-input-modelName-options"
}, },
@ -442,7 +438,7 @@
], ],
"inputAnchors": [], "inputAnchors": [],
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",
@ -743,7 +739,7 @@
"id": "openAI_3", "id": "openAI_3",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -762,23 +758,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_3-input-modelName-options" "id": "openAI_3-input-modelName-options"
}, },
@ -857,7 +849,7 @@
], ],
"inputAnchors": [], "inputAnchors": [],
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",
@ -1008,7 +1000,7 @@
"id": "openAI_4", "id": "openAI_4",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -1027,23 +1019,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_4-input-modelName-options" "id": "openAI_4-input-modelName-options"
}, },
@ -1122,7 +1110,7 @@
], ],
"inputAnchors": [], "inputAnchors": [],
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",

View File

@ -296,7 +296,7 @@
"id": "openAI_1", "id": "openAI_1",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -315,23 +315,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_1-input-modelName-options" "id": "openAI_1-input-modelName-options"
}, },
@ -410,7 +406,7 @@
], ],
"inputAnchors": [], "inputAnchors": [],
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",
@ -452,7 +448,7 @@
"id": "openAI_2", "id": "openAI_2",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -471,23 +467,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_2-input-modelName-options" "id": "openAI_2-input-modelName-options"
}, },
@ -565,8 +557,9 @@
} }
], ],
"inputAnchors": [], "inputAnchors": [],
"default": "gpt-3.5-turbo-instruct",
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",

View File

@ -155,7 +155,7 @@
"id": "openAI_0", "id": "openAI_0",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -174,23 +174,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_0-input-modelName-options" "id": "openAI_0-input-modelName-options"
}, },
@ -269,7 +265,7 @@
], ],
"inputAnchors": [], "inputAnchors": [],
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",

View File

@ -115,7 +115,7 @@
"id": "openAI_0", "id": "openAI_0",
"label": "OpenAI", "label": "OpenAI",
"name": "openAI", "name": "openAI",
"version": 1, "version": 2,
"type": "OpenAI", "type": "OpenAI",
"baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"], "baseClasses": ["OpenAI", "BaseLLM", "BaseLanguageModel"],
"category": "LLMs", "category": "LLMs",
@ -134,23 +134,19 @@
"type": "options", "type": "options",
"options": [ "options": [
{ {
"label": "text-davinci-003", "label": "gpt-3.5-turbo-instruct",
"name": "text-davinci-003" "name": "gpt-3.5-turbo-instruct"
}, },
{ {
"label": "text-davinci-002", "label": "babbage-002",
"name": "text-davinci-002" "name": "babbage-002"
}, },
{ {
"label": "text-curie-001", "label": "davinci-002",
"name": "text-curie-001" "name": "davinci-002"
},
{
"label": "text-babbage-001",
"name": "text-babbage-001"
} }
], ],
"default": "text-davinci-003", "default": "gpt-3.5-turbo-instruct",
"optional": true, "optional": true,
"id": "openAI_0-input-modelName-options" "id": "openAI_0-input-modelName-options"
}, },
@ -229,7 +225,7 @@
], ],
"inputAnchors": [], "inputAnchors": [],
"inputs": { "inputs": {
"modelName": "text-davinci-003", "modelName": "gpt-3.5-turbo-instruct",
"temperature": 0.7, "temperature": 0.7,
"maxTokens": "", "maxTokens": "",
"topP": "", "topP": "",