diff --git a/app.py b/app.py index 5adb62e..79bd0f6 100644 --- a/app.py +++ b/app.py @@ -172,7 +172,7 @@ async def task_events(task_id: str): task = task_manager.tasks.get(task_id) if task: - yield f"event: status\ndata: {dumps({'type': 'status','status': task.status,'steps': task.steps})}\n\n" + yield f"event: status\ndata: {dumps({'type': 'status', 'status': task.status, 'steps': task.steps})}\n\n" while True: try: @@ -190,7 +190,7 @@ async def task_events(task_id: str): elif event["type"] == "step": task = task_manager.tasks.get(task_id) if task: - yield f"event: status\ndata: {dumps({ 'type': 'status','status': task.status,'steps': task.steps })}\n\n" + yield f"event: status\ndata: {dumps({'type': 'status', 'status': task.status, 'steps': task.steps})}\n\n" yield f"event: {event['type']}\ndata: {formatted_event}\n\n" elif event["type"] in ["think", "tool", "act", "run"]: yield f"event: {event['type']}\ndata: {formatted_event}\n\n" @@ -244,4 +244,4 @@ async def generic_exception_handler(request: Request, exc: Exception): if __name__ == "__main__": import uvicorn - uvicorn.run(app, host="localhost", port=5172) + uvicorn.run(app, host="localhost", port=5172) \ No newline at end of file