Skip to content

Commit

Permalink
added condition when user email is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Feb 28, 2024
1 parent f8f6c6e commit 902edf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ai_ta_backend/nomic_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def log_convo_to_nomic(course_name: str, conversation) -> str:
print("conversation:", conversation)
#conversation = json.loads(conversation)
messages = conversation['conversation']['messages']
user_email = conversation['conversation']['user_email']
if 'user_email' not in conversation['conversation']:
user_email = "NULL"
else:
user_email = conversation['conversation']['user_email']
conversation_id = conversation['conversation']['id']

# we have to upload whole conversations
Expand Down

0 comments on commit 902edf8

Please sign in to comment.