mirror of
https://github.com/open-webui/open-webui
synced 2024-12-28 06:42:47 +00:00
refac
This commit is contained in:
parent
c611734088
commit
271acb2e67
@ -561,6 +561,15 @@ async def process_chat_response(request, response, user, events, metadata, tasks
|
||||
}
|
||||
)
|
||||
|
||||
# Save message in the database
|
||||
Chats.upsert_message_to_chat_by_id_and_message_id(
|
||||
metadata["chat_id"],
|
||||
metadata["message_id"],
|
||||
{
|
||||
**event,
|
||||
},
|
||||
)
|
||||
|
||||
content = ""
|
||||
async for line in response.body_iterator:
|
||||
line = line.decode("utf-8") if isinstance(line, bytes) else line
|
||||
|
Loading…
Reference in New Issue
Block a user