Skip to content

Commit

Permalink
replace int id with time.time()
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Sep 12, 2023
1 parent 4f38670 commit 0e1f6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ai_ta_backend/nomic_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def log_convo_to_nomic(course_name: str, conversation) -> str:

# update metadata
metadata = [{"course": course_name, "conversation": prev_convo, "conversation_id": conversation_id,
"id": last_id+1, "user_email": user_email, "first_query": first_message}]
"id": time.time(), "user_email": user_email, "first_query": first_message}]
else:
print("conversation_id does not exist")

Expand All @@ -94,7 +94,7 @@ def log_convo_to_nomic(course_name: str, conversation) -> str:
conversation_string += "\n>>> " + emoji + message['role'] + ": " + message['content'] + "\n"

metadata = [{"course": course_name, "conversation": conversation_string, "conversation_id": conversation_id,
"id": last_id+1, "user_email": user_email, "first_query": first_message}]
"id": time.time(), "user_email": user_email, "first_query": first_message}]

# create embeddings
embeddings_model = OpenAIEmbeddings()
Expand Down

0 comments on commit 0e1f6af

Please sign in to comment.