I inserted this code in Page Content Bottom:
<script type=”module”>
import Chatbot from “https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js”
Chatbot.init({
chatflowid: “1b77704a-b8b8-4e49-8946-c16a4a6f7dbd”,
apiHost: “http://localhost:3000”,
chatflowConfig: {
// topK: 2
},
theme: {
button: {
backgroundColor: “#3B81F6”,
right: 20,
bottom: 90,
size: “medium”,
iconColor: “white”,
customIconSrc: “https://raw.githubusercontent.com/walkxcode/dashboard-icons/main/svg/google-messages.svg”,
},
chatWindow: {
welcomeMessage: “Hello! I am the IrinaAfrica AI assistant. How can I help?”,
backgroundColor: “#ffffff”,
height: 600,
width: 400,
fontSize: 16,
poweredByTextColor: “transparent”,
botMessage: {
backgroundColor: “#f7f8ff”,
textColor: “#303235”,
showAvatar: true,
avatarSrc: “https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/parroticon.png”,
},
userMessage: {
backgroundColor: “#3B81F6”,
textColor: “#ffffff”,
showAvatar: true,
avatarSrc: “https://raw.githubusercontent.com/zahidkhawaja/langchain-chat-nextjs/main/public/usericon.png”,
},
textInput: {
placeholder: “Type your question”,
backgroundColor: “#ffffff”,
textColor: “#303235”,
sendButtonColor: “#3B81F6”,
}
}
}
})
</script>
The button and dialog window only shows up when I am logged in.