fix:webchat stream judge bug and frontend bug

This commit is contained in:
Dong_master
2025-07-31 14:49:12 +08:00
parent cb88da7f02
commit d9a2bb9a06
4 changed files with 54 additions and 34 deletions

View File

@@ -15,7 +15,7 @@ class WebChatDebugRouterGroup(group.RouterGroup):
async def stream_generator(generator):
async for message in generator:
yield rf"data:{json.dumps({'message': message})}\n\n"
yield "data:{'type': 'end'}\n\n''"
yield "data:{type: end}\n\n''"
try:
data = await quart.request.get_json()
session_type = data.get('session_type', 'person')