mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-06 10:40:43 -08:00
- Changed the default value of `extra_body` from an empty dictionary to `None` in `ImageLabs` and `PollinationsAI` classes. - Added a check to initialize `extra_body` to an empty dictionary if it is `None` in the `ImageLabs` class. - Removed the `extra_image_models` list from the `PollinationsAI` class. - Updated the way image models are combined in the `PollinationsAI` class to avoid duplicates. - Changed the error handling for unsupported models from `ModelNotSupportedError` to `ModelNotFoundError` in multiple classes including `OpenaiChat`, `HuggingFaceAPI`, and `HuggingFaceInference`. - Updated the `save_response_media` function to handle both string and bytes responses. - Adjusted the handling of audio data in the `PollinationsAI` class to ensure proper processing of audio responses.
56 lines
No EOL
1 KiB
Python
56 lines
No EOL
1 KiB
Python
class ProviderNotFoundError(Exception):
|
|
...
|
|
|
|
class ProviderNotWorkingError(Exception):
|
|
...
|
|
|
|
class StreamNotSupportedError(Exception):
|
|
...
|
|
|
|
class ModelNotFoundError(Exception):
|
|
...
|
|
|
|
class ModelNotAllowedError(Exception):
|
|
...
|
|
|
|
class RetryProviderError(Exception):
|
|
...
|
|
|
|
class RetryNoProviderError(Exception):
|
|
...
|
|
|
|
class VersionNotFoundError(Exception):
|
|
...
|
|
|
|
class MissingRequirementsError(Exception):
|
|
...
|
|
|
|
class NestAsyncioError(MissingRequirementsError):
|
|
...
|
|
|
|
class MissingAuthError(Exception):
|
|
...
|
|
|
|
class PaymentRequiredError(Exception):
|
|
...
|
|
|
|
class NoMediaResponseError(Exception):
|
|
...
|
|
|
|
class ResponseError(Exception):
|
|
...
|
|
|
|
class ResponseStatusError(Exception):
|
|
...
|
|
|
|
class RateLimitError(ResponseStatusError):
|
|
...
|
|
|
|
class NoValidHarFileError(Exception):
|
|
...
|
|
|
|
class TimeoutError(Exception):
|
|
"""Raised for timeout errors during API requests."""
|
|
|
|
class ConversationLimitError(Exception):
|
|
"""Raised for conversation limit during API requests to AI endpoint.""" |