Фиксация изменений

This commit is contained in:
2026-03-05 11:03:17 +03:00
parent 1ef0b4d68c
commit 417b8b6f72
261 changed files with 8215 additions and 332 deletions

View File

@@ -0,0 +1,22 @@
from __future__ import annotations
import logging
from app.modules.rag.intent_router_v2.models import ConversationState, IntentRouterResult, RepoContext
LOGGER = logging.getLogger(__name__)
class IntentRouterLogger:
def log_request(self, user_query: str, conversation_state: ConversationState, repo_context: RepoContext) -> None:
LOGGER.warning(
"intent router v2 request: turn=%s active_intent=%s user_query=%s languages=%s domains=%s",
conversation_state.turn_index + 1,
conversation_state.active_intent,
" ".join((user_query or "").split()),
repo_context.languages,
repo_context.available_domains,
)
def log_result(self, result: IntentRouterResult) -> None:
LOGGER.warning("intent router v2 result: %s", result.model_dump_json(ensure_ascii=False))