[FastAPI Example] State Persistence Not Working as Documented in Team Chat Implementation #6514
Edison-A-N
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[FastAPI Example] State Persistence Not Working as Documented in Team Chat Implementation
Issue Description
There is a discrepancy between the documentation and actual implementation regarding state persistence in the team chat application. The README states that "the agents and team use the
load_stateandsave_statemethods to load and save their state from and to files on each turn." However, in the actual implementation (app_team.py), the state saving mechanism doesn't work as documented.Current Implementation Issue
In
app_team.py, the state saving logic is placed after thefor message in streamloop:The problem is that the
_user_inputfunction blocks the execution flow when waiting for user input, causing the code to never reach the state saving logic. This means that while the application can continuously receive user input, it never gets to save the team state and chat history as promised in the documentation.Expected Behavior
The state should be saved after each turn as documented in the README. This would require either:
Additional Context
This issue affects the reliability of the application's state persistence feature, which is important for maintaining conversation context across server restarts.
Documentation Link
https://github.com/microsoft/autogen/blob/main/python/samples/agentchat_fastapi/README.md
Beta Was this translation helpful? Give feedback.
All reactions