Chore/update flowise embed version (#2722)

* update flowise-embed version on lock file

* add agent messages to share chatbot
This commit is contained in:
Henry Heng 2024-06-26 02:18:08 +01:00 committed by GitHub
parent 96dfedde6e
commit d0354bb25c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 344 additions and 353 deletions

View File

@ -1,6 +1,6 @@
# Contributor Covenant Code of Conduct # Contributor Covenant Code of Conduct
English | [中文](<./i18n/CODE_OF_CONDUCT-ZH.md>) English | [中文](./i18n/CODE_OF_CONDUCT-ZH.md)
## Our Pledge ## Our Pledge

View File

@ -121,7 +121,7 @@ Flowise has 3 different modules in a single mono repository.
Flowise support different environment variables to configure your instance. You can specify the following variables in the `.env` file inside `packages/server` folder. Read [more](https://docs.flowiseai.com/environment-variables) Flowise support different environment variables to configure your instance. You can specify the following variables in the `.env` file inside `packages/server` folder. Read [more](https://docs.flowiseai.com/environment-variables)
| Variable | Description | Type | Default | | Variable | Description | Type | Default |
| ---------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------- | | ---------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------- |
| PORT | The HTTP port Flowise runs on | Number | 3000 | | PORT | The HTTP port Flowise runs on | Number | 3000 |
| CORS_ORIGINS | The allowed origins for all cross-origin HTTP calls | String | | | CORS_ORIGINS | The allowed origins for all cross-origin HTTP calls | String | |
| IFRAME_ORIGINS | The allowed origins for iframe src embedding | String | | | IFRAME_ORIGINS | The allowed origins for iframe src embedding | String | |

View File

@ -2,7 +2,7 @@
# 贡献者公约行为准则 # 贡献者公约行为准则
[English](<../CODE_OF_CONDUCT.md>) | 中文 [English](../CODE_OF_CONDUCT.md) | 中文
## 我们的承诺 ## 我们的承诺

View File

@ -119,7 +119,7 @@ Flowise 在一个单一的单体存储库中有 3 个不同的模块。
Flowise 支持不同的环境变量来配置您的实例。您可以在 `packages/server` 文件夹中的 `.env` 文件中指定以下变量。阅读[更多信息](https://docs.flowiseai.com/environment-variables) Flowise 支持不同的环境变量来配置您的实例。您可以在 `packages/server` 文件夹中的 `.env` 文件中指定以下变量。阅读[更多信息](https://docs.flowiseai.com/environment-variables)
| 变量名 | 描述 | 类型 | 默认值 | | 变量名 | 描述 | 类型 | 默认值 |
| ---------------------------- | ------------------------------------------------------- | ----------------------------------------------- | ----------------------------------- | | ---------------------------- | -------------------------------------------------------------------- | ----------------------------------------------- | ----------------------------------- |
| PORT | Flowise 运行的 HTTP 端口 | 数字 | 3000 | | PORT | Flowise 运行的 HTTP 端口 | 数字 | 3000 |
| FLOWISE_USERNAME | 登录用户名 | 字符串 | | | FLOWISE_USERNAME | 登录用户名 | 字符串 | |
| FLOWISE_PASSWORD | 登录密码 | 字符串 | | | FLOWISE_PASSWORD | 登录密码 | 字符串 | |

View File

@ -166,7 +166,8 @@ const CanvasHeader = ({ chatflow, isAgentCanvas, handleSaveFlow, handleDeleteFlo
chatflowid: chatflow.id, chatflowid: chatflow.id,
chatflowApiKeyId: chatflow.apikeyid, chatflowApiKeyId: chatflow.apikeyid,
isFormDataRequired, isFormDataRequired,
isSessionMemory isSessionMemory,
isAgentCanvas
}) })
setAPIDialogOpen(true) setAPIDialogOpen(true)
} }

View File

@ -78,7 +78,11 @@ const ChatbotFull = () => {
setChatflow(chatflowData) setChatflow(chatflowData)
if (chatflowData.chatbotConfig) { if (chatflowData.chatbotConfig) {
try { try {
const chatflowType = chatflowData.type
const parsedConfig = JSON.parse(chatflowData.chatbotConfig) const parsedConfig = JSON.parse(chatflowData.chatbotConfig)
if (chatflowType === 'MULTIAGENT') {
parsedConfig.showAgentMessages = true
}
setChatbotTheme(parsedConfig) setChatbotTheme(parsedConfig)
if (parsedConfig.overrideConfig) { if (parsedConfig.overrideConfig) {
// Generate new sessionId // Generate new sessionId

View File

@ -740,7 +740,7 @@ formData.append("openAIApiKey[openAIEmbeddings_0]", "sk-my-openai-2nd-key")`
</> </>
)} )}
{codeLang === 'Share Chatbot' && !chatflowApiKeyId && ( {codeLang === 'Share Chatbot' && !chatflowApiKeyId && (
<ShareChatbot isSessionMemory={dialogProps.isSessionMemory} /> <ShareChatbot isSessionMemory={dialogProps.isSessionMemory} isAgentCanvas={dialogProps.isAgentCanvas} />
)} )}
</TabPanel> </TabPanel>
))} ))}

View File

@ -42,7 +42,7 @@ const defaultConfig = {
} }
} }
const ShareChatbot = ({ isSessionMemory }) => { const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
const dispatch = useDispatch() const dispatch = useDispatch()
const theme = useTheme() const theme = useTheme()
const chatflow = useSelector((state) => state.canvas.chatflow) const chatflow = useSelector((state) => state.canvas.chatflow)
@ -139,6 +139,8 @@ const ShareChatbot = ({ isSessionMemory }) => {
if (chatbotConfig?.starterPrompts) obj.starterPrompts = chatbotConfig.starterPrompts if (chatbotConfig?.starterPrompts) obj.starterPrompts = chatbotConfig.starterPrompts
if (isAgentCanvas) obj.showAgentMessages = true
return obj return obj
} }
@ -516,7 +518,8 @@ const ShareChatbot = ({ isSessionMemory }) => {
} }
ShareChatbot.propTypes = { ShareChatbot.propTypes = {
isSessionMemory: PropTypes.bool isSessionMemory: PropTypes.bool,
isAgentCanvas: PropTypes.bool
} }
export default ShareChatbot export default ShareChatbot

File diff suppressed because it is too large Load Diff