From aad78f75511881e2370e1deb4cf50063cb32cc82 Mon Sep 17 00:00:00 2001 From: Mohammad Amin Date: Mon, 22 Jan 2024 12:15:19 +0330 Subject: [PATCH] feat: Added tracing for LLM related calls! --- celery_app/tasks.py | 3 +++ docker-compose.test.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/celery_app/tasks.py b/celery_app/tasks.py index 95c651a..f66ccd0 100644 --- a/celery_app/tasks.py +++ b/celery_app/tasks.py @@ -14,6 +14,7 @@ ) from tc_messageBroker.rabbit_mq.payload.payload import Payload from tc_messageBroker.rabbit_mq.queue import Queue +from traceloop.sdk import Traceloop @app.task @@ -40,6 +41,8 @@ def ask_question_auto_search( - `date` - `content`: which is the `ChatInputCommandInteraction` as a dictionary """ + Traceloop.init() + prefix = f"COMMUNITY_ID: {community_id} | " logging.info(f"{prefix}Processing question!") diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 786b4d7..11fff88 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -12,6 +12,7 @@ services: - MONGODB_PORT=27017 - MONGODB_USER=root - MONGODB_PASS=pass + - TRACELOOP_BASE_URL=some_url - NEO4J_PROTOCOL=bolt - NEO4J_HOST=neo4j - NEO4J_PORT=7687