unified message structure on sse stream & message get thread

This commit is contained in:
marko-kraemer 2025-04-18 06:22:06 +01:00
parent aae78a0667
commit 582f0d228b
2 changed files with 539 additions and 733 deletions

File diff suppressed because it is too large Load Diff

View File

@ -89,9 +89,8 @@ class ThreadManager:
print(f"MESSAGE RESULT: {result}")
# Check the structure of result.data before accessing
if result.data and len(result.data) > 0 and isinstance(result.data[0], dict) and 'message_id' in result.data[0]:
return result.data[0]['message_id']
return result.data[0]
else:
logger.error(f"Insert operation failed or did not return expected data structure for thread {thread_id}. Result data: {result.data}")
return None