Skip to content

Commit

Permalink
modified function to create convo map from scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Mar 27, 2024
1 parent fc69d4c commit ea36017
Show file tree
Hide file tree
Showing 2 changed files with 374 additions and 663 deletions.
6 changes: 5 additions & 1 deletion ai_ta_backend/database/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def getAllFromTableForDownloadType(self, course_name: str, download_type: str, f

def getAllConversationsBetweenIds(self, course_name: str, first_id: int, last_id: int, limit: int = 50):
if last_id == 0:
return self.supabase_client.table("llm-convo-monitor").select("*").eq("course_name", course_name).gte(
return self.supabase_client.table("llm-convo-monitor").select("*").eq("course_name", course_name).gt(
'id', first_id).order('id', desc=False).limit(limit).execute()
else:
return self.supabase_client.table("llm-convo-monitor").select("*").eq("course_name", course_name).gte(
Expand All @@ -100,3 +100,7 @@ def getDocMapFromProjects(self, course_name: str):

def getConvoMapFromProjects(self, course_name: str):
return self.supabase_client.table("projects").select("convo_map_id").eq("course_name", course_name).execute()

def updateProjects(self, course_name: str, data: dict):
return self.supabase_client.table("projects").update(data).eq("course_name", course_name).execute()

Loading

0 comments on commit ea36017

Please sign in to comment.