MCPcopy Create free account
hub / github.com/OpenBMB/ChatDev / stream

Function stream

server/routes/execute_sync.py:244–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

242 threading.Thread(target=worker, daemon=True).start()
243
244 async def stream():
245 while True:
246 try:
247 event_type, data = event_queue.get(timeout=0.1)
248 yield _sse_event(event_type, data)
249 except queue.Empty:
250 if done_event.is_set():
251 break
252
253 return StreamingResponse(stream(), media_type=_SSE_CONTENT_TYPE)

Callers 1

run_workflow_syncFunction · 0.85

Calls 2

_sse_eventFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected