mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 16:24:59 +00:00
fix: fix linting errors
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user