From a012f231b66d66d1a7b2223826ae43b41b9a07e8 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 27 Jun 2024 17:37:02 -0700 Subject: [PATCH 1/3] azure - fix custom logger on post call --- litellm/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/main.py b/litellm/main.py index 649581936..318d0b7fe 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -1025,7 +1025,7 @@ def completion( client=client, # pass AsyncAzureOpenAI, AzureOpenAI client ) - if optional_params.get("stream", False) or acompletion == True: + if optional_params.get("stream", False): ## LOGGING logging.post_call( input=messages, From 57ba0a46b702f33864d059c9f17522b2ec608d04 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 27 Jun 2024 17:38:03 -0700 Subject: [PATCH 2/3] azure - log post api call --- litellm/llms/azure.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/litellm/llms/azure.py b/litellm/llms/azure.py index 5d73b9435..fe10cc017 100644 --- a/litellm/llms/azure.py +++ b/litellm/llms/azure.py @@ -660,8 +660,16 @@ class AzureChatCompletion(BaseLLM): response = await azure_client.chat.completions.create( **data, timeout=timeout ) + + stringified_response = response.model_dump() + logging_obj.post_call( + input=data["messages"], + api_key=api_key, + original_response=stringified_response, + additional_args={"complete_input_dict": data}, + ) return convert_to_model_response_object( - response_object=response.model_dump(), + response_object=stringified_response, model_response_object=model_response, ) except AzureOpenAIError as e: From 96d3780a53a0cfe55d0b7de92f6aa35ed5eeb609 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Thu, 27 Jun 2024 17:47:10 -0700 Subject: [PATCH 3/3] fix test secrets --- enterprise/enterprise_hooks/secret_detection.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/enterprise/enterprise_hooks/secret_detection.py b/enterprise/enterprise_hooks/secret_detection.py index 23dd2a7e0..d2bd22a5d 100644 --- a/enterprise/enterprise_hooks/secret_detection.py +++ b/enterprise/enterprise_hooks/secret_detection.py @@ -379,10 +379,6 @@ _default_detect_secrets_config = { "name": "ShopifyDetector", "path": _custom_plugins_path + "/shopify.py", }, - { - "name": "SidekiqDetector", - "path": _custom_plugins_path + "/sidekiq.py", - }, { "name": "SlackDetector", "path": _custom_plugins_path + "/slack.py",