feat: stabilize rag chat conversations and auto title sync

This commit is contained in:
wren
2026-05-19 15:52:05 +08:00
parent 564f2bebc8
commit afaba4dd99
19 changed files with 1988 additions and 93 deletions
@@ -29,6 +29,7 @@ from fastapi_modules.fastapi_leaudit.leaudit_bridge.resilient_clients import (
ResilientOpenAICompatibleClient,
ResilientQwenVLMClient,
)
from fastapi_modules.fastapi_leaudit.rag_engine.config import normalize_openai_base_url
if TYPE_CHECKING:
from leaudit.llm.base import BaseLLMClient
@@ -68,7 +69,7 @@ def create_ocr_client() -> BaseOCRClient:
def create_llm_client() -> BaseLLMClient:
"""Create a leaudit OpenAICompatibleClient from docauditai's LLM config."""
base_url = LLM_BASE_URL
base_url = normalize_openai_base_url(LLM_BASE_URL)
model = LLM_MODEL
api_key = LLM_API_KEY or "no-key"
@@ -93,7 +94,7 @@ def create_llm_client() -> BaseLLMClient:
def create_vlm_client() -> BaseVLMClient | None:
"""Create a leaudit QwenVLMClient from docauditai's VLM config."""
base_url = VLM_BASE_URL
base_url = normalize_openai_base_url(VLM_BASE_URL)
model = VLM_MODEL
api_key = VLM_API_KEY or LLM_API_KEY or "no-key"