pop
AlchemyFormPayloadStable
Bases: HordeAPIObjectBaseModel
Currently unsupported.
v2 API Model: ModelInterrogationFormPayloadStable
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
additionalProp1
class-attribute
instance-attribute
Currently unsupported.
additionalProp2
class-attribute
instance-attribute
Currently unsupported.
additionalProp3
class-attribute
instance-attribute
Currently unsupported.
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
AlchemyPopFormPayload
Bases: HordeAPIObjectBaseModel, JobRequestMixin
Contains the data for a single alchemy generation form for workers (pop).
v2 API Model: InterrogationPopFormPayload
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
form
class-attribute
instance-attribute
The name of this interrogation form.
payload
class-attribute
instance-attribute
The setting for this interrogation form.
r2_upload
class-attribute
instance-attribute
The URL in which the post-processed image can be uploaded.
source_image
class-attribute
instance-attribute
The URL From which the source image can be downloaded.
model_config
class-attribute
instance-attribute
id_
class-attribute
instance-attribute
The UUID for this job. Use this to post the results in the future.
get_api_model_name
classmethod
validate_form
Ensure that the form is a known alchemy type.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
validate_id
Ensure that the job ID is not empty.
Source code in horde_sdk/ai_horde_api/apimodels/base.py
__eq__
__hash__
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
NoValidAlchemyFound
Bases: HordeAPIObjectBaseModel
The number of jobs this worker was not eligible for, and why.
v2 API Model: NoValidInterrogationsFound
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
bridge_version
class-attribute
instance-attribute
bridge_version: int | None = Field(
default=None,
description="How many waiting requests were skipped because they require a higher version of the bridge than this worker is running (upgrade if you see this in your skipped list).",
examples=[0],
ge=0,
)
How many waiting requests were skipped because they require a higher version of the bridge than this worker is running (upgrade if you see this in your skipped list).
untrusted
class-attribute
instance-attribute
untrusted: int | None = Field(
default=None,
description="How many waiting requests were skipped because they demanded a trusted worker which this worker is not.",
ge=0,
)
How many waiting requests were skipped because they demanded a trusted worker which this worker is not.
worker_id
class-attribute
instance-attribute
How many waiting requests were skipped because they demanded a specific worker.
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
__eq__
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
__hash__
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
AlchemyJobPopResponse
Bases: HordeResponseBaseModel, ResponseRequiringFollowUpMixin
Contains job data for workers, if any were available. Also contains data for jobs this worker was skipped for.
This is the key response type for all alchemy workers as it contains all assignment data for the worker.
Represents the data returned from the /v2/interrogate/pop endpoint with http status code 200.
v2 API Model: InterrogationPopPayload
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | |
forms
class-attribute
instance-attribute
The forms that to be generated
skipped
class-attribute
instance-attribute
The requests that were skipped because this worker were not eligible for them.
time_constructed
property
The time the model was constructed (in epoch time).
model_config
class-attribute
instance-attribute
get_api_model_name
classmethod
get_follow_up_default_request_type
classmethod
get_follow_up_failure_cleanup_request_type
classmethod
get_follow_up_returned_params
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
get_follow_up_request_types
classmethod
Return a list of all the possible follow up request types for this response.
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
__eq__
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
__hash__
get_follow_up_extra_params
Return any additional information required from this response to submit a follow up request.
Source code in horde_sdk/generic_api/apimodels.py
get_follow_up_all_params
Return the required inf from this response to submit any follow up requests warranted from this response.
Note that this dict uses the alias field names (as seen on the API), not the python field names.
get_follow_up_failure_cleanup_params is not included.
This is used for context management.
Returns:
-
list[dict[str, object]]–list[dict[str, object]]: A list of dicts of parameter names and values for each follow up request.
Source code in horde_sdk/generic_api/apimodels.py
get_follow_up_failure_cleanup_params
Return any extra information required from this response to clean up after a failed follow up request.
Note that this dict uses the alias field names (as seen on the API), not the python field names.
This is used for context management.
Source code in horde_sdk/generic_api/apimodels.py
get_follow_up_failure_cleanup_request
Return the request for this response to clean up after a failed follow up request.
Source code in horde_sdk/generic_api/apimodels.py
ignore_failure
Return if the object is in a state which doesn't require failure follow up.
does_target_request_follow_up
Return whether the target_request would follow up on this request.
Parameters:
-
target_request(HordeRequest) –The request to check if it would follow up on this request.
Returns:
-
bool(bool) –Whether the
target_requestwould follow up on this request.
Source code in horde_sdk/generic_api/apimodels.py
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
AlchemyPopRequest
Bases: BaseAIHordeRequest, APIKeyAllowedInRequestMixin
Request additional jobs, if any are available, for an alchemy worker.
This is the key request type for all alchemy workers as it requests all available jobs for the worker.
Represents a POST request to the /v2/interrogate/pop endpoint.
v2 API Model: InterrogationPopInput
Source code in horde_sdk/ai_horde_api/apimodels/alchemy/pop.py
bridge_agent
class-attribute
instance-attribute
bridge_agent: str = Field(
default="unknown",
examples=[
"AI Horde Worker reGen:4.1.0:https://github.com/Haidra-Org/horde-worker-reGen"
],
max_length=1000,
)
The agent string for the bridge, in the format name:version:url or contact info.
name
instance-attribute
The name of the request. This is used to identify the request in the logs.
priority_usernames
instance-attribute
The usernames that should be prioritized for this request.
forms
instance-attribute
The types of alchemy that should be generated.
threads
class-attribute
instance-attribute
The number of threads to report that this bridge is using to the API.
max_tiles
class-attribute
instance-attribute
The maximum number of 512x512 tiles that this worker can process.
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
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
is_api_key_required
classmethod
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.