| from app.core.tracing.run_tracker import get_or_create_tracker | |
| from app.workflow.state import WorkflowState | |
| def classify( | |
| state: WorkflowState, | |
| ) -> WorkflowState: | |
| """ | |
| Classify the document type. | |
| Currently assigns GENERAL; structure is in place for LLM-based | |
| classification as a future improvement. | |
| """ | |
| state.current_node = "CLASSIFICATION" | |
| tracker = get_or_create_tracker(str(state.workflow_run_id)) | |
| tracker.start_stage("classification") | |
| from app.workflow.progress import report_progress | |
| report_progress(state.workflow_run_id, "CLASSIFICATION") | |
| state.document_type = "GENERAL" | |
| tracker.end_stage("classification") | |
| return state |