From 51d0c9b8b05dbcea1ff976aee26ac6fcdc3b0340 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Thu, 28 Mar 2024 11:37:24 +0530 Subject: [PATCH] Add telemetry to keep state of new agents being used --- src/khoj/routers/api_chat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/khoj/routers/api_chat.py b/src/khoj/routers/api_chat.py index 470e8946..c40016c4 100644 --- a/src/khoj/routers/api_chat.py +++ b/src/khoj/routers/api_chat.py @@ -178,10 +178,15 @@ async def create_chat_session( response = {"conversation_id": conversation.id} + conversation_metadata = { + "agent": agent_slug, + } + update_telemetry_state( request=request, telemetry_type="api", api="create_chat_sessions", + metadata=conversation_metadata, **common.__dict__, )