This commit is contained in:
Timothy Jaeryang Baek
2025-02-03 18:36:49 -08:00
parent aa7184ae0d
commit 8fdd3024f7
3 changed files with 31 additions and 39 deletions

View File

@@ -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(

View File

@@ -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 = []