diff --git a/litellm/integrations/llmonitor.py b/litellm/integrations/llmonitor.py index 22acf874c0..761b12c9e1 100644 --- a/litellm/integrations/llmonitor.py +++ b/litellm/integrations/llmonitor.py @@ -109,7 +109,7 @@ class LLMonitorLogger: }, ] - # print_verbose(f"LLMonitor Logging - final data object: {data}") + print_verbose(f"LLMonitor Logging - final data object: {data}") response = requests.post( self.api_url + "/api/report", diff --git a/litellm/tests/test_llmonitor_integration.py b/litellm/tests/test_llmonitor_integration.py index a3183bf8f3..9a13d949ac 100644 --- a/litellm/tests/test_llmonitor_integration.py +++ b/litellm/tests/test_llmonitor_integration.py @@ -20,6 +20,7 @@ def test_chat_openai(): response = completion( model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hi 👋 - i'm openai"}], + user="ishaan_from_litellm" ) print(response) diff --git a/litellm/utils.py b/litellm/utils.py index 82a1ee8e80..ea33ed858a 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1831,7 +1831,7 @@ def handle_failure(exception, traceback_exception, start_time, end_time, args, k llmonitorLogger.log_event( type=type, event="error", - user_id=litellm._thread_context.user, + user_id=kwargs.get("user", "default"), model=model, input=input, error=traceback_exception, @@ -1951,7 +1951,7 @@ def handle_success(args, kwargs, result, start_time, end_time): event="end", model=model, input=input, - user_id=litellm._thread_context.user, + user_id=kwargs.get("user", "default"), response_obj=result, start_time=start_time, end_time=end_time, diff --git a/pyproject.toml b/pyproject.toml index 7e85d4bd32..af2f96350b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.822" +version = "0.1.823" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"