fix(timeout.py): fix timeout issue

This commit is contained in:
Krrish Dholakia 2023-11-13 11:07:09 -08:00
parent 8ae511b178
commit b6eea3cf8e
3 changed files with 5 additions and 4 deletions

View file

@ -46,11 +46,12 @@ class BadRequestError(BadRequestError): # type: ignore
) # Call the base class constructor with the parameters it needs
class Timeout(APITimeoutError): # type: ignore
def __init__(self, message, model, llm_provider, request: httpx.Request):
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")
super().__init__(
request=request
) # Call the base class constructor with the parameters it needs