All checks were successful
CI / changes (push) Successful in 6s
CI / frontend-tests (push) Has been skipped
CI / backend-tests (pull_request) Successful in 6m23s
CI / changes (pull_request) Successful in 6s
CI / frontend-tests (pull_request) Has been skipped
CI / backend-tests (push) Successful in 6m25s
Deploy / changes (push) Successful in 5s
Deploy / build-frontend (push) Has been skipped
Deploy / build-backend (push) Successful in 1m43s
Deploy / deploy (push) Successful in 1m38s
Deploy / build-worker (push) Successful in 7m39s
Step 1 of #957. Answers parcel questions by reading the already-persisted §22 SiteFinderReport (latest_run_for, schema "1.0", read-only) and returning templated RU answers with engine numbers verbatim (§16, never fabricated). Intent routing (explicit or RU keyword match) -> per-section renderers; graceful on partial/missing sections and pending (no run / DB error) without 500s. Works with llm_enabled=False (llm_used always False); LLM composition is Step 2. Mounted off /api/v1/chat so rbac_guard auto-requires an authed known user. Refs #957
15 lines
742 B
Python
15 lines
742 B
Python
"""Чат по §22-форсайту участка (#957). Step 1 — ДЕТЕРМИНИРОВАННЫЙ, БЕЗ LLM.
|
||
|
||
Два под-модуля:
|
||
• retrieval — read-only достаёт персистентный SiteFinderReport участка.
|
||
• intents — роутинг RU-вопроса в intent + сборка шаблонного RU-ответа из секций.
|
||
|
||
LLM-композиция (Step 2) ляжет поверх этого слоя; здесь LLM НЕ участвует.
|
||
"""
|
||
|
||
from __future__ import annotations
|
||
|
||
from app.services.chat.intents import render_answer, route_intent
|
||
from app.services.chat.retrieval import get_report_for_chat
|
||
|
||
__all__ = ["get_report_for_chat", "render_answer", "route_intent"]
|