Skip to content

Commit

Permalink
added print statements in create_map()
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Sep 11, 2023
1 parent b8cc471 commit 7b046d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ai_ta_backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,16 @@ def logToNomic():
print("course_name: ", course_name)
print("conversation: ", conversation)

print("print json: ", request.get_json())
# print("print json: ", request.get_json())
data = request.get_json()
print(len(data))
print(type(data))

course_name = data['course_name']
conversation = data['conversation']

print("course_name: ", course_name)
print("conversation: ", conversation)
# print("course_name: ", course_name)
# print("conversation: ", conversation)

if course_name == '' or conversation == '':
# proper web error "400 Bad request"
Expand Down
3 changes: 2 additions & 1 deletion ai_ta_backend/nomic_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def log_convo_to_nomic(course_name: str, conversation) -> str:
user_email = conversation['conversation']['user_email']
conversation_id = conversation['conversation']['id']

print("conversation: ", conversation)
#print("conversation: ", conversation)

# we have to upload whole conversations
# check what the fetched data looks like - pandas df or pyarrow table
Expand Down Expand Up @@ -142,6 +142,7 @@ def create_nomic_map(course_name: str, log_data: list):
2. appends current embeddings and metadata to it
2. creates map if there are at least 20 queries
"""
print("in create_nomic_map()")
# initialize supabase
supabase_client = supabase.create_client( # type: ignore
supabase_url=os.getenv('SUPABASE_URL'), # type: ignore
Expand Down

0 comments on commit 7b046d6

Please sign in to comment.