Start a paper-to-code workflow. Returns a task ID that can be used to track progress via WebSocket.
(
request: PaperToCodeRequest,
background_tasks: BackgroundTasks,
)
| 19 | |
| 20 | @router.post("/paper-to-code", response_model=TaskResponse) |
| 21 | async def start_paper_to_code( |
| 22 | request: PaperToCodeRequest, |
| 23 | background_tasks: BackgroundTasks, |
| 24 | ): |
| 25 | """ |
| 26 | Start a paper-to-code workflow. |
| 27 | Returns a task ID that can be used to track progress via WebSocket. |
| 28 | """ |
| 29 | task = workflow_service.create_task() |
| 30 | |
| 31 | # Run workflow in background |
| 32 | background_tasks.add_task( |
| 33 | workflow_service.execute_paper_to_code, |
| 34 | task.task_id, |
| 35 | request.input_source, |
| 36 | request.input_type, |
| 37 | request.enable_indexing, |
| 38 | ) |
| 39 | |
| 40 | return TaskResponse( |
| 41 | task_id=task.task_id, |
| 42 | status="started", |
| 43 | message="Paper-to-code workflow started", |
| 44 | ) |
| 45 | |
| 46 | |
| 47 | @router.post("/chat-planning", response_model=TaskResponse) |
nothing calls this directly
no test coverage detected