Skip to content

Commit

Permalink
Output time elapsed for generating embeddings from conversation
Browse files Browse the repository at this point in the history
  • Loading branch information
sabaimran committed Sep 2, 2023
1 parent 7b21467 commit a000d04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/flint/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ async def get_recent_conversations(user: User, uuid: str) -> ConversationBufferM
async def save_conversation(user, message, response, user_message_type="text"):
"Save the conversation to the database"

start_time = datetime.now()

log_telemetry(
telemetry_type="api",
user_guid=str(user.khojuser.uuid),
Expand Down Expand Up @@ -109,7 +111,9 @@ async def save_conversation(user, message, response, user_message_type="text"):
]
)

logger.info(f"💾 Saved conversation vector to the database for user {user.id}")
logger.info(
f"💾 Saved conversation vector to the database for user {user.id}. Generating conversation embeddings and saving {datetime.now() - start_time}"
)


def configure_routes(app: FastAPI):
Expand Down

0 comments on commit a000d04

Please sign in to comment.