mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 12:05:54 +00:00
feat: webchat stream is ok
This commit is contained in:
@@ -14,8 +14,8 @@ 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 f"data: {json.dumps({'message': message})}\n\n"
|
||||
yield "data: {\"type\": \"end\"}\n\n"
|
||||
try:
|
||||
data = await quart.request.get_json()
|
||||
session_type = data.get('session_type', 'person')
|
||||
|
||||
Reference in New Issue
Block a user