Daniel Soublett
Daniel Soublett

Reputation: 888

Flowise Error: Expected content-type to be text/event-stream, Actual: application/json; charset=utf-8

I am creating a RAG app using Flowise for a client and when testing it embedding the chat on my clients website I get the following error:

Error: Expected content-type to be text/event-stream, Actual: application/json; charset=utf-8

javascript error

What I have done so far:

I deployed Flowise on a subdomain of my own website (I use a VPS and cloudflare btw) where I have all my chatbots created.

The code generated to integrate the chatbot is something like:

<script type="module">
    import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed/dist/web.js"
    Chatbot.init({
        chatflowid: "67a9ec18-b51f-4984-97b2-d131514c03ad",
        apiHost: "https://chat.mywebsite.com",
    })
</script>

The previous script I embedded it into another website built on an ecommerce system called Shopware 6 (I think is built on vue2) hosted in my client's server.

Then I test the chatbot and the previous error show up. But when I test the chatbot on my flowise server, it responds correctly and no issues at all.

Any ideas? I am pretty new using Flowise and also understanding that error. Thanks everyone.

UPDATE: I just found out that the latest versions 2.0.0 and 2.0.1 are the ones showing that error so add the version 1.3.14 to the embedding script to make it work. I didn't try other versions or researched further to understand why that is happening so in the meantime I am just going to use the versions 1.3.14

import Chatbot from "https://cdn.jsdelivr.net/npm/flowise-embed@1.3.14/dist/web.js

Upvotes: 0

Views: 589

Answers (0)

Related Questions