统一抽象 封装 模型配置配置管理

This commit is contained in:
zk
2026-05-26 15:10:21 +08:00
parent b558863207
commit 18589adf8c
10 changed files with 131 additions and 31 deletions
+2 -3
View File
@@ -4,7 +4,7 @@
依赖:LLM 枚举、nova_chat/prompts
"""
from app.ai.models import LLM
from app.ai.model_config import NovaChatModel
from app.ai.nova_chat.prompts import SYSTEM_PROMPT
from app.core.logger import log
@@ -24,8 +24,7 @@ async def nova_chat(resume_text: str, message: str, history: list[dict],
messages.append(("human", message))
try:
llm = LLM.ZM_GPT_5_2.create(temperature=0.7)
result = await llm.ainvoke(messages)
result = await NovaChatModel.CHAT.ainvoke(messages)
return result.content.strip()
except Exception as e:
log.error(f"Nova Chat AI 调用失败: {e}")