mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(openai.py): fix post call error logging for aembedding calls
This commit is contained in:
parent
3dee98dc47
commit
b91e5d3887
1 changed files with 14 additions and 0 deletions
|
@ -1376,8 +1376,22 @@ class OpenAIChatCompletion(BaseLLM):
|
||||||
_response_headers=headers,
|
_response_headers=headers,
|
||||||
) # type: ignore
|
) # type: ignore
|
||||||
except OpenAIError as e:
|
except OpenAIError as e:
|
||||||
|
## LOGGING
|
||||||
|
logging_obj.post_call(
|
||||||
|
input=input,
|
||||||
|
api_key=api_key,
|
||||||
|
additional_args={"complete_input_dict": data},
|
||||||
|
original_response=str(e),
|
||||||
|
)
|
||||||
raise e
|
raise e
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
## LOGGING
|
||||||
|
logging_obj.post_call(
|
||||||
|
input=input,
|
||||||
|
api_key=api_key,
|
||||||
|
additional_args={"complete_input_dict": data},
|
||||||
|
original_response=str(e),
|
||||||
|
)
|
||||||
status_code = getattr(e, "status_code", 500)
|
status_code = getattr(e, "status_code", 500)
|
||||||
error_headers = getattr(e, "headers", None)
|
error_headers = getattr(e, "headers", None)
|
||||||
raise OpenAIError(
|
raise OpenAIError(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue