mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-07 03:48:44 +08:00
[Bug]: Workflow agent completions default stream=True when stream is omitted (#15484)
## Summary Closes #15483. Default workflow/session agent completions to non-streaming when `stream` is omitted. ## Changes - `api/apps/restful_apis/agent_api.py`: `req.get("stream", False)` on workflow paths. ## Test plan - [ ] POST workflow completion without `stream`; assert JSON response.
This commit is contained in:
committed by
GitHub
parent
8a19c6aa5a
commit
5a8660df23
@@ -1437,7 +1437,7 @@ async def agent_chat_completion(tenant_id, agent_id=None):
|
||||
canvas_title=getattr(cvs, "title", ""),
|
||||
canvas_category=getattr(cvs, "canvas_category", CanvasCategory.Agent),
|
||||
return_trace=bool(req.get("return_trace", False)),
|
||||
stream=req.get("stream", True),
|
||||
stream=req.get("stream", False),
|
||||
chat_template_kwargs=req.get("chat_template_kwargs"),
|
||||
)
|
||||
|
||||
@@ -1585,12 +1585,12 @@ async def agent_chat_completion(tenant_id, agent_id=None):
|
||||
canvas_title=canvas_title,
|
||||
canvas_category=canvas_category,
|
||||
return_trace=bool(req.get("return_trace", False)),
|
||||
stream=req.get("stream", True),
|
||||
stream=req.get("stream", False),
|
||||
chat_template_kwargs=req.get("chat_template_kwargs"),
|
||||
)
|
||||
|
||||
return_trace = bool(req.get("return_trace", False))
|
||||
if req.get("stream", True):
|
||||
if req.get("stream", False):
|
||||
|
||||
async def generate():
|
||||
emitted = False
|
||||
|
||||
Reference in New Issue
Block a user