exceptions
AIHordeRequestError
Bases: HordeException
Exception for when the AI Horde API returns an error response.
Source code in horde_sdk/ai_horde_api/exceptions.py
__init__
Initialize an AI Horde request error.
Parameters:
-
error_response(RequestErrorResponse) –The error response returned by the AI Horde API.
Source code in horde_sdk/ai_horde_api/exceptions.py
AIHordeImageValidationError
Bases: AIHordeRequestError
Exception for when the AI Horde API cannot parse a source image for img2img.
Source code in horde_sdk/ai_horde_api/exceptions.py
__init__
Initialize an AI Horde request error.
Parameters:
-
error_response(RequestErrorResponse) –The error response returned by the AI Horde API.
Source code in horde_sdk/ai_horde_api/exceptions.py
AIHordeGenerationTimedOutError
Bases: HordeException
Exception for when the time limit for a generation request is reached.
Source code in horde_sdk/ai_horde_api/exceptions.py
__init__
Initialize an AI Horde generation timed out error.
Parameters:
-
error_response(RequestErrorResponse) –The error response returned by the AI Horde API.
Source code in horde_sdk/ai_horde_api/exceptions.py
AIHordeServerException
Bases: HordeException
Base exception for any case where the AI Horde API returns a RequestErrorResponse and it was not handled.
Source code in horde_sdk/ai_horde_api/exceptions.py
__init__
__init__(
*,
message: str = "The AI Horde API returned an error response and it wasn't handled.",
error_response: RequestErrorResponse
) -> None
Initialize the exception.
Parameters:
-
message(str, default:"The AI Horde API returned an error response and it wasn't handled.") –The message to display to the user.
-
error_response(RequestErrorResponse) –The error response returned by the AI Horde API.