horde_sdk.ratings_api.apimodels¶
Model definitions for AI Horde Ratings API.
__all__
module-attribute
¶
__all__ = [
"BaseImageRatingRecord",
"BaseRatingsAPIRequest",
"BaseSelectableReturnTypeRequest",
"HordeRequestImageSpecific",
"ImageRatingResponseSubRecord",
"ImageRatingsComparisonTypes",
"ImageRatingsFilterableRequestBase",
"ImageRatingsRequest",
"ImageRatingsResponse",
"SelectableReturnFormats",
"UserCheckRequest",
"UserCheckResponse",
"UserRatingsRequest",
"UserRatingsResponse",
"UserRatingsResponseSubRecord",
"UserValidateRequest",
"UserValidateResponse",
"UserValidateResponseRecord",
]
BaseRatingsAPIRequest ¶
Bases: HordeRequest
Base class for all requests to the AI Horde Ratings API.
Source code in horde_sdk/ratings_api/apimodels.py
BaseImageRatingRecord ¶
Bases: BaseModel
The information about any image rating result.
Source code in horde_sdk/ratings_api/apimodels.py
ImageRatingResponseSubRecord ¶
Bases: BaseModel
A single sub-record in a response from the /v1/image/ratings endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
ImageRatingsResponse ¶
Bases: HordeResponseBaseModel
The representation of the full response from /v1/image/ratings.
Source code in horde_sdk/ratings_api/apimodels.py
UserRatingsResponseSubRecord ¶
Bases: BaseImageRatingRecord
A single sub-record in a response from the /v1/user/ratings endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
UserRatingsResponse ¶
Bases: HordeResponseBaseModel
The representation of the full response from /v1/user/ratings.
Source code in horde_sdk/ratings_api/apimodels.py
ratings
instance-attribute
¶
A list of all records returned.
UserValidateResponseRecord ¶
Bases: BaseImageRatingRecord
A single sub-record in a response from the /v1/validate/{user_id} endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
UserValidateResponse ¶
Bases: HordeResponseBaseModel
The representation of the full response from /v1/validate/{user_id}.
Source code in horde_sdk/ratings_api/apimodels.py
ratings
instance-attribute
¶
A list of all records returned.
UserCheckResponse ¶
Bases: HordeResponseBaseModel
A single record from the /v1/user/check/ endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
ratings_in_timeframe
instance-attribute
¶
The number of ratings this user submitted in the timeframe.
ratings_per_minute_in_timeframe
instance-attribute
¶
The average number of ratings per minute.
ratings_past_three_hours
instance-attribute
¶
The average number of ratings in the three hours prior to the request.
ratings_per_minute_for_past_three_hours
instance-attribute
¶
The average number of ratings per minute in the three hours prior to the request.
suspect_divergences
instance-attribute
¶
The number of instances of this user's rating not being within the criteria.
captchas_failed
instance-attribute
¶
The number of captchas failed by this user.
HordeRequestImageSpecific ¶
Bases: BaseModel
Represents the minimum for any request specifying a specific user to the API.
Source code in horde_sdk/ratings_api/apimodels.py
SelectableReturnFormats ¶
Bases: StrEnum
Formats the API supports returning data.
Source code in horde_sdk/ratings_api/apimodels.py
BaseSelectableReturnTypeRequest ¶
Bases: BaseModel
Mix-in class to describe an endpoint for which you can select the return data format.
Source code in horde_sdk/ratings_api/apimodels.py
format
instance-attribute
¶
The format to request the response payload in, typically json.
ImageRatingsRequest ¶
Bases: BaseRatingsAPIRequest, APIKeyAllowedInRequestMixin, BaseSelectableReturnTypeRequest
Represents the data needed to make a request to the /v1/image/ratings/{image_id} endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
ImageRatingsComparisonTypes ¶
Bases: StrEnum
Ways the API supports selecting a rating range.
Source code in horde_sdk/ratings_api/apimodels.py
ImageRatingsFilterableRequestBase ¶
Bases: BaseSelectableReturnTypeRequest
Generically, data the API requires to filter results prior and how to return them.
Source code in horde_sdk/ratings_api/apimodels.py
rating
instance-attribute
¶
The target rating, which will be compared by rating_comparison.
rating_comparison
instance-attribute
¶
The way the rating will be compared. See ImageRatingsComparisonTypes.
artifacts
class-attribute
instance-attribute
¶
The target artifact rating, which will be compared by artifacts_comparison.
artifacts_comparison
class-attribute
instance-attribute
¶
The way the artifacts will be compared. See ImageRatingsComparisonTypes.
UserValidateRequest ¶
Bases: BaseRatingsAPIRequest, APIKeyAllowedInRequestMixin, MessageSpecifiesUserIDMixin, ImageRatingsFilterableRequestBase
Represents the data needed to make a request to the /v1/user/validate/{user_id} endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
UserCheckRequest ¶
Bases: BaseRatingsAPIRequest, APIKeyAllowedInRequestMixin, MessageSpecifiesUserIDMixin
Represents the data needed to make a request to the /v1/user/check/ endpoint.
Source code in horde_sdk/ratings_api/apimodels.py
UserRatingsRequest ¶
Bases: BaseRatingsAPIRequest, APIKeyAllowedInRequestMixin, ImageRatingsFilterableRequestBase
Represents the data needed to make a request to the /v1/user/ratings/ endpoint.