mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
fix: images streamed by the model are saved several times (#32054)
When a model streams its images in separate chunks, each new chunk saved all earlier images again, so the copies doubled with every image: four images were stored as fifteen and the chat showed duplicates. New replies now keep each image once. Chats that already hold duplicates stay as they are. Fixes #32053
This commit is contained in:
parent
8f11fda874
commit
6e2ef55e52
1 changed files with 2 additions and 1 deletions
|
|
@ -5392,9 +5392,10 @@ async def streaming_chat_response_handler(response, ctx):
|
|||
if message_files is None:
|
||||
message_files = image_file_list
|
||||
|
||||
# 'files' would make the emitter save these again.
|
||||
await event_emitter(
|
||||
{
|
||||
'type': 'files',
|
||||
'type': 'chat:message:files',
|
||||
'data': {'files': message_files},
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue