From 85a3c675749202c25edf2b2dea5b8c25ec9bf496 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Fri, 15 Dec 2023 08:07:25 +0530 Subject: [PATCH] (feat) - acompletion, correct exception mapping --- litellm/llms/openai.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/litellm/llms/openai.py b/litellm/llms/openai.py index 64473590bb7..e541b108969 100644 --- a/litellm/llms/openai.py +++ b/litellm/llms/openai.py @@ -285,13 +285,7 @@ class OpenAIChatCompletion(BaseLLM): ) return convert_to_model_response_object(response_object=json.loads(stringified_response), model_response_object=model_response) except Exception as e: - if response and hasattr(response, "text"): - raise OpenAIError(status_code=500, message=f"{str(e)}\n\nOriginal Response: {response.text}") - else: - if type(e).__name__ == "ReadTimeout": - raise OpenAIError(status_code=408, message=f"{type(e).__name__}") - else: - raise OpenAIError(status_code=500, message=f"{str(e)}") + raise e def streaming(self, logging_obj,