mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 16:07:01 +08:00
refactor: clear public entrypoint complexity debt
This commit is contained in:
+22
-13
@@ -1957,19 +1957,7 @@ async def stop_web_agent_session_task(
|
||||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/stream",
|
||||
summary="Web智能助手流式对话",
|
||||
response_model=None,
|
||||
response_class=StreamingResponse,
|
||||
responses={
|
||||
200: {
|
||||
"description": "Agent SSE 事件流",
|
||||
"content": {"text/event-stream": {"schema": {"type": "string"}}},
|
||||
}
|
||||
},
|
||||
)
|
||||
async def web_agent_stream(
|
||||
async def _web_agent_stream_impl(
|
||||
payload: _SchemaAgentWebChatRequest,
|
||||
request: Request,
|
||||
current_user: ApiPrincipal = Depends(get_current_active_user),
|
||||
@@ -2315,3 +2303,24 @@ async def web_agent_stream(
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@router.post(
|
||||
"/stream",
|
||||
summary="Web智能助手流式对话",
|
||||
response_model=None,
|
||||
response_class=StreamingResponse,
|
||||
responses={
|
||||
200: {
|
||||
"description": "Agent SSE 事件流",
|
||||
"content": {"text/event-stream": {"schema": {"type": "string"}}},
|
||||
}
|
||||
},
|
||||
)
|
||||
async def web_agent_stream(
|
||||
payload: _SchemaAgentWebChatRequest,
|
||||
request: Request,
|
||||
current_user: ApiPrincipal = Depends(get_current_active_user),
|
||||
) -> StreamingResponse:
|
||||
"""Web 智能助手流式对话的稳定公开路由入口。"""
|
||||
return await _web_agent_stream_impl(payload, request, current_user)
|
||||
|
||||
Reference in New Issue
Block a user