MCPcopy Create free account
hub / github.com/LangGraph-GUI/LangGraph-GUI-backend / stream_response

Function stream_response

src/main.py:81–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 handler = handlers[username]
80 # start process in background
81 async def stream_response():
82 asyncio.create_task(handler.run(command, user_workspace)) # start the process as a task
83 async for output in handler.get_stream():
84 if isinstance(output, dict):
85 yield f"data: {output}\n\n" # Send final status
86 break
87 yield f"data: {output}\n\n"
88
89 return StreamingResponse(stream_response(), media_type="text/event-stream")
90

Callers 1

run_scriptFunction · 0.85

Calls 2

runMethod · 0.80
get_streamMethod · 0.80

Tested by

no test coverage detected