Merge branch 'FlowiseAI:main' into main

This commit is contained in:
Darien Kindlund
2024-01-08 16:07:07 -05:00
committed by GitHub
5 changed files with 37 additions and 17 deletions
+23 -12
View File
@@ -145,29 +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)
- <details>
<summary>Others</summary>
### [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)
### [HuggingFace Spaces](https://docs.flowiseai.com/deployment/hugging-face)
- [HuggingFace Spaces](https://docs.flowiseai.com/deployment/hugging-face)
<a href="https://huggingface.co/spaces/FlowiseAI/Flowise"><img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="HuggingFace Spaces"></a>
<a href="https://huggingface.co/spaces/FlowiseAI/Flowise"><img src="https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg" alt="HuggingFace Spaces"></a>
### [AWS](https://docs.flowiseai.com/deployment/aws)
- [Elestio](https://elest.io/open-source/flowiseai)
### [Azure](https://docs.flowiseai.com/deployment/azure)
[![Deploy](https://pub-da36157c854648669813f3f76c526c2b.r2.dev/deploy-on-elestio-black.png)](https://elest.io/open-source/flowiseai)
### [DigitalOcean](https://docs.flowiseai.com/deployment/digital-ocean)
- [Sealos](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dflowise)
### [GCP](https://docs.flowiseai.com/deployment/gcp)
[![](https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg)](https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dflowise)
- [RepoCloud](https://repocloud.io/details/?app_id=29)
[![Deploy on RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.png)](https://repocloud.io/details/?app_id=29)
</details>
## 💻 Cloud Hosted
@@ -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)
}
}
+3 -2
View File
@@ -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
+5 -1
View File
@@ -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
}
@@ -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])