langflow-ai / langflow-embedded-chat

The Langflow Embedded Chat is a powerful web component that enables seamless communication with the Langflow
43 stars 18 forks source link

Chat Widget Network Error Issue #14

Open clusterpj opened 1 week ago

clusterpj commented 1 week ago

I am having an issue making the widget to work on a website. For the purpose of this I have langflow with a domain assigned with a cloudflare tunnel.

Whenever I try to chat with it from the website on the console, I get this:

[06/16/24 18:50:02] ERROR 2024-06-16 18:50:02 - ERROR - main - TaskService.__init__() main.py:34 missing 1 required positional argument: 'settings_service'

I have Followed all instructions to the dot on how to build the chat, below is my code:

<script src="https://cdn.jsdelivr.net/gh/logspace-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
<langflow-chat
    window_title="Cluster Assistant"
    host_url="http://localhost:7860"
    flow_id="4d8b23cb-9884-4b0a-ae62-0cc8fe6396e4"
    chat_inputs='{"text":""}'
    chat_input_field="text"
    style="position: absolute; bottom: 50px; right: 50px;"
  ></langflow-chat>

First assuming it will work right away I attach it on my website but i was getting the network error below, then i gave it a try locally and i still get the same issue.

image

BerlinWong commented 4 days ago

我通过解析bundle.min.js,大致找到了错误原因,你可以尝试这样做⬇️ 全局搜索/api/v1/process/字段 你应该能搜到唯一一个结果,将其改为 /api/v1/run/

By analyzing bundle.min.js, I roughly found the cause of the error. You can try doing this ⬇️ Globally search for the /api/v1/process/ field You should find a unique result, change it to /api/v1/run/