mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
adding exception handling for together ai
This commit is contained in:
parent
9ce30157d0
commit
c790dfe323
8 changed files with 96 additions and 43 deletions
|
@ -28,6 +28,17 @@ class InvalidRequestError(InvalidRequestError): # type: ignore
|
|||
self.message, f"{self.model}"
|
||||
) # Call the base class constructor with the parameters it needs
|
||||
|
||||
# sub class of invalid request error - meant to give more granularity for error handling context window exceeded errors
|
||||
class ContextWindowExceededError(InvalidRequestError): # type: ignore
|
||||
def __init__(self, message, model, llm_provider):
|
||||
self.status_code = 400
|
||||
self.message = message
|
||||
self.model = model
|
||||
self.llm_provider = llm_provider
|
||||
super().__init__(
|
||||
self.message, self.model, self.llm_provider
|
||||
) # Call the base class constructor with the parameters it needs
|
||||
|
||||
|
||||
class RateLimitError(RateLimitError): # type: ignore
|
||||
def __init__(self, message, llm_provider):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue