We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64a2e09 commit d0795a8Copy full SHA for d0795a8
1 file changed
astrbot/dashboard/routes/chat.py
@@ -26,6 +26,9 @@
26
27
from .route import Response, Route, RouteContext
28
29
+# SSE heartbeat message to keep the connection alive during long-running operations
30
+SSE_HEARTBEAT = ": heartbeat\n\n"
31
+
32
33
@asynccontextmanager
34
async def track_conversation(convs: dict, conv_id: str):
@@ -371,7 +374,7 @@ async def stream():
371
374
# doesn't time out during slow backend ops like
372
375
# context compression with reasoning models (#6938).
373
376
if not client_disconnected:
- yield ": heartbeat\n\n"
377
+ yield SSE_HEARTBEAT
378
continue
379
380
if (
0 commit comments