From 9ba38dcd73fff805a13da61669f5163d28e563ee Mon Sep 17 00:00:00 2001 From: cosark <121065588+cosark@users.noreply.github.com> Date: Sun, 31 Dec 2023 17:16:53 -0700 Subject: [PATCH 1/5] Added deploy template for RepoCloud.io Integration with RepoCloud Deploy Template to the Flowise GitHub page, enabling one-click deployment. This addition simplifies the process for users to quickly deploy and scale Flowise using RepoCloud's efficient cloud hosting services. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 25026237..a80c53f7 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,10 @@ Flowise support different environment variables to configure your instance. You [![Deploy](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/flowiseai) +### [RepoCloud](https://repocloud.io/details/?app_id=29) + +[![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=29) + ### [HuggingFace Spaces](https://docs.flowiseai.com/deployment/hugging-face) HuggingFace Spaces From 8cb939386210a62484cdf4bf5b11a7c455eafaa1 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 5 Jan 2024 02:46:36 +0000 Subject: [PATCH 2/5] add fix for passing json variable --- .../nodes/utilities/CustomFunction/CustomFunction.ts | 2 +- packages/server/src/utils/index.ts | 6 +++++- packages/ui/src/ui-component/dialog/ExpandTextDialog.js | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/components/nodes/utilities/CustomFunction/CustomFunction.ts b/packages/components/nodes/utilities/CustomFunction/CustomFunction.ts index b358b24b..37511e47 100644 --- a/packages/components/nodes/utilities/CustomFunction/CustomFunction.ts +++ b/packages/components/nodes/utilities/CustomFunction/CustomFunction.ts @@ -65,7 +65,7 @@ class CustomFunction_Utilities implements INode { inputVars = typeof functionInputVariablesRaw === 'object' ? functionInputVariablesRaw : JSON.parse(functionInputVariablesRaw) } catch (exception) { - throw new Error("Invalid JSON in the PromptTemplate's promptValues: " + exception) + throw new Error('Invalid JSON in the Custom Function Input Variables: ' + exception) } } diff --git a/packages/server/src/utils/index.ts b/packages/server/src/utils/index.ts index e7a35c82..9c2d1d79 100644 --- a/packages/server/src/utils/index.ts +++ b/packages/server/src/utils/index.ts @@ -561,7 +561,11 @@ export const getVariableValue = ( variablePaths.forEach((path) => { const variableValue = variableDict[path] // Replace all occurrence - returnVal = returnVal.split(path).join(variableValue) + if (typeof variableValue === 'object') { + returnVal = returnVal.split(path).join(JSON.stringify(variableValue).replace(/"/g, '\\"')) + } else { + returnVal = returnVal.split(path).join(variableValue) + } }) return returnVal } diff --git a/packages/ui/src/ui-component/dialog/ExpandTextDialog.js b/packages/ui/src/ui-component/dialog/ExpandTextDialog.js index 0ef70e29..f4fdb9f9 100644 --- a/packages/ui/src/ui-component/dialog/ExpandTextDialog.js +++ b/packages/ui/src/ui-component/dialog/ExpandTextDialog.js @@ -67,7 +67,11 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => { useEffect(() => { if (executeCustomFunctionNodeApi.data) { - setCodeExecutedResult(executeCustomFunctionNodeApi.data) + if (typeof executeCustomFunctionNodeApi.data === 'object') { + setCodeExecutedResult(JSON.stringify(executeCustomFunctionNodeApi.data, null, 2)) + } else { + setCodeExecutedResult(executeCustomFunctionNodeApi.data) + } } }, [executeCustomFunctionNodeApi.data]) From 36ce6b7a853f8b8f507cf773373134722f4fe063 Mon Sep 17 00:00:00 2001 From: fanux Date: Fri, 5 Jan 2024 18:17:41 +0800 Subject: [PATCH 3/5] add one-click deploy on sealos --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 25026237..6e2ade7d 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,10 @@ Flowise support different environment variables to configure your instance. You HuggingFace Spaces +### Sealos + +[![](https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dflowise) + ### [AWS](https://docs.flowiseai.com/deployment/aws) ### [Azure](https://docs.flowiseai.com/deployment/azure) From bb77e3f591b6bb03b00ca7fc3901984ed9d8241f Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 8 Jan 2024 17:13:07 +0000 Subject: [PATCH 4/5] fix chatbot config --- packages/server/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 1ad4c795..b6f59191 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -362,7 +362,8 @@ export class App { const chatflow = await this.AppDataSource.getRepository(ChatFlow).findOneBy({ id: req.params.id }) - if (chatflow && chatflow.chatbotConfig) { + if (!chatflow) return res.status(404).send(`Chatflow ${req.params.id} not found`) + if (chatflow.chatbotConfig) { try { const parsedConfig = JSON.parse(chatflow.chatbotConfig) return res.json(parsedConfig) @@ -370,7 +371,7 @@ export class App { return res.status(500).send(`Error parsing Chatbot Config for Chatflow ${req.params.id}`) } } - return res.status(404).send(`Chatbot Config for Chatflow ${req.params.id} not found`) + return res.status(200).send('OK') }) // Save chatflow From 4622fd8a02a39517f264af63acc411f0b282d89c Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 8 Jan 2024 18:39:36 +0000 Subject: [PATCH 5/5] update self-host readme --- README.md | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 82e92832..3e6b7e56 100644 --- a/README.md +++ b/README.md @@ -145,37 +145,40 @@ Flowise support different environment variables to configure your instance. You ## 🌐 Self Host -### [Railway](https://docs.flowiseai.com/deployment/railway) +Deploy Flowise self-hosted in your existing infrastructure, we support various [deployments](https://docs.flowiseai.com/configuration/deployment) -[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/pn4G8S?referralCode=WVNPD9) +- [AWS](https://docs.flowiseai.com/deployment/aws) +- [Azure](https://docs.flowiseai.com/deployment/azure) +- [Digital Ocean](https://docs.flowiseai.com/deployment/digital-ocean) +- [GCP](https://docs.flowiseai.com/deployment/gcp) +-
+ Others -### [Render](https://docs.flowiseai.com/deployment/render) + - [Railway](https://docs.flowiseai.com/deployment/railway) -[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://docs.flowiseai.com/deployment/render) + [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/pn4G8S?referralCode=WVNPD9) -### [Elestio](https://elest.io/open-source/flowiseai) + - [Render](https://docs.flowiseai.com/deployment/render) -[![Deploy](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/flowiseai) + [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://docs.flowiseai.com/deployment/render) -### [RepoCloud](https://repocloud.io/details/?app_id=29) + - [HuggingFace Spaces](https://docs.flowiseai.com/deployment/hugging-face) -[![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=29) + HuggingFace Spaces -### [HuggingFace Spaces](https://docs.flowiseai.com/deployment/hugging-face) + - [Elestio](https://elest.io/open-source/flowiseai) -HuggingFace Spaces + [![Deploy](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/flowiseai) -### Sealos + - [Sealos](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dflowise) -[![](https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dflowise) + [![](https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dflowise) -### [AWS](https://docs.flowiseai.com/deployment/aws) + - [RepoCloud](https://repocloud.io/details/?app_id=29) -### [Azure](https://docs.flowiseai.com/deployment/azure) + [![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=29) -### [DigitalOcean](https://docs.flowiseai.com/deployment/digital-ocean) - -### [GCP](https://docs.flowiseai.com/deployment/gcp) +
## 💻 Cloud Hosted