PersonaFlow / agentstack

A platform for building custom generative AI agents and assistants.
MIT License
4 stars 0 forks source link

Fix chatbot bugs on initial thread creation #164

Open krishokr opened 2 months ago

krishokr commented 2 months ago

Issues

With the chatbot type, there are two errors that occur just after initial thread creation (when the state is empty):

  1. When trying to stream with or without a newly created thread_id in the request body (a new thread is created if a thread_id is not provided)

    • /state error: {"detail":"Failed to retrieve thread state: 'NoneType' object is not iterable"}
  2. When calling a GET request to fetch the /state.

    • /stream error: {"status_code":500,"message":"Internal Server Error: 'id'"}

On the following streams and state calls to these endpoints, it is successful and works as intended.

Fetching the state with an empty thread: Image

Streaming with an empty thread: https://github.com/user-attachments/assets/dbce6e90-e286-4d43-9f2d-ed0de2525a68