fix(llm): add fetch-models endpoint, fix SQL Lab INSERT (client_id truncation, sync mode, target_column, timestamp normalization)
- Add POST /api/llm/providers/fetch-models route with LLMClient.fetch_models() - Add target_column to TranslationJob model/schema/service/orchestrator - Fix SQL Lab execute: truncate client_id to 11 chars (varchar(11)) - Switch SQL Lab to sync mode (runAsync: false) — no Celery workers - Fix polling: unwrap nested result from Superset query API - Fix ClickHouse timestamp: normalize float timestamps to YYYY-MM-DD
This commit is contained in:
@@ -105,7 +105,6 @@ class ClarificationAnswerCommand:
|
||||
# @SIDE_EFFECT: Mutates clarification answers, session flags, and related clarification findings.
|
||||
class ClarificationEngine:
|
||||
# region ClarificationEngine_init [TYPE Function]
|
||||
# @COMPLEXITY: 2
|
||||
# @PURPOSE: Bind repository dependency for clarification persistence operations.
|
||||
def __init__(self, repository: DatasetReviewSessionRepository) -> None:
|
||||
self.repository = repository
|
||||
@@ -113,7 +112,6 @@ class ClarificationEngine:
|
||||
# endregion ClarificationEngine_init
|
||||
|
||||
# region build_question_payload [TYPE Function]
|
||||
# @COMPLEXITY: 4
|
||||
# @PURPOSE: Return the one active highest-priority clarification question payload.
|
||||
# @PRE: Session contains unresolved clarification state or a resumable clarification session.
|
||||
# @POST: Returns exactly one active/open question payload or None when no unresolved question remains.
|
||||
@@ -173,7 +171,6 @@ class ClarificationEngine:
|
||||
# endregion build_question_payload
|
||||
|
||||
# region record_answer [TYPE Function]
|
||||
# @COMPLEXITY: 4
|
||||
# @PURPOSE: Persist one clarification answer before any pointer/readiness mutation.
|
||||
# @PRE: Target question belongs to the session's active clarification session and is still open.
|
||||
# @POST: Answer row is persisted before current-question pointer advances.
|
||||
@@ -260,7 +257,6 @@ class ClarificationEngine:
|
||||
# endregion record_answer
|
||||
|
||||
# region summarize_progress [TYPE Function]
|
||||
# @COMPLEXITY: 1
|
||||
# @PURPOSE: Produce a compact progress summary for pause/resume and completion UX.
|
||||
def summarize_progress(self, clarification_session: ClarificationSession) -> str:
|
||||
resolved = count_resolved_questions(clarification_session)
|
||||
@@ -270,7 +266,6 @@ class ClarificationEngine:
|
||||
# endregion summarize_progress
|
||||
|
||||
# region _get_latest_clarification_session [TYPE Function]
|
||||
# @COMPLEXITY: 2
|
||||
# @PURPOSE: Select the latest clarification session for the current dataset review aggregate.
|
||||
def _get_latest_clarification_session(self, session: DatasetReviewSession) -> Optional[ClarificationSession]:
|
||||
if not session.clarification_sessions:
|
||||
@@ -281,7 +276,6 @@ class ClarificationEngine:
|
||||
# endregion _get_latest_clarification_session
|
||||
|
||||
# region _find_question [TYPE Function]
|
||||
# @COMPLEXITY: 1
|
||||
# @PURPOSE: Resolve a clarification question from the active clarification aggregate.
|
||||
def _find_question(self, clarification_session: ClarificationSession, question_id: str) -> Optional[ClarificationQuestion]:
|
||||
for q in clarification_session.questions:
|
||||
|
||||
Reference in New Issue
Block a user