mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
fix - show api_base, model in exceptions
This commit is contained in:
parent
ca4fd85296
commit
7a5c07de22
1 changed files with 8 additions and 4 deletions
|
@ -82,14 +82,18 @@ class UnprocessableEntityError(UnprocessableEntityError): # type: ignore
|
||||||
|
|
||||||
class Timeout(APITimeoutError): # type: ignore
|
class Timeout(APITimeoutError): # type: ignore
|
||||||
def __init__(self, message, model, llm_provider):
|
def __init__(self, message, model, llm_provider):
|
||||||
self.status_code = 408
|
|
||||||
self.message = message
|
|
||||||
self.model = model
|
|
||||||
self.llm_provider = llm_provider
|
|
||||||
request = httpx.Request(method="POST", url="https://api.openai.com/v1")
|
request = httpx.Request(method="POST", url="https://api.openai.com/v1")
|
||||||
super().__init__(
|
super().__init__(
|
||||||
request=request
|
request=request
|
||||||
) # Call the base class constructor with the parameters it needs
|
) # Call the base class constructor with the parameters it needs
|
||||||
|
self.status_code = 408
|
||||||
|
self.message = message
|
||||||
|
self.model = model
|
||||||
|
self.llm_provider = llm_provider
|
||||||
|
|
||||||
|
# custom function to convert to str
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.message)
|
||||||
|
|
||||||
|
|
||||||
class PermissionDeniedError(PermissionDeniedError): # type:ignore
|
class PermissionDeniedError(PermissionDeniedError): # type:ignore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue