mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
fix(sagemaker.py): fix the post-call logging logic
This commit is contained in:
parent
4c7d530c2a
commit
35fd28073e
1 changed files with 1 additions and 8 deletions
|
@ -360,14 +360,6 @@ def embedding(
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise SagemakerError(status_code=500, message=f"{str(e)}")
|
raise SagemakerError(status_code=500, message=f"{str(e)}")
|
||||||
|
|
||||||
## LOGGING
|
|
||||||
logging_obj.post_call(
|
|
||||||
input=input,
|
|
||||||
api_key="",
|
|
||||||
additional_args={"complete_input_dict": data},
|
|
||||||
original_response=response,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = json.loads(response["Body"].read().decode("utf8"))
|
response = json.loads(response["Body"].read().decode("utf8"))
|
||||||
## LOGGING
|
## LOGGING
|
||||||
logging_obj.post_call(
|
logging_obj.post_call(
|
||||||
|
@ -376,6 +368,7 @@ def embedding(
|
||||||
original_response=response,
|
original_response=response,
|
||||||
additional_args={"complete_input_dict": data},
|
additional_args={"complete_input_dict": data},
|
||||||
)
|
)
|
||||||
|
|
||||||
print_verbose(f"raw model_response: {response}")
|
print_verbose(f"raw model_response: {response}")
|
||||||
if "embedding" not in response:
|
if "embedding" not in response:
|
||||||
raise SagemakerError(status_code=500, message="embedding not found in response")
|
raise SagemakerError(status_code=500, message="embedding not found in response")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue