@@ -46,8 +46,6 @@ async def analyze_market(request: Request, req: AnalyzeRequest):
|
||||
from datetime import date as date_cls
|
||||
|
||||
repo = request.app.state.repo
|
||||
quote_service = getattr(request.app.state, "quote_service", None)
|
||||
depth_service = getattr(request.app.state, "depth_service", None)
|
||||
|
||||
as_of = None
|
||||
if req.as_of:
|
||||
@@ -57,7 +55,7 @@ async def analyze_market(request: Request, req: AnalyzeRequest):
|
||||
raise HTTPException(400, f"as_of 格式应为 YYYY-MM-DD,收到: {req.as_of}")
|
||||
|
||||
async def stream_gen():
|
||||
async for chunk in recap_market_stream(repo, quote_service, depth_service, as_of, req.focus):
|
||||
async for chunk in recap_market_stream(repo, as_of, req.focus):
|
||||
yield chunk + "\n"
|
||||
|
||||
return StreamingResponse(
|
||||
|
||||
Reference in New Issue
Block a user