mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 21:53:37 +00:00
refac
This commit is contained in:
parent
31c176a485
commit
df07d671ce
@ -1321,12 +1321,6 @@ async def process_chat_response(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if end:
|
if end:
|
||||||
data = {
|
|
||||||
"content": serialize_content_blocks(
|
|
||||||
content_blocks
|
|
||||||
),
|
|
||||||
}
|
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if ENABLE_REALTIME_CHAT_SAVE:
|
if ENABLE_REALTIME_CHAT_SAVE:
|
||||||
@ -1370,6 +1364,15 @@ async def process_chat_response(
|
|||||||
if not content_blocks[-1]["content"]:
|
if not content_blocks[-1]["content"]:
|
||||||
content_blocks.pop()
|
content_blocks.pop()
|
||||||
|
|
||||||
|
await event_emitter(
|
||||||
|
{
|
||||||
|
"type": "chat:completion",
|
||||||
|
"data": {
|
||||||
|
"content": serialize_content_blocks(content_blocks),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
if response.background:
|
if response.background:
|
||||||
await response.background()
|
await response.background()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user