mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
fix: chat completion non-existent model issue
This commit is contained in:
@@ -1108,6 +1108,8 @@ async def chat_completion(
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug(f"Error processing chat payload: {e}")
|
log.debug(f"Error processing chat payload: {e}")
|
||||||
|
if metadata.get("chat_id") and metadata.get("message_id"):
|
||||||
|
# Update the chat message with the error
|
||||||
Chats.upsert_message_to_chat_by_id_and_message_id(
|
Chats.upsert_message_to_chat_by_id_and_message_id(
|
||||||
metadata["chat_id"],
|
metadata["chat_id"],
|
||||||
metadata["message_id"],
|
metadata["message_id"],
|
||||||
|
|||||||
Reference in New Issue
Block a user