mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 03:09:19 +08:00
feat: 模型管理独立页与会话级选模型
This commit is contained in:
@@ -52,7 +52,13 @@ class ChatService:
|
||||
raise ValueError("消息不能为空")
|
||||
|
||||
session = await self._sessions.require_owned(actor, thread_id)
|
||||
llm = await self._llm_runtime.resolve_runtime(actor.company_id)
|
||||
llm = await self._llm_runtime.resolve_runtime(
|
||||
actor.company_id, model=session.llm_model
|
||||
)
|
||||
# 会话未记模型或回落后写回,保证列表/选框有稳定值
|
||||
if not session.llm_model or session.llm_model != llm.model:
|
||||
session.llm_model = llm.model
|
||||
await self._session_repo.update(session)
|
||||
just_saved = await self._memory.maybe_capture_from_user(
|
||||
actor, thread_id=thread_id, text=text
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user