fix(generic): agent_chat_generic 透传前端模型选择 model_id
This commit is contained in:
parent
914f883ed3
commit
c848bda300
@ -26,8 +26,12 @@ if action == 'send_message':
|
||||
from pipeline_service.gateway import get_gateway
|
||||
gateway = get_gateway()
|
||||
|
||||
# 前端模型下拉选中的模型必须透传——之前忽略导致用户选了模型仍走默认值,
|
||||
# 默认模型名与 llm 表不匹配时直接"无可用模型"卡死。
|
||||
model_id = (params_kw or {}).get('model_id', '') or ''
|
||||
|
||||
async def agent_stream():
|
||||
async for chunk in gateway.run_message("web", uid, prompt, generic=True):
|
||||
async for chunk in gateway.run_message("web", uid, prompt, generic=True, model_id=model_id):
|
||||
data = json.loads(chunk)
|
||||
t = data.get('type', '')
|
||||
if t == 'tool_call':
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user