cheshire-cat-ai / admin-vue

Admin panel of the Cheshire Cat AI
GNU General Public License v3.0
32 stars 28 forks source link

Websocket messages containing just a number are not shown in the chat #74

Closed pieroit closed 8 months ago

pieroit commented 8 months ago

Note I was sure this was a backend issue about tools, but I just verified that the websocket message in fact arrives to the admin. Maybe there is some check about content being a string

Screenshot from 2024-01-13 01-13-03

To Reproduce

  1. create a tool with @tool(return_direct=True)
  2. tool returns a number return 2
  3. message does not end up in the chat

If you return "2", the message is correctly picked

pieroit commented 8 months ago

I can fix core side by forcing content to string before sending out the ws message

pieroit commented 8 months ago

Fixed

Screenshot from 2024-01-13 01-18-44