feat(backend): deliver Phase 3 document and voice integration
Add authenticated upload, review, retry and knowledge-selection HTTP flows with bounded JSON processing and frozen OCR policy. Preserve Gemini/OpenAI provider selection and fenced lifecycle semantics; retain FAQ preambles and uncertain vision candidates, and expose opt-in uncalibrated voice transport diagnostics. Include frontend integration examples, aligned contracts and deterministic regressions. Validation: 1767 provider-free tests passed; all 404 PostgreSQL scenarios have passing evidence across the documented runs.
This commit is contained in:
@@ -58,6 +58,7 @@ class IngestionSettings(BaseSettings):
|
||||
vision_timeout_seconds: float = Field(default=60, gt=0, allow_inf_nan=False)
|
||||
fallback_policy: str = Field(default="affected-pages-v1", min_length=1)
|
||||
quality_policy: str = Field(default="bounded-checks-manual-review-v1", min_length=1)
|
||||
ocr_review_required: bool = True
|
||||
normalization_policy: str = Field(default="unicode-line-endings-v1", min_length=1)
|
||||
chunking_policy: str = Field(default="paragraph-v1", min_length=1)
|
||||
render_dpi: int = Field(default=144, gt=0, le=600)
|
||||
@@ -211,6 +212,7 @@ class IngestionSettings(BaseSettings):
|
||||
"vision": {"provider": self.vision_provider, "endpoint": self.vision_endpoint,
|
||||
"model": self.vision_model, "timeout_seconds": self.vision_timeout_seconds},
|
||||
"fallback_policy": self.fallback_policy, "quality_policy": self.quality_policy,
|
||||
"ocr_review_required": self.ocr_review_required,
|
||||
"render_dpi": self.render_dpi,
|
||||
"max_rendered_page_pixels": self.max_rendered_page_pixels,
|
||||
"max_pdf_pages": self.max_pdf_pages,
|
||||
|
||||
Reference in New Issue
Block a user