[AC-AISVC-02, AC-AISVC-16] 多个需求合并 #1

Merged
MerCry merged 45 commits from feature/prompt-unification-and-logging into main 2026-02-25 17:17:35 +00:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit dd74ae2585 - Show all commits

View File

@ -32,12 +32,12 @@ async def get_orchestrator_service_with_memory(
Ensures each request has a fresh MemoryService with database session.
"""
from app.services.llm.factory import get_llm_config_manager
from app.services.retrieval.vector_retriever import get_vector_retriever
from app.services.retrieval.optimized_retriever import get_optimized_retriever
memory_service = MemoryService(session)
llm_config_manager = get_llm_config_manager()
llm_client = llm_config_manager.get_client()
retriever = await get_vector_retriever()
retriever = await get_optimized_retriever()
return OrchestratorService(
llm_client=llm_client,

View File

@ -402,6 +402,12 @@ class OrchestratorService:
messages.extend(ctx.merged_context.messages)
messages.append({"role": "user", "content": ctx.current_message})
logger.info(
f"[AC-AISVC-02] Built {len(messages)} messages for LLM: "
f"system_len={len(system_content)}, history_count={len(ctx.merged_context.messages) if ctx.merged_context else 0}"
)
logger.debug(f"[AC-AISVC-02] System prompt preview: {system_content[:500]}...")
return messages