From d0538e32c9e37e453f138b0831f74891b6448242 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 27 Nov 2023 09:04:50 -0800 Subject: [PATCH] (feat) completion: sagemaker debugging - show boto3 request sent --- litellm/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 45e8f59d75..e1e9b22a42 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -572,9 +572,12 @@ class Logging: curl_command += f"{api_base} \\\n" curl_command += f"{formatted_headers} \\\n" if formatted_headers.strip() != "" else "" curl_command += f"-d '{str(data)}'\n" - if api_base == "": + if additional_args.get("request_str", None) is not None: + # print the sagemaker / bedrock client request + curl_command = "\nRequest Sent from LiteLLM:\n" + curl_command += additional_args.get("request_str", None) + elif api_base == "": curl_command = self.model_call_details - print_verbose(f"\033[92m{curl_command}\033[0m\n") if self.logger_fn and callable(self.logger_fn): try: