mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
Chore/update flowise embed version (#2722)
* update flowise-embed version on lock file * add agent messages to share chatbot
This commit is contained in:
@@ -166,7 +166,8 @@ const CanvasHeader = ({ chatflow, isAgentCanvas, handleSaveFlow, handleDeleteFlo
|
||||
chatflowid: chatflow.id,
|
||||
chatflowApiKeyId: chatflow.apikeyid,
|
||||
isFormDataRequired,
|
||||
isSessionMemory
|
||||
isSessionMemory,
|
||||
isAgentCanvas
|
||||
})
|
||||
setAPIDialogOpen(true)
|
||||
}
|
||||
|
||||
@@ -78,7 +78,11 @@ const ChatbotFull = () => {
|
||||
setChatflow(chatflowData)
|
||||
if (chatflowData.chatbotConfig) {
|
||||
try {
|
||||
const chatflowType = chatflowData.type
|
||||
const parsedConfig = JSON.parse(chatflowData.chatbotConfig)
|
||||
if (chatflowType === 'MULTIAGENT') {
|
||||
parsedConfig.showAgentMessages = true
|
||||
}
|
||||
setChatbotTheme(parsedConfig)
|
||||
if (parsedConfig.overrideConfig) {
|
||||
// Generate new sessionId
|
||||
|
||||
@@ -740,7 +740,7 @@ formData.append("openAIApiKey[openAIEmbeddings_0]", "sk-my-openai-2nd-key")`
|
||||
</>
|
||||
)}
|
||||
{codeLang === 'Share Chatbot' && !chatflowApiKeyId && (
|
||||
<ShareChatbot isSessionMemory={dialogProps.isSessionMemory} />
|
||||
<ShareChatbot isSessionMemory={dialogProps.isSessionMemory} isAgentCanvas={dialogProps.isAgentCanvas} />
|
||||
)}
|
||||
</TabPanel>
|
||||
))}
|
||||
|
||||
@@ -42,7 +42,7 @@ const defaultConfig = {
|
||||
}
|
||||
}
|
||||
|
||||
const ShareChatbot = ({ isSessionMemory }) => {
|
||||
const ShareChatbot = ({ isSessionMemory, isAgentCanvas }) => {
|
||||
const dispatch = useDispatch()
|
||||
const theme = useTheme()
|
||||
const chatflow = useSelector((state) => state.canvas.chatflow)
|
||||
@@ -139,6 +139,8 @@ const ShareChatbot = ({ isSessionMemory }) => {
|
||||
|
||||
if (chatbotConfig?.starterPrompts) obj.starterPrompts = chatbotConfig.starterPrompts
|
||||
|
||||
if (isAgentCanvas) obj.showAgentMessages = true
|
||||
|
||||
return obj
|
||||
}
|
||||
|
||||
@@ -516,7 +518,8 @@ const ShareChatbot = ({ isSessionMemory }) => {
|
||||
}
|
||||
|
||||
ShareChatbot.propTypes = {
|
||||
isSessionMemory: PropTypes.bool
|
||||
isSessionMemory: PropTypes.bool,
|
||||
isAgentCanvas: PropTypes.bool
|
||||
}
|
||||
|
||||
export default ShareChatbot
|
||||
|
||||
Reference in New Issue
Block a user