perf(prompt_opt): optimize streaming output structure and add variable parsing

This commit is contained in:
mengyonghao
2026-01-05 17:31:28 +08:00
parent 29ccf956ec
commit 05ec76f940
2 changed files with 5 additions and 5 deletions

View File

@@ -117,7 +117,7 @@ async def get_prompt_opt(
user_require=data.message
):
# chunk 是 prompt 的增量内容
yield f"event:'message'\ndata: {json.dumps(chunk)}\n\n"
yield f"event:message\ndata: {json.dumps(chunk)}\n\n"
return StreamingResponse(
event_generator(),