mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix: add type hints for APIError and AnthropicError status codes
Fixes https://github.com/BerriAI/litellm/issues/5000
This commit is contained in:
parent
aad0bbb08c
commit
1affd4e2ca
2 changed files with 3 additions and 3 deletions
|
@ -543,7 +543,7 @@ class InternalServerError(openai.InternalServerError): # type: ignore
|
|||
class APIError(openai.APIError): # type: ignore
|
||||
def __init__(
|
||||
self,
|
||||
status_code,
|
||||
status_code: int,
|
||||
message,
|
||||
llm_provider,
|
||||
model,
|
||||
|
@ -754,7 +754,7 @@ class MockException(openai.APIError):
|
|||
# used for testing
|
||||
def __init__(
|
||||
self,
|
||||
status_code,
|
||||
status_code: int,
|
||||
message,
|
||||
llm_provider,
|
||||
model,
|
||||
|
|
|
@ -72,7 +72,7 @@ class AnthropicConstants(Enum):
|
|||
|
||||
|
||||
class AnthropicError(Exception):
|
||||
def __init__(self, status_code, message):
|
||||
def __init__(self, status_code: int, message):
|
||||
self.status_code = status_code
|
||||
self.message: str = message
|
||||
self.request = httpx.Request(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue