chore(api/core): apply ruff reformatting (#7624)
This commit is contained in:
@@ -3,6 +3,7 @@ from typing import Optional
|
||||
|
||||
class LLMError(Exception):
|
||||
"""Base class for all LLM exceptions."""
|
||||
|
||||
description: Optional[str] = None
|
||||
|
||||
def __init__(self, description: Optional[str] = None) -> None:
|
||||
@@ -11,6 +12,7 @@ class LLMError(Exception):
|
||||
|
||||
class LLMBadRequestError(LLMError):
|
||||
"""Raised when the LLM returns bad request."""
|
||||
|
||||
description = "Bad Request"
|
||||
|
||||
|
||||
@@ -18,6 +20,7 @@ class ProviderTokenNotInitError(Exception):
|
||||
"""
|
||||
Custom exception raised when the provider token is not initialized.
|
||||
"""
|
||||
|
||||
description = "Provider Token Not Init"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -28,6 +31,7 @@ class QuotaExceededError(Exception):
|
||||
"""
|
||||
Custom exception raised when the quota for a provider has been exceeded.
|
||||
"""
|
||||
|
||||
description = "Quota Exceeded"
|
||||
|
||||
|
||||
@@ -35,6 +39,7 @@ class AppInvokeQuotaExceededError(Exception):
|
||||
"""
|
||||
Custom exception raised when the quota for an app has been exceeded.
|
||||
"""
|
||||
|
||||
description = "App Invoke Quota Exceeded"
|
||||
|
||||
|
||||
@@ -42,9 +47,11 @@ class ModelCurrentlyNotSupportError(Exception):
|
||||
"""
|
||||
Custom exception raised when the model not support
|
||||
"""
|
||||
|
||||
description = "Model Currently Not Support"
|
||||
|
||||
|
||||
class InvokeRateLimitError(Exception):
|
||||
"""Raised when the Invoke returns rate limit error."""
|
||||
|
||||
description = "Rate Limit Error"
|
||||
|
Reference in New Issue
Block a user