Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG] Messages exported from "View Messages" are tagged wrongly / chat UI is not showing API/Embed messages

Open BadlyDrawnBoy opened this issue 1 year ago • 0 comments

Summary I've encountered two issues while using a custom timer tool with Flowise v2.0.1:

  1. Messages sent from an external timer script are not appearing in the Flowise command line or chat interface. They only show up in the "View Messages" section of the settings.
  2. When I export the conversation via "View Messages", all messages seem to be tagged as "source": "API/Embed", even those I'm pretty sure I sent through the UI.

These issues are making it difficult for me to use and debug my custom tool effectively, as I can't see important notifications and feedback where I'd expect them.

Describe the bug I've created a custom tool that lets the LLM set a timer by calling an external script. This script is supposed to send a message back to the same chat it was called from when the timer is up. I started working on this tool (with claude) around the time Flowise version 1.8.3 was released.

At first, I thought the problems were with my custom tool or the service script, and it took me a while to realize that the issues might be with how Flowise is handling these messages. Here's what I've noticed:

  1. The message from my external script doesn't appear in the Flowise command line or in the Chat interface. I can only see the full conversation in the settings under "View Messages".
  2. Even though I'm sending my initial messages through the Flowise chat UI, when I look at the messages exported from "View Messages", they're all marked as "source": "API/Embed".

The second issue about tagging isn't causing me major problems right now, but not being able to see the API/Embed messages in the UI or logs is really hindering my ability to use and debug my custom tool.

To Reproduce Steps to reproduce the behavior:

  1. add axios to Flowise
  2. Start Flowise
  3. Prepare and start the timer service script (pnpm init / pnpm add express node-schedule axios)
  4. Import and start the tool test Flow
  5. Ask Claude to set a 1 minute timer and wait
  6. Look for messages and logs

Expected behavior

  1. Messages that are send by "API/Embed" should show up in the debug messages on the console and the UI
  2. Messages should be tagged correctly as UI / API/Embed

Screenshots ui View_Messages_UI View_Messages_UI_and_API-Embed

Flow tool test Chatflow.json

Setup

  • Installation: $ pnpm install $ pnpm add axios --filter "./packages/components" $ pnpm build $ pnpm start --PORT=3000 --LOG_LEVEL=debug --DEBUG=true /
  • Flowise Version 2.0.1
  • OS: Debian 12
  • Browser Firefox 128.0

Additional context flowise_cmd.log e164df25-a328-4f32-a174-4c7f426e53b6-Message.json alarm_clock_and_timer_tool-CustomTool.json timerService.js.gz timerService_cmd.log

BadlyDrawnBoy avatar Jul 24 '24 20:07 BadlyDrawnBoy