fixed bugs

This commit is contained in:
belviskhoremk
2026-02-22 23:24:44 +00:00
parent 5bd496d355
commit 88ca23adde
6 changed files with 1605 additions and 241 deletions

View File

@@ -188,7 +188,7 @@ def _get_or_create_conversation(
def _get_conversation_history(conversation_id: str, supabase) -> List[dict]:
messages = supabase.table("messages").select("role, content") \
.eq("conversation_id", conversation_id) \
.order("created_at", asc=True) \
.order("created_at", desc=True) \
.limit(20) \
.execute()
return messages.data or []