FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
31.52k stars 16.42k forks source link

[BUG] Chat Window Hangs and Repeated API Calls in Flowise Versions 2.1.0+ #3451

Open jgoldfed opened 1 week ago

jgoldfed commented 1 week ago

Describe the bug
In Flowise versions 2.1.0 and above, using the chat function causes it to "hang" after inputting a prompt. Despite the chat window freezing, the backend continues to make repetitive API calls, filling the SQLite database with duplicate messages. This behavior is absent in version 2.0.7.

To Reproduce
Steps to reproduce the behavior:

  1. Install Flowise on an Amazon EC2 instance (or local Linux/Windows machine) via Docker, npx flowise start, or pnpm start.
  2. Download and install the "Antonym" template from the Marketplace.
  3. Enter a valid OpenAI API key in the ChatOpenAI Connect Credential dialog.
  4. Type a prompt, such as "big," in the chat window.
  5. Observe that the expected response (e.g., "small" or "little") is not returned, and the chat window hangs.
  6. Check the SQLite database to find repeated messages, indicating ongoing calls despite the chat interface being closed or Flowise restarted.

Expected behavior
The chat should respond with a single antonym, such as "small" or "little," and then stop making additional API calls once the response is returned.

Flow
See attached Antonym Chatflow.json

Setup

Additional context
Through troubleshooting, the root cause appears to be in the commits between checkpoints b02bdc and 1c89a, with the issue emerging between the September 16 and September 17 releases.

HenryHengZJ commented 1 week ago

This is for the UI chat? Or are you using embedded chat?

jgoldfed commented 1 week ago

UI chat on localhost:3000.

HenryHengZJ commented 1 week ago

Running on v2.1.3 using pnpm start, works fine: image