LightRAG/lightrag/api/routers
Jon cf2a024e37 feat: Add endpoint and UI to retry failed documents
Add a new `/documents/reprocess_failed` API endpoint and corresponding
UI button to retry processing of failed and pending documents. This
addresses a common recovery scenario when document processing fails due
to server crashes, network errors, or LLM service outages.

Backend changes:
- Add ReprocessResponse model with status, message, and track_id fields
- Add POST /documents/reprocess_failed endpoint that triggers background
  reprocessing of FAILED, PENDING, and interrupted PROCESSING documents
- Reuses existing apipeline_process_enqueue_documents for consistency
- Includes comprehensive docstring and logging for observability

Frontend changes:
- Add TypeScript types and API function for the new endpoint
- Add retry handler with intelligent polling (fast refresh → normal)
- Add "Retry Failed" button in Documents page toolbar
- Button disabled when pipeline is busy to prevent duplicate operations
- Complete i18n support (English and Chinese translations)

This feature provides a convenient way to recover from processing
failures without requiring a full filesystem rescan.
2025-10-04 16:46:29 -04:00
..
__init__.py split lightrag_servery.py to smaller files 2025-02-20 03:26:39 +08:00
document_routes.py feat: Add endpoint and UI to retry failed documents 2025-10-04 16:46:29 -04:00
graph_routes.py Make graph label methods required in BaseGraphStorage interface 2025-09-20 12:40:36 +08:00
ollama_api.py fix(OllamaAPI): Add validation to ensure last message is from user role 2025-10-01 20:48:37 +08:00
query_routes.py Relax conversation history role validation requirements 2025-09-29 13:10:15 +08:00