Bases: HordeResponseBaseModel, ResponseWithProgressMixin, ResponseGenerationProgressInfoMixin
Represents the data returned from the /v2/generate/check/{id} endpoint.
v2 API Model: RequestStatusCheck
Source code in horde_sdk/ai_horde_api/apimodels/generate/_check.py
| class ImageGenerateCheckResponse(
HordeResponseBaseModel,
ResponseWithProgressMixin,
ResponseGenerationProgressInfoMixin,
):
"""Represents the data returned from the `/v2/generate/check/{id}` endpoint.
v2 API Model: `RequestStatusCheck`
"""
@override
@classmethod
def get_api_model_name(cls) -> str | None:
return "RequestStatusCheck"
@override
def is_job_complete(self, number_of_result_expected: int) -> bool:
if self.done and self.finished != number_of_result_expected:
logger.error(
"There is a mismatch between the number of results expected and the number of results "
"finished. This should not happen - tell the developers about this error.",
)
return self.done
@override
def is_job_possible(self) -> bool:
return self.is_possible
@override
@classmethod
def get_finalize_success_request_type(cls) -> type[ImageGenerateStatusRequest]:
return ImageGenerateStatusRequest
|
get_api_model_name
classmethod
get_api_model_name() -> str | None
Source code in horde_sdk/ai_horde_api/apimodels/generate/_check.py
| @override
@classmethod
def get_api_model_name(cls) -> str | None:
return "RequestStatusCheck"
|
is_job_complete
is_job_complete(number_of_result_expected: int) -> bool
Source code in horde_sdk/ai_horde_api/apimodels/generate/_check.py
| @override
def is_job_complete(self, number_of_result_expected: int) -> bool:
if self.done and self.finished != number_of_result_expected:
logger.error(
"There is a mismatch between the number of results expected and the number of results "
"finished. This should not happen - tell the developers about this error.",
)
return self.done
|
is_job_possible
is_job_possible() -> bool
Source code in horde_sdk/ai_horde_api/apimodels/generate/_check.py
| @override
def is_job_possible(self) -> bool:
return self.is_possible
|
get_finalize_success_request_type
classmethod
get_finalize_success_request_type() -> type[ImageGenerateStatusRequest]
Source code in horde_sdk/ai_horde_api/apimodels/generate/_check.py
| @override
@classmethod
def get_finalize_success_request_type(cls) -> type[ImageGenerateStatusRequest]:
return ImageGenerateStatusRequest
|