Skip to content

Commit

Permalink
Log follow-up questions to Nomic Convo-Maps (#240)
Browse files Browse the repository at this point in the history
* added function to log to existing conversations

* changed log_to_existing_conversation() logic

* added try-except

* removed log.py

* minor changes

* removed one function call

* minor changes
  • Loading branch information
star-nox authored Apr 5, 2024
1 parent b50ae9c commit 05a59ca
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 263 deletions.
3 changes: 3 additions & 0 deletions ai_ta_backend/database/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,6 @@ def getConvoMapFromProjects(self, course_name: str):
def updateProjects(self, course_name: str, data: dict):
return self.supabase_client.table("projects").update(data).eq("course_name", course_name).execute()

def getConversation(self, course_name: str, key: str, value: str):
return self.supabase_client.table("llm-convo-monitor").select("*").eq(key, value).eq("course_name", course_name).execute()

2 changes: 1 addition & 1 deletion ai_ta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def logToNomic(service: NomicService, flaskExecutor: ExecutorInterface):

# background execution of tasks!!
#response = flaskExecutor.submit(service.log_convo_to_nomic, course_name, data)
result = flaskExecutor.submit(service.log_to_conversation_map, course_name).result()
result = flaskExecutor.submit(service.log_to_conversation_map, course_name, conversation).result()
response = jsonify({'outcome': 'success'})
response.headers.add('Access-Control-Allow-Origin', '*')
return response
Expand Down
Loading

0 comments on commit 05a59ca

Please sign in to comment.