ishaq101's picture sofhiaazzhr's picture
/feat knowledge management (#20)
b68816f
Raw History Blame Contribute Delete
1.05 kB
"""Knowledge ingestion β€” the async batch that turns a user's uploaded documents
into knowledge artifacts (KNOWLEDGE_SURFACE_PLAN.md Β§3.5, tasks N10–N10f).
One click, N documents: `POST /api/v1/knowledge/ingest` selects the caller's
parseable `documents` rows, runs parse β†’ filter β†’ cluster β†’ estimate β†’ extract
over each, and persists the results. The request never waits on it β€” the route
returns `202 {job_id}` and the caller polls `GET /api/v1/knowledge/jobs/{id}`.
Distinct from `src/knowledge/` (the Tesseract β†’ pgvector RAG path, untouched)
and from `src/knowledge_parsing/` + `src/knowledge_extraction/` (the pipeline
itself, which this package only orchestrates β€” it owns no extraction logic).
"""
from src.knowledge_ingest.models import DocumentResult, IngestJob, JobStage, JobStatus
from src.knowledge_ingest.store import InMemoryJobStore, JobStore, PostgresJobStore
__all__ = [
"DocumentResult",
"IngestJob",
"JobStage",
"JobStatus",
"JobStore",
"InMemoryJobStore",
"PostgresJobStore",
]