mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -901,7 +901,7 @@ async def process_chat_response(
|
||||
if message:
|
||||
messages = get_message_list(message_map, message.get("id"))
|
||||
|
||||
if tasks:
|
||||
if tasks and messages:
|
||||
if TASKS.TITLE_GENERATION in tasks:
|
||||
if tasks[TASKS.TITLE_GENERATION]:
|
||||
res = await generate_title(
|
||||
|
||||
@@ -20,7 +20,7 @@ def get_message_list(messages, message_id):
|
||||
current_message = messages.get(message_id)
|
||||
|
||||
if not current_message:
|
||||
return f"Message ID {message_id} not found in the history."
|
||||
return None
|
||||
|
||||
# Reconstruct the chain by following the parentId links
|
||||
message_list = []
|
||||
|
||||
Reference in New Issue
Block a user