AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(backend): Handle StreamHeartbeat in CoPilot stream handler (#11928)
Bently5401d54eaab4
diff --git a/autogpt_platform/backend/backend/api/features/chat/service.py b/autogpt_platform/backend/backend/api/features/chat/service.pyindex 218575085b..bf7dbb6c7e 100644--- a/autogpt_platform/backend/backend/api/features/chat/service.py+++ b/autogpt_platform/backend/backend/api/features/chat/service.py@@ -618,6 +618,9 @@ async def stream_chat_completion(total_tokens=chunk.totalTokens,))+ elif isinstance(chunk, StreamHeartbeat):+ # Pass through heartbeat to keep SSE connection alive+ yield chunkelse:logger.error(f"Unknown chunk type: {type(chunk)}", exc_info=True)