From 31c995a1a401357c040e124068e653005b51f4f4 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 21 Sep 2023 14:10:27 -0700 Subject: [PATCH] fix linting errors --- litellm/utils.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index bb88101c1..c754c26ea 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -2756,7 +2756,7 @@ def mock_completion_streaming_obj(model_response, mock_response, model): yield model_response ########## Reading Config File ############################ -def read_config_args(config_path): +def read_config_args(config_path) -> dict: try: import os @@ -2815,7 +2815,7 @@ def completion_with_config(*args, config: Union[dict, str], **kwargs): except Exception as e: exception_name = type(e).__name__ fallback_model = None - if exception_name in error_handling: + if error_handling and exception_name in error_handling: error_handler = error_handling[exception_name] # either switch model or api key fallback_model = error_handler.get("fallback_model", None) diff --git a/pyproject.toml b/pyproject.toml index 467a239d2..56d588af0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.725" +version = "0.1.726" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"