kudos
KudosTransferResponse
Bases: HordeResponseBaseModel
The transferred amount of Kudos.
Represents the data returned from the /v2/kudos/transfer endpoint with http status code 200.
v2 API Model: KudosTransferred
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
transferred
class-attribute
instance-attribute
The amount of Kudos transferred.
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
KudosTransferRequest
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request to transfer Kudos to another user. Be sure to use their entire username (e.g., db0#1).
Represents a POST request to the /v2/kudos/transfer endpoint.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
username
instance-attribute
The username of the user to transfer Kudos to, including the '#'. For example, 'db0#1'.
model_config
class-attribute
instance-attribute
apikey
class-attribute
instance-attribute
Defaults to ANON_API_KEY. See also .is_api_key_required()
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
is_api_key_required
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
validate_api_key_length
Validate that the API key is the correct length, or is the special ANON_API_KEY.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_query_fields
classmethod
Return a list of field names from this request object that should be sent as query parameters.
This is in addition to GenericQueryFields's values, and possibly the API specific class
which inherits from GenericQueryFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.
Source code in horde_sdk/generic_api/apimodels.py
KudosAwardResponse
Bases: HordeResponseBaseModel
The awarded amount of Kudos.
Represents the data returned from the /v2/kudos/award endpoint with http status code 200.
v2 API Model: KudosAwarded
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
awarded
class-attribute
instance-attribute
The amount of Kudos awarded.
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
KudosAwardRequest
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request to award Kudos to another user. Be sure to use their entire username (e.g., db0#1).
This is a privileged endpoint that requires an admin API key.
Represents a POST request to the /v2/kudos/award endpoint.
v2 API Model: _ANONYMOUS_MODEL
Source code in horde_sdk/ai_horde_api/apimodels/kudos.py
model_config
class-attribute
instance-attribute
apikey
class-attribute
instance-attribute
Defaults to ANON_API_KEY. See also .is_api_key_required()
accept
class-attribute
instance-attribute
The 'accept' header field.
client_agent
class-attribute
instance-attribute
The requesting client's agent. You should set this to reflect the name, version and contact information for your client.
get_api_model_name
classmethod
get_http_method
classmethod
get_api_endpoint_subpath
classmethod
get_default_success_response_type
classmethod
is_api_key_required
classmethod
get_sensitive_fields
classmethod
get_extra_fields_to_exclude_from_log
Return an additional set of fields to exclude from the log_safe_model_dump method.
log_safe_model_dump
Return a dict of the model's fields, with any sensitive fields redacted.
Source code in horde_sdk/generic_api/apimodels.py
validate_api_key_length
Validate that the API key is the correct length, or is the special ANON_API_KEY.
Source code in horde_sdk/generic_api/apimodels.py
get_api_endpoint_url
classmethod
Return the endpoint URL, including the path to the specific API action defined by this object.
Source code in horde_sdk/generic_api/apimodels.py
get_api_url
classmethod
get_success_status_response_pairs
classmethod
Return a dict of HTTP status codes and the expected HordeResponse.
Defaults to {HTTPStatusCode.OK: cls.get_expected_response_type()}, but may be overridden to support other
status codes.
Source code in horde_sdk/generic_api/apimodels.py
get_header_fields
classmethod
Return a list of field names from this request object that should be sent as header fields.
This is in addition to GenericHeaderFields's values, and possibly the API specific class
which inherits from GenericHeaderFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_query_fields
classmethod
Return a list of field names from this request object that should be sent as query parameters.
This is in addition to GenericQueryFields's values, and possibly the API specific class
which inherits from GenericQueryFields, typically found in the horde_sdk.<api_name>_api.metadata module.
Source code in horde_sdk/generic_api/apimodels.py
get_number_of_results_expected
Return the number of (job) results expected from this request.
Defaults to 1, but may be overridden to dynamically change the number of results expected.
This is factored into context management; if the number of results expected is not met, the job is considered unhandled on an exception and followed up on to attempt to close it.
Source code in horde_sdk/generic_api/apimodels.py
get_requires_follow_up
Return whether this request requires a follow up request(s).
Returns:
-
bool(bool) –Whether this request requires a follow up request to close the job on the server.