From c583cbdbcd02a7902ffa5ec977c3f98fb6760855 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 31 Jul 2024 07:19:45 -0700 Subject: [PATCH] fix: fix linting errors --- litellm/llms/custom_httpx/http_handler.py | 8 ++------ litellm/llms/predibase.py | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/litellm/llms/custom_httpx/http_handler.py b/litellm/llms/custom_httpx/http_handler.py index b123514dd2..9fee97bd78 100644 --- a/litellm/llms/custom_httpx/http_handler.py +++ b/litellm/llms/custom_httpx/http_handler.py @@ -111,11 +111,9 @@ class AsyncHTTPHandler: finally: await new_client.aclose() except httpx.TimeoutException: - if data is None: - data = {} raise litellm.Timeout( message=f"Connection timed out after {timeout} seconds.", - model=data.get("model"), + model="default-model-name", llm_provider="litellm-httpx-handler", ) except httpx.HTTPStatusError as e: @@ -221,11 +219,9 @@ class HTTPHandler: response = self.client.send(req, stream=stream) return response except httpx.TimeoutException: - if data is None: - data = {} raise litellm.Timeout( message=f"Connection timed out after {timeout} seconds.", - model=data.get("model"), + model="default-model-name", llm_provider="litellm-httpx-handler", ) except Exception as e: diff --git a/litellm/llms/predibase.py b/litellm/llms/predibase.py index 62dcebb8c1..68c52ef2e3 100644 --- a/litellm/llms/predibase.py +++ b/litellm/llms/predibase.py @@ -487,7 +487,7 @@ class PredibaseChatCompletion(BaseLLM): headers=headers, data=json.dumps(data), stream=stream, - timeout=timeout, + timeout=timeout, # type: ignore ) _response = CustomStreamWrapper( response.iter_lines(), @@ -502,7 +502,7 @@ class PredibaseChatCompletion(BaseLLM): url=completion_url, headers=headers, data=json.dumps(data), - timeout=timeout, + timeout=timeout, # type: ignore ) return self.process_response( model=model,