mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
fix: avoid rebinding infinity error headers
This commit is contained in:
parent
59ea2a5792
commit
19e098f7d2
1 changed files with 2 additions and 3 deletions
|
|
@ -5,8 +5,7 @@ from litellm.llms.base_llm.chat.transformation import BaseLLMException
|
|||
|
||||
class InfinityError(BaseLLMException):
|
||||
def __init__(self, status_code: int, message: str, headers: dict | httpx.Headers | None = None):
|
||||
if headers is None:
|
||||
headers = {}
|
||||
resolved_headers = {} if headers is None else headers
|
||||
self.status_code = status_code
|
||||
self.message = message
|
||||
self.request = httpx.Request(method="POST", url="https://github.com/michaelfeil/infinity")
|
||||
|
|
@ -16,5 +15,5 @@ class InfinityError(BaseLLMException):
|
|||
message=message,
|
||||
request=self.request,
|
||||
response=self.response,
|
||||
headers=headers,
|
||||
headers=resolved_headers,
|
||||
) # Call the base class constructor with the parameters it needs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue