mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
Fix merge conflicts
This commit is contained in:
@@ -5,6 +5,7 @@ PORT=3000
|
||||
# APIKEY_PATH=/your_api_key_path/.flowise
|
||||
# SECRETKEY_PATH=/your_api_key_path/.flowise
|
||||
# LOG_PATH=/your_log_path/.flowise/logs
|
||||
# BLOB_STORAGE_PATH=/your_database_path/.flowise/storage
|
||||
|
||||
# NUMBER_OF_PROXIES= 1
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -237,6 +237,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_1-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -257,7 +290,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -437,7 +472,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_2",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -584,6 +619,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_2-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -604,7 +672,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_2",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -545,6 +545,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_2-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -565,7 +598,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -597,7 +632,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -744,6 +779,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_1-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -764,7 +832,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -796,7 +866,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_3",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -943,6 +1013,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_3-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_3-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_3-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -963,7 +1066,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -334,6 +334,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -355,7 +388,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -324,6 +324,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -344,7 +377,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -400,6 +400,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -420,7 +453,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -499,6 +499,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -520,7 +553,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"name": "chatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
"category": "Chat Models",
|
||||
@@ -218,6 +218,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -238,7 +271,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -349,6 +349,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -370,7 +403,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"name": "chatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
"category": "Chat Models",
|
||||
@@ -363,6 +363,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -383,7 +416,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -305,6 +305,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -325,7 +358,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -642,6 +642,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -663,7 +696,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -371,7 +371,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -524,6 +524,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -545,7 +578,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -378,7 +378,7 @@
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"name": "chatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
"category": "Chat Models",
|
||||
@@ -524,6 +524,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -544,7 +577,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -910,7 +910,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -1063,6 +1063,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -1084,7 +1117,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -607,6 +607,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -628,7 +661,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -319,6 +319,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -340,7 +373,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -378,6 +378,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -399,7 +432,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -508,7 +508,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -661,6 +661,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -682,7 +715,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -608,6 +608,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -629,7 +662,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"name": "chatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
"category": "Chat Models",
|
||||
@@ -426,6 +426,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -446,7 +479,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -543,6 +543,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -564,7 +597,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -640,6 +640,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -661,7 +694,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -1013,7 +1048,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -1166,6 +1201,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_1-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -1187,7 +1255,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -1219,7 +1289,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_2",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -1372,6 +1442,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_2-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -1393,7 +1496,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -428,6 +428,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -448,7 +481,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -582,6 +582,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -603,7 +636,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -635,7 +670,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -788,6 +823,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_1-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -809,7 +877,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -359,6 +359,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -380,7 +413,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -162,6 +162,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -182,7 +215,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -328,6 +328,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -349,7 +382,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -381,7 +416,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -534,6 +569,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_1-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -555,7 +623,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -1313,7 +1383,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_2",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -1466,6 +1536,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_2-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_2-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -1487,7 +1590,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -169,6 +169,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -190,7 +223,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -169,6 +169,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -190,7 +223,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -231,6 +231,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -251,7 +284,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -274,6 +274,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -294,7 +327,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
@@ -433,7 +468,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_1",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
|
||||
@@ -580,6 +615,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_1-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_1-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -600,7 +668,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -394,7 +394,7 @@
|
||||
"data": {
|
||||
"id": "chatOpenAI_0",
|
||||
"label": "ChatOpenAI",
|
||||
"version": 4,
|
||||
"version": 5,
|
||||
"name": "chatOpenAI",
|
||||
"type": "ChatOpenAI",
|
||||
"baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
|
||||
@@ -547,6 +547,39 @@
|
||||
"optional": true,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-baseOptions-json"
|
||||
},
|
||||
{
|
||||
"label": "Allow Image Uploads",
|
||||
"name": "allowImageUploads",
|
||||
"type": "boolean",
|
||||
"description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
|
||||
"default": false,
|
||||
"optional": true,
|
||||
"id": "chatOpenAI_0-input-allowImageUploads-boolean"
|
||||
},
|
||||
{
|
||||
"label": "Image Resolution",
|
||||
"description": "This parameter controls the resolution in which the model views the image.",
|
||||
"name": "imageResolution",
|
||||
"type": "options",
|
||||
"options": [
|
||||
{
|
||||
"label": "Low",
|
||||
"name": "low"
|
||||
},
|
||||
{
|
||||
"label": "High",
|
||||
"name": "high"
|
||||
},
|
||||
{
|
||||
"label": "Auto",
|
||||
"name": "auto"
|
||||
}
|
||||
],
|
||||
"default": "low",
|
||||
"optional": false,
|
||||
"additionalParams": true,
|
||||
"id": "chatOpenAI_0-input-imageResolution-options"
|
||||
}
|
||||
],
|
||||
"inputAnchors": [
|
||||
@@ -568,7 +601,9 @@
|
||||
"presencePenalty": "",
|
||||
"timeout": "",
|
||||
"basepath": "",
|
||||
"baseOptions": ""
|
||||
"baseOptions": "",
|
||||
"allowImageUploads": true,
|
||||
"imageResolution": "low"
|
||||
},
|
||||
"outputAnchors": [
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "flowise",
|
||||
"version": "1.5.1",
|
||||
"version": "1.6.0",
|
||||
"description": "Flowiseai Server",
|
||||
"main": "dist/index",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -48,6 +48,7 @@
|
||||
"@oclif/core": "^1.13.10",
|
||||
"async-mutex": "^0.4.0",
|
||||
"axios": "1.6.2",
|
||||
"content-disposition": "0.5.4",
|
||||
"cors": "^2.8.5",
|
||||
"crypto-js": "^4.1.1",
|
||||
"dotenv": "^16.0.0",
|
||||
@@ -70,6 +71,7 @@
|
||||
"winston": "^3.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/content-disposition": "0.5.8",
|
||||
"@types/cors": "^2.8.12",
|
||||
"@types/crypto-js": "^4.1.1",
|
||||
"@types/multer": "^1.4.7",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ICommonObject, INode, INodeData as INodeDataFromComponent, INodeParams } from 'flowise-components'
|
||||
import { ICommonObject, IFileUpload, INode, INodeData as INodeDataFromComponent, INodeParams } from 'flowise-components'
|
||||
|
||||
export type MessageType = 'apiMessage' | 'userMessage'
|
||||
|
||||
@@ -36,6 +36,7 @@ export interface IChatMessage {
|
||||
sourceDocuments?: string
|
||||
usedTools?: string
|
||||
fileAnnotations?: string
|
||||
fileUploads?: string
|
||||
chatType: string
|
||||
chatId: string
|
||||
memoryType?: string
|
||||
@@ -191,6 +192,7 @@ export interface IncomingInput {
|
||||
socketIOClientId?: string
|
||||
chatId?: string
|
||||
stopNodeId?: string
|
||||
uploads?: IFileUpload[]
|
||||
}
|
||||
|
||||
export interface IActiveChatflows {
|
||||
@@ -227,3 +229,8 @@ export interface ICredentialReqBody {
|
||||
export interface ICredentialReturnResponse extends ICredential {
|
||||
plainDataObj: ICredentialDataDecrypted
|
||||
}
|
||||
|
||||
export interface IUploadFileSizeAndTypes {
|
||||
fileTypes: string[]
|
||||
maxUploadSize: number
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export class NodesPool {
|
||||
}
|
||||
}
|
||||
|
||||
const skipCategories = ['Analytic']
|
||||
const skipCategories = ['Analytic', 'SpeechToText']
|
||||
if (!skipCategories.includes(newNodeInstance.category)) {
|
||||
this.componentNodes[newNodeInstance.name] = newNodeInstance
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ export default class Start extends Command {
|
||||
CORS_ORIGINS: Flags.string(),
|
||||
IFRAME_ORIGINS: Flags.string(),
|
||||
DEBUG: Flags.string(),
|
||||
BLOB_STORAGE_PATH: Flags.string(),
|
||||
APIKEY_PATH: Flags.string(),
|
||||
SECRETKEY_PATH: Flags.string(),
|
||||
FLOWISE_SECRETKEY_OVERWRITE: Flags.string(),
|
||||
@@ -92,6 +93,9 @@ export default class Start extends Command {
|
||||
if (flags.FLOWISE_PASSWORD) process.env.FLOWISE_PASSWORD = flags.FLOWISE_PASSWORD
|
||||
if (flags.APIKEY_PATH) process.env.APIKEY_PATH = flags.APIKEY_PATH
|
||||
|
||||
// Storage
|
||||
if (flags.BLOB_STORAGE_PATH) process.env.BLOB_STORAGE_PATH = flags.BLOB_STORAGE_PATH
|
||||
|
||||
//API Configuration
|
||||
if (flags.FLOWISE_FILE_SIZE_LIMIT) process.env.FLOWISE_FILE_SIZE_LIMIT = flags.FLOWISE_FILE_SIZE_LIMIT
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ export class ChatFlow implements IChatFlow {
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
analytic?: string
|
||||
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
speechToText?: string
|
||||
|
||||
@CreateDateColumn()
|
||||
createdDate: Date
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ export class ChatMessage implements IChatMessage {
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
fileAnnotations?: string
|
||||
|
||||
@Column({ nullable: true, type: 'text' })
|
||||
fileUploads?: string
|
||||
|
||||
@Column()
|
||||
chatType: string
|
||||
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddFileUploadsToChatMessage1701788586491 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
const columnExists = await queryRunner.hasColumn('chat_message', 'fileUploads')
|
||||
if (!columnExists) queryRunner.query(`ALTER TABLE \`chat_message\` ADD COLUMN \`fileUploads\` TEXT;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`chat_message\` DROP COLUMN \`fileUploads\`;`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddSpeechToText1706364937060 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
const columnExists = await queryRunner.hasColumn('chat_flow', 'speechToText')
|
||||
if (!columnExists) queryRunner.query(`ALTER TABLE \`chat_flow\` ADD COLUMN \`speechToText\` TEXT;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`chat_flow\` DROP COLUMN \`speechToText\`;`)
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,9 @@ import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEnt
|
||||
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
||||
import { AddCategoryToChatFlow1699900910291 } from './1699900910291-AddCategoryToChatFlow'
|
||||
import { AddFileAnnotationsToChatMessage1700271021237 } from './1700271021237-AddFileAnnotationsToChatMessage'
|
||||
import { AddFileUploadsToChatMessage1701788586491 } from './1701788586491-AddFileUploadsToChatMessage'
|
||||
import { AddVariableEntity1699325775451 } from './1702200925471-AddVariableEntity'
|
||||
import { AddSpeechToText1706364937060 } from './1706364937060-AddSpeechToText'
|
||||
import { AddFeedback1707213626553 } from './1707213626553-AddFeedback'
|
||||
|
||||
export const mysqlMigrations = [
|
||||
@@ -26,6 +28,8 @@ export const mysqlMigrations = [
|
||||
AddUsedToolsToChatMessage1699481607341,
|
||||
AddCategoryToChatFlow1699900910291,
|
||||
AddFileAnnotationsToChatMessage1700271021237,
|
||||
AddFileUploadsToChatMessage1701788586491,
|
||||
AddVariableEntity1699325775451,
|
||||
AddSpeechToText1706364937060,
|
||||
AddFeedback1707213626553
|
||||
]
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddFileUploadsToChatMessage1701788586491 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "chat_message" ADD COLUMN IF NOT EXISTS "fileUploads" TEXT;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "chat_message" DROP COLUMN "fileUploads";`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddSpeechToText1706364937060 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "chat_flow" ADD COLUMN IF NOT EXISTS "speechToText" TEXT;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "chat_flow" DROP COLUMN "speechToText";`)
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,9 @@ import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEnt
|
||||
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
||||
import { AddCategoryToChatFlow1699900910291 } from './1699900910291-AddCategoryToChatFlow'
|
||||
import { AddFileAnnotationsToChatMessage1700271021237 } from './1700271021237-AddFileAnnotationsToChatMessage'
|
||||
import { AddFileUploadsToChatMessage1701788586491 } from './1701788586491-AddFileUploadsToChatMessage'
|
||||
import { AddVariableEntity1699325775451 } from './1702200925471-AddVariableEntity'
|
||||
import { AddSpeechToText1706364937060 } from './1706364937060-AddSpeechToText'
|
||||
import { AddFeedback1707213601923 } from './1707213601923-AddFeedback'
|
||||
|
||||
export const postgresMigrations = [
|
||||
@@ -26,6 +28,8 @@ export const postgresMigrations = [
|
||||
AddUsedToolsToChatMessage1699481607341,
|
||||
AddCategoryToChatFlow1699900910291,
|
||||
AddFileAnnotationsToChatMessage1700271021237,
|
||||
AddFileUploadsToChatMessage1701788586491,
|
||||
AddVariableEntity1699325775451,
|
||||
AddSpeechToText1706364937060,
|
||||
AddFeedback1707213601923
|
||||
]
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddFileUploadsToChatMessage1701788586491 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "temp_chat_message" ("id" varchar PRIMARY KEY NOT NULL, "role" varchar NOT NULL, "chatflowid" varchar NOT NULL, "content" text NOT NULL, "sourceDocuments" text, "usedTools" text, "fileAnnotations" text, "fileUploads" text, "createdDate" datetime NOT NULL DEFAULT (datetime('now')), "chatType" VARCHAR NOT NULL DEFAULT 'INTERNAL', "chatId" VARCHAR NOT NULL, "memoryType" VARCHAR, "sessionId" VARCHAR);`
|
||||
)
|
||||
await queryRunner.query(
|
||||
`INSERT INTO "temp_chat_message" ("id", "role", "chatflowid", "content", "sourceDocuments", "fileAnnotations", "usedTools", "createdDate", "chatType", "chatId", "memoryType", "sessionId") SELECT "id", "role", "chatflowid", "content", "sourceDocuments", "usedTools", "fileAnnotations", "createdDate", "chatType", "chatId", "memoryType", "sessionId" FROM "chat_message";`
|
||||
)
|
||||
await queryRunner.query(`DROP TABLE "chat_message";`)
|
||||
await queryRunner.query(`ALTER TABLE "temp_chat_message" RENAME TO "chat_message";`)
|
||||
await queryRunner.query(`CREATE INDEX "IDX_e574527322272fd838f4f0f3d3" ON "chat_message" ("chatflowid") ;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP TABLE IF EXISTS "temp_chat_message";`)
|
||||
await queryRunner.query(`ALTER TABLE "chat_message" DROP COLUMN "fileUploads";`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm'
|
||||
|
||||
export class AddSpeechToText1706364937060 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "chat_flow" ADD COLUMN "speechToText" TEXT;`)
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "chat_flow" DROP COLUMN "speechToText";`)
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,9 @@ import { AddAssistantEntity1699325775451 } from './1699325775451-AddAssistantEnt
|
||||
import { AddUsedToolsToChatMessage1699481607341 } from './1699481607341-AddUsedToolsToChatMessage'
|
||||
import { AddCategoryToChatFlow1699900910291 } from './1699900910291-AddCategoryToChatFlow'
|
||||
import { AddFileAnnotationsToChatMessage1700271021237 } from './1700271021237-AddFileAnnotationsToChatMessage'
|
||||
import { AddFileUploadsToChatMessage1701788586491 } from './1701788586491-AddFileUploadsToChatMessage'
|
||||
import { AddVariableEntity1699325775451 } from './1702200925471-AddVariableEntity'
|
||||
import { AddSpeechToText1706364937060 } from './1706364937060-AddSpeechToText'
|
||||
import { AddFeedback1707213619308 } from './1707213619308-AddFeedback'
|
||||
|
||||
export const sqliteMigrations = [
|
||||
@@ -26,6 +28,8 @@ export const sqliteMigrations = [
|
||||
AddUsedToolsToChatMessage1699481607341,
|
||||
AddCategoryToChatFlow1699900910291,
|
||||
AddFileAnnotationsToChatMessage1700271021237,
|
||||
AddFileUploadsToChatMessage1701788586491,
|
||||
AddVariableEntity1699325775451,
|
||||
AddSpeechToText1706364937060,
|
||||
AddFeedback1707213619308
|
||||
]
|
||||
|
||||
+255
-29
@@ -5,12 +5,13 @@ import cors from 'cors'
|
||||
import http from 'http'
|
||||
import * as fs from 'fs'
|
||||
import basicAuth from 'express-basic-auth'
|
||||
import contentDisposition from 'content-disposition'
|
||||
import { Server } from 'socket.io'
|
||||
import logger from './utils/logger'
|
||||
import { expressRequestLogger } from './utils/logger'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import OpenAI from 'openai'
|
||||
import { FindOptionsWhere, MoreThanOrEqual, LessThanOrEqual, IsNull, Between } from 'typeorm'
|
||||
import { FindOptionsWhere, MoreThanOrEqual, LessThanOrEqual, Between } from 'typeorm'
|
||||
import {
|
||||
IChatFlow,
|
||||
IncomingInput,
|
||||
@@ -23,7 +24,8 @@ import {
|
||||
IChatMessageFeedback,
|
||||
IDepthQueue,
|
||||
INodeDirectedGraph,
|
||||
ChatMessageRatingType
|
||||
ChatMessageRatingType,
|
||||
IUploadFileSizeAndTypes
|
||||
} from './Interface'
|
||||
import {
|
||||
getNodeModulesPackagePath,
|
||||
@@ -48,6 +50,7 @@ import {
|
||||
getAllConnectedNodes,
|
||||
clearSessionMemory,
|
||||
findMemoryNode,
|
||||
deleteFolderRecursive,
|
||||
getTelemetryFlowObj,
|
||||
getAppVersion
|
||||
} from './utils'
|
||||
@@ -62,7 +65,18 @@ import { Tool } from './database/entities/Tool'
|
||||
import { Assistant } from './database/entities/Assistant'
|
||||
import { ChatflowPool } from './ChatflowPool'
|
||||
import { CachePool } from './CachePool'
|
||||
import { ICommonObject, IMessage, INodeOptionsValue, handleEscapeCharacters, webCrawl, xmlScrape } from 'flowise-components'
|
||||
import {
|
||||
ICommonObject,
|
||||
IMessage,
|
||||
INodeOptionsValue,
|
||||
INodeParams,
|
||||
handleEscapeCharacters,
|
||||
convertSpeechToText,
|
||||
xmlScrape,
|
||||
webCrawl,
|
||||
getStoragePath,
|
||||
IFileUpload
|
||||
} from 'flowise-components'
|
||||
import { createRateLimiter, getRateLimiter, initializeRateLimiter } from './utils/rateLimit'
|
||||
import { addAPIKey, compareKeys, deleteAPIKey, getApiKey, getAPIKeys, updateAPIKey } from './utils/apiKey'
|
||||
import { sanitizeMiddleware, getCorsOptions, getAllowedIframeOrigins } from './utils/XSS'
|
||||
@@ -171,9 +185,11 @@ export class App {
|
||||
'/api/v1/node-icon/',
|
||||
'/api/v1/components-credentials-icon/',
|
||||
'/api/v1/chatflows-streaming',
|
||||
'/api/v1/chatflows-uploads',
|
||||
'/api/v1/openai-assistants-file',
|
||||
'/api/v1/ip',
|
||||
'/api/v1/feedback'
|
||||
'/api/v1/feedback',
|
||||
'/api/v1/get-upload-file',
|
||||
'/api/v1/ip'
|
||||
]
|
||||
this.app.use((req, res, next) => {
|
||||
if (req.url.includes('/api/v1/')) {
|
||||
@@ -312,7 +328,10 @@ export class App {
|
||||
// execute custom function node
|
||||
this.app.post('/api/v1/node-custom-function', async (req: Request, res: Response) => {
|
||||
const body = req.body
|
||||
const nodeData = { inputs: body }
|
||||
const functionInputVariables = Object.fromEntries(
|
||||
[...(body?.javascriptFunction ?? '').matchAll(/\$([a-zA-Z0-9_]+)/g)].map((g) => [g[1], undefined])
|
||||
)
|
||||
const nodeData = { inputs: { functionInputVariables, ...body } }
|
||||
if (Object.prototype.hasOwnProperty.call(this.nodesPool.componentNodes, 'customFunction')) {
|
||||
try {
|
||||
const nodeInstanceFilePath = this.nodesPool.componentNodes['customFunction'].filePath as string
|
||||
@@ -393,10 +412,13 @@ export class App {
|
||||
id: req.params.id
|
||||
})
|
||||
if (!chatflow) return res.status(404).send(`Chatflow ${req.params.id} not found`)
|
||||
if (chatflow.chatbotConfig) {
|
||||
const uploadsConfig = await this.getUploadsConfig(req.params.id)
|
||||
// even if chatbotConfig is not set but uploads are enabled
|
||||
// send uploadsConfig to the chatbot
|
||||
if (chatflow.chatbotConfig || uploadsConfig) {
|
||||
try {
|
||||
const parsedConfig = JSON.parse(chatflow.chatbotConfig)
|
||||
return res.json(parsedConfig)
|
||||
const parsedConfig = chatflow.chatbotConfig ? JSON.parse(chatflow.chatbotConfig) : {}
|
||||
return res.json({ ...parsedConfig, uploads: uploadsConfig })
|
||||
} catch (e) {
|
||||
return res.status(500).send(`Error parsing Chatbot Config for Chatflow ${req.params.id}`)
|
||||
}
|
||||
@@ -456,6 +478,15 @@ export class App {
|
||||
// Delete chatflow via id
|
||||
this.app.delete('/api/v1/chatflows/:id', async (req: Request, res: Response) => {
|
||||
const results = await this.AppDataSource.getRepository(ChatFlow).delete({ id: req.params.id })
|
||||
|
||||
try {
|
||||
// Delete all uploads corresponding to this chatflow
|
||||
const directory = path.join(getStoragePath(), req.params.id)
|
||||
deleteFolderRecursive(directory)
|
||||
} catch (e) {
|
||||
logger.error(`[server]: Error deleting file storage for chatflow ${req.params.id}: ${e}`)
|
||||
}
|
||||
|
||||
return res.json(results)
|
||||
})
|
||||
|
||||
@@ -506,6 +537,16 @@ export class App {
|
||||
return res.json(obj)
|
||||
})
|
||||
|
||||
// Check if chatflow valid for uploads
|
||||
this.app.get('/api/v1/chatflows-uploads/:id', async (req: Request, res: Response) => {
|
||||
try {
|
||||
const uploadsConfig = await this.getUploadsConfig(req.params.id)
|
||||
return res.json(uploadsConfig)
|
||||
} catch (e) {
|
||||
return res.status(500).send(e)
|
||||
}
|
||||
})
|
||||
|
||||
// ----------------------------------------
|
||||
// ChatMessage
|
||||
// ----------------------------------------
|
||||
@@ -609,6 +650,16 @@ export class App {
|
||||
const feedbackDeleteOptions: FindOptionsWhere<ChatMessageFeedback> = { chatId }
|
||||
await this.AppDataSource.getRepository(ChatMessageFeedback).delete(feedbackDeleteOptions)
|
||||
|
||||
// Delete all uploads corresponding to this chatflow/chatId
|
||||
if (chatId) {
|
||||
try {
|
||||
const directory = path.join(getStoragePath(), chatflowid, chatId)
|
||||
deleteFolderRecursive(directory)
|
||||
} catch (e) {
|
||||
logger.error(`[server]: Error deleting file storage for chatflow ${chatflowid}, chatId ${chatId}: ${e}`)
|
||||
}
|
||||
}
|
||||
|
||||
const results = await this.AppDataSource.getRepository(ChatMessage).delete(deleteOptions)
|
||||
return res.json(results)
|
||||
})
|
||||
@@ -1153,6 +1204,11 @@ export class App {
|
||||
}
|
||||
})
|
||||
|
||||
function streamFileToUser(res: Response, filePath: string) {
|
||||
const fileStream = fs.createReadStream(filePath)
|
||||
fileStream.pipe(res)
|
||||
}
|
||||
|
||||
// Download file from assistant
|
||||
this.app.post('/api/v1/openai-assistants-file', async (req: Request, res: Response) => {
|
||||
const filePath = path.join(getUserHome(), '.flowise', 'openai-assistant', req.body.fileName)
|
||||
@@ -1162,9 +1218,48 @@ export class App {
|
||||
if (filePath.includes('..')) return res.status(500).send(`Invalid file path`)
|
||||
//only return from the .flowise openai-assistant folder
|
||||
if (!(filePath.includes('.flowise') && filePath.includes('openai-assistant'))) return res.status(500).send(`Invalid file path`)
|
||||
res.setHeader('Content-Disposition', 'attachment; filename=' + path.basename(filePath))
|
||||
const fileStream = fs.createReadStream(filePath)
|
||||
fileStream.pipe(res)
|
||||
|
||||
if (fs.existsSync(filePath)) {
|
||||
res.setHeader('Content-Disposition', contentDisposition(path.basename(filePath)))
|
||||
streamFileToUser(res, filePath)
|
||||
} else {
|
||||
return res.status(404).send(`File ${req.body.fileName} not found`)
|
||||
}
|
||||
})
|
||||
|
||||
this.app.get('/api/v1/get-upload-path', async (req: Request, res: Response) => {
|
||||
return res.json({
|
||||
storagePath: getStoragePath()
|
||||
})
|
||||
})
|
||||
|
||||
// stream uploaded image
|
||||
this.app.get('/api/v1/get-upload-file', async (req: Request, res: Response) => {
|
||||
try {
|
||||
if (!req.query.chatflowId || !req.query.chatId || !req.query.fileName) {
|
||||
return res.status(500).send(`Invalid file path`)
|
||||
}
|
||||
const chatflowId = req.query.chatflowId as string
|
||||
const chatId = req.query.chatId as string
|
||||
const fileName = req.query.fileName as string
|
||||
|
||||
const filePath = path.join(getStoragePath(), chatflowId, chatId, fileName)
|
||||
//raise error if file path is not absolute
|
||||
if (!path.isAbsolute(filePath)) return res.status(500).send(`Invalid file path`)
|
||||
//raise error if file path contains '..'
|
||||
if (filePath.includes('..')) return res.status(500).send(`Invalid file path`)
|
||||
//only return from the storage folder
|
||||
if (!filePath.startsWith(getStoragePath())) return res.status(500).send(`Invalid file path`)
|
||||
|
||||
if (fs.existsSync(filePath)) {
|
||||
res.setHeader('Content-Disposition', contentDisposition(path.basename(filePath)))
|
||||
streamFileToUser(res, filePath)
|
||||
} else {
|
||||
return res.status(404).send(`File ${fileName} not found`)
|
||||
}
|
||||
} catch (error) {
|
||||
return res.status(500).send(`Invalid file path`)
|
||||
}
|
||||
})
|
||||
|
||||
// ----------------------------------------
|
||||
@@ -1222,18 +1317,22 @@ export class App {
|
||||
// ----------------------------------------
|
||||
|
||||
this.app.get('/api/v1/fetch-links', async (req: Request, res: Response) => {
|
||||
const url = decodeURIComponent(req.query.url as string)
|
||||
const relativeLinksMethod = req.query.relativeLinksMethod as string
|
||||
if (!relativeLinksMethod) {
|
||||
return res.status(500).send('Please choose a Relative Links Method in Additional Parameters.')
|
||||
try {
|
||||
const url = decodeURIComponent(req.query.url as string)
|
||||
const relativeLinksMethod = req.query.relativeLinksMethod as string
|
||||
if (!relativeLinksMethod) {
|
||||
return res.status(500).send('Please choose a Relative Links Method in Additional Parameters.')
|
||||
}
|
||||
|
||||
const limit = parseInt(req.query.limit as string)
|
||||
if (process.env.DEBUG === 'true') console.info(`Start ${relativeLinksMethod}`)
|
||||
const links: string[] = relativeLinksMethod === 'webCrawl' ? await webCrawl(url, limit) : await xmlScrape(url, limit)
|
||||
if (process.env.DEBUG === 'true') console.info(`Finish ${relativeLinksMethod}`)
|
||||
|
||||
res.json({ status: 'OK', links })
|
||||
} catch (e: any) {
|
||||
return res.status(500).send('Could not fetch links from the URL.')
|
||||
}
|
||||
|
||||
const limit = parseInt(req.query.limit as string)
|
||||
if (process.env.DEBUG === 'true') console.info(`Start ${relativeLinksMethod}`)
|
||||
const links: string[] = relativeLinksMethod === 'webCrawl' ? await webCrawl(url, limit) : await xmlScrape(url, limit)
|
||||
if (process.env.DEBUG === 'true') console.info(`Finish ${relativeLinksMethod}`)
|
||||
|
||||
res.json({ status: 'OK', links })
|
||||
})
|
||||
|
||||
// ----------------------------------------
|
||||
@@ -1496,6 +1595,74 @@ export class App {
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that checks if uploads are enabled in the chatflow
|
||||
* @param {string} chatflowid
|
||||
*/
|
||||
async getUploadsConfig(chatflowid: string): Promise<any> {
|
||||
const chatflow = await this.AppDataSource.getRepository(ChatFlow).findOneBy({
|
||||
id: chatflowid
|
||||
})
|
||||
if (!chatflow) return `Chatflow ${chatflowid} not found`
|
||||
|
||||
const uploadAllowedNodes = ['llmChain', 'conversationChain', 'mrklAgentChat', 'conversationalAgent']
|
||||
const uploadProcessingNodes = ['chatOpenAI']
|
||||
|
||||
const flowObj = JSON.parse(chatflow.flowData)
|
||||
const imgUploadSizeAndTypes: IUploadFileSizeAndTypes[] = []
|
||||
|
||||
let isSpeechToTextEnabled = false
|
||||
if (chatflow.speechToText) {
|
||||
const speechToTextProviders = JSON.parse(chatflow.speechToText)
|
||||
for (const provider in speechToTextProviders) {
|
||||
if (provider !== 'none') {
|
||||
const providerObj = speechToTextProviders[provider]
|
||||
if (providerObj.status) {
|
||||
isSpeechToTextEnabled = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let isImageUploadAllowed = false
|
||||
const nodes: IReactFlowNode[] = flowObj.nodes
|
||||
|
||||
/*
|
||||
* Condition for isImageUploadAllowed
|
||||
* 1.) one of the uploadAllowedNodes exists
|
||||
* 2.) one of the uploadProcessingNodes exists + allowImageUploads is ON
|
||||
*/
|
||||
if (!nodes.some((node) => uploadAllowedNodes.includes(node.data.name))) {
|
||||
return {
|
||||
isSpeechToTextEnabled,
|
||||
isImageUploadAllowed: false,
|
||||
imgUploadSizeAndTypes
|
||||
}
|
||||
}
|
||||
|
||||
nodes.forEach((node: IReactFlowNode) => {
|
||||
if (uploadProcessingNodes.indexOf(node.data.name) > -1) {
|
||||
// TODO: for now the maxUploadSize is hardcoded to 5MB, we need to add it to the node properties
|
||||
node.data.inputParams.map((param: INodeParams) => {
|
||||
if (param.name === 'allowImageUploads' && node.data.inputs?.['allowImageUploads']) {
|
||||
imgUploadSizeAndTypes.push({
|
||||
fileTypes: 'image/gif;image/jpeg;image/png;image/webp;'.split(';'),
|
||||
maxUploadSize: 5
|
||||
})
|
||||
isImageUploadAllowed = true
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
isSpeechToTextEnabled,
|
||||
isImageUploadAllowed,
|
||||
imgUploadSizeAndTypes
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method that get chat messages.
|
||||
* @param {string} chatflowid
|
||||
@@ -1801,6 +1968,57 @@ export class App {
|
||||
if (!isKeyValidated) return res.status(401).send('Unauthorized')
|
||||
}
|
||||
|
||||
let fileUploads: IFileUpload[] = []
|
||||
if (incomingInput.uploads) {
|
||||
fileUploads = incomingInput.uploads
|
||||
for (let i = 0; i < fileUploads.length; i += 1) {
|
||||
const upload = fileUploads[i]
|
||||
if ((upload.type === 'file' || upload.type === 'audio') && upload.data) {
|
||||
const filename = upload.name
|
||||
const dir = path.join(getStoragePath(), chatflowid, chatId)
|
||||
if (!fs.existsSync(dir)) {
|
||||
fs.mkdirSync(dir, { recursive: true })
|
||||
}
|
||||
const filePath = path.join(dir, filename)
|
||||
const splitDataURI = upload.data.split(',')
|
||||
const bf = Buffer.from(splitDataURI.pop() || '', 'base64')
|
||||
fs.writeFileSync(filePath, bf)
|
||||
|
||||
// Omit upload.data since we don't store the content in database
|
||||
upload.type = 'stored-file'
|
||||
fileUploads[i] = omit(upload, ['data'])
|
||||
}
|
||||
|
||||
// Run Speech to Text conversion
|
||||
if (upload.mime === 'audio/webm') {
|
||||
let speechToTextConfig: ICommonObject = {}
|
||||
if (chatflow.speechToText) {
|
||||
const speechToTextProviders = JSON.parse(chatflow.speechToText)
|
||||
for (const provider in speechToTextProviders) {
|
||||
const providerObj = speechToTextProviders[provider]
|
||||
if (providerObj.status) {
|
||||
speechToTextConfig = providerObj
|
||||
speechToTextConfig['name'] = provider
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if (speechToTextConfig) {
|
||||
const options: ICommonObject = {
|
||||
chatId,
|
||||
chatflowid,
|
||||
appDataSource: this.AppDataSource,
|
||||
databaseEntities: databaseEntities
|
||||
}
|
||||
const speechToTextResult = await convertSpeechToText(upload, speechToTextConfig, options)
|
||||
if (speechToTextResult) {
|
||||
incomingInput.question = speechToTextResult
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let isStreamValid = false
|
||||
|
||||
const files = (req.files as any[]) || []
|
||||
@@ -1966,7 +2184,10 @@ export class App {
|
||||
chatflowid,
|
||||
this.AppDataSource,
|
||||
incomingInput?.overrideConfig,
|
||||
this.cachePool
|
||||
this.cachePool,
|
||||
false,
|
||||
undefined,
|
||||
incomingInput.uploads
|
||||
)
|
||||
|
||||
const nodeToExecute =
|
||||
@@ -2005,6 +2226,7 @@ export class App {
|
||||
appDataSource: this.AppDataSource,
|
||||
databaseEntities,
|
||||
analytic: chatflow.analytic,
|
||||
uploads: incomingInput.uploads,
|
||||
socketIO,
|
||||
socketIOClientId: incomingInput.socketIOClientId
|
||||
})
|
||||
@@ -2015,7 +2237,8 @@ export class App {
|
||||
logger,
|
||||
appDataSource: this.AppDataSource,
|
||||
databaseEntities,
|
||||
analytic: chatflow.analytic
|
||||
analytic: chatflow.analytic,
|
||||
uploads: incomingInput.uploads
|
||||
})
|
||||
|
||||
result = typeof result === 'string' ? { text: result } : result
|
||||
@@ -2033,9 +2256,10 @@ export class App {
|
||||
chatId,
|
||||
memoryType,
|
||||
sessionId,
|
||||
createdDate: userMessageDateTime
|
||||
createdDate: userMessageDateTime,
|
||||
fileUploads: incomingInput.uploads ? JSON.stringify(fileUploads) : undefined
|
||||
}
|
||||
const newMessage = await this.addChatMessage(userMessage)
|
||||
await this.addChatMessage(userMessage)
|
||||
|
||||
let resultText = ''
|
||||
if (result.text) resultText = result.text
|
||||
@@ -2055,7 +2279,6 @@ export class App {
|
||||
if (result?.usedTools) apiMessage.usedTools = JSON.stringify(result.usedTools)
|
||||
if (result?.fileAnnotations) apiMessage.fileAnnotations = JSON.stringify(result.fileAnnotations)
|
||||
const chatMessage = await this.addChatMessage(apiMessage)
|
||||
result.chatMessageId = chatMessage.id
|
||||
|
||||
logger.debug(`[server]: Finished running ${nodeToExecuteData.label} (${nodeToExecuteData.id})`)
|
||||
await this.telemetry.sendTelemetry('prediction_sent', {
|
||||
@@ -2067,8 +2290,11 @@ export class App {
|
||||
})
|
||||
|
||||
// Prepare response
|
||||
// return the question in the response
|
||||
// this is used when input text is empty but question is in audio format
|
||||
result.question = incomingInput.question
|
||||
result.chatId = chatId
|
||||
if (newMessage.id && !isInternal) result.messageId = newMessage.id
|
||||
result.chatMessageId = chatMessage.id
|
||||
if (sessionId) result.sessionId = sessionId
|
||||
if (memoryType) result.memoryType = memoryType
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ import {
|
||||
ICommonObject,
|
||||
IDatabaseEntity,
|
||||
IMessage,
|
||||
FlowiseMemory
|
||||
FlowiseMemory,
|
||||
IFileUpload
|
||||
} from 'flowise-components'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { AES, enc } from 'crypto-js'
|
||||
@@ -279,7 +280,8 @@ export const buildFlow = async (
|
||||
overrideConfig?: ICommonObject,
|
||||
cachePool?: CachePool,
|
||||
isUpsert?: boolean,
|
||||
stopNodeId?: string
|
||||
stopNodeId?: string,
|
||||
uploads?: IFileUpload[]
|
||||
) => {
|
||||
const flowNodes = cloneDeep(reactFlowNodes)
|
||||
|
||||
@@ -325,7 +327,8 @@ export const buildFlow = async (
|
||||
appDataSource,
|
||||
databaseEntities,
|
||||
cachePool,
|
||||
dynamicVariables
|
||||
dynamicVariables,
|
||||
uploads
|
||||
})
|
||||
logger.debug(`[server]: Finished upserting ${reactFlowNode.data.label} (${reactFlowNode.data.id})`)
|
||||
break
|
||||
@@ -340,7 +343,8 @@ export const buildFlow = async (
|
||||
appDataSource,
|
||||
databaseEntities,
|
||||
cachePool,
|
||||
dynamicVariables
|
||||
dynamicVariables,
|
||||
uploads
|
||||
})
|
||||
|
||||
// Save dynamic variables
|
||||
@@ -596,7 +600,6 @@ export const resolveVariables = (
|
||||
}
|
||||
|
||||
const paramsObj = flowNodeData[types] ?? {}
|
||||
|
||||
getParamValues(paramsObj)
|
||||
|
||||
return flowNodeData
|
||||
@@ -1128,6 +1131,34 @@ export const getAllValuesFromJson = (obj: any): any[] => {
|
||||
return values
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete file & folder recursively
|
||||
* @param {string} directory
|
||||
*/
|
||||
export const deleteFolderRecursive = (directory: string) => {
|
||||
if (fs.existsSync(directory)) {
|
||||
fs.readdir(directory, (error, files) => {
|
||||
if (error) throw new Error('Could not read directory')
|
||||
|
||||
files.forEach((file) => {
|
||||
const file_path = path.join(directory, file)
|
||||
|
||||
fs.stat(file_path, (error, stat) => {
|
||||
if (error) throw new Error('File do not exist')
|
||||
|
||||
if (!stat.isDirectory()) {
|
||||
fs.unlink(file_path, (error) => {
|
||||
if (error) throw new Error('Could not delete file')
|
||||
})
|
||||
} else {
|
||||
deleteFolderRecursive(file_path)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get only essential flow data items for telemetry
|
||||
* @param {IReactFlowNode[]} nodes
|
||||
|
||||
Reference in New Issue
Block a user