多智能体协作修改
This commit is contained in:
1 parent
eeb7f30585
commit
d1e6cd5a8f
3 files changed
+424
No files matched your search
@@ -47,6 +47,7 @@ import httpx
|
||||
from fastapi import APIRouter, Body, HTTPException, Request
|
||||
from fastapi.responses import StreamingResponse
|
||||
|
||||
from app.gateway.routers._roundtable_seed import ensure_roundtable_functional_agents
|
||||
from app.gateway.routers.multi_agent import (
|
||||
_auth_headers,
|
||||
_create_thread,
|
||||
@@ -189,6 +190,10 @@ async def stream_recommend(request: Request, payload: dict = Body(...)) -> Strea
|
||||
if not candidate_ids:
|
||||
raise HTTPException(status_code=400, detail="candidates must contain at least one valid agent_id")
|
||||
|
||||
# 调用前自检:内网部署 .deer-flow/ 被 gitignore,roundtable-recommender 目录可能不存在,
|
||||
# 缺失则用嵌入模板补建,避免下游 lead_agent 解析失败抛 500。
|
||||
ensure_roundtable_functional_agents()
|
||||
|
||||
prompt = _build_prompt(intent, candidates)
|
||||
base = _loopback_base(request)
|
||||
headers = _auth_headers(request)
|
||||
|
||||
Reference in new issue
Block a user