mirror of
https://github.com/open-webui/open-webui
synced 2024-12-28 14:52:23 +00:00
fix
This commit is contained in:
parent
b1b2a6d78c
commit
cf0aca1487
@ -528,7 +528,14 @@ async def process_chat_response(request, response, user, events, metadata, tasks
|
||||
return response
|
||||
|
||||
event_emitter = None
|
||||
if "session_id" in metadata:
|
||||
if (
|
||||
"session_id" in metadata
|
||||
and metadata["session_id"]
|
||||
and "chat_id" in metadata
|
||||
and metadata["chat_id"]
|
||||
and "message_id" in metadata
|
||||
and metadata["message_id"]
|
||||
):
|
||||
event_emitter = get_event_emitter(metadata)
|
||||
|
||||
if event_emitter:
|
||||
@ -701,6 +708,7 @@ async def process_chat_response(request, response, user, events, metadata, tasks
|
||||
return {"status": True, "task_id": task_id}
|
||||
|
||||
else:
|
||||
|
||||
# Fallback to the original response
|
||||
async def stream_wrapper(original_generator, events):
|
||||
def wrap_item(item):
|
||||
|
Loading…
Reference in New Issue
Block a user