Skip to content

Commit

Permalink
docs: brings docs up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed May 22, 2024
1 parent c6639b2 commit 103085a
Show file tree
Hide file tree
Showing 5 changed files with 419 additions and 6 deletions.
16 changes: 14 additions & 2 deletions docs/api_to_sdk_map.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ This is a mapping of the AI-Horde API models (defined at [https://stablehorde.ne
| /v2/generate/status/{id} | DELETE | [DeleteImageGenerateRequest][horde_sdk.ai_horde_api.apimodels.generate._status.DeleteImageGenerateRequest] |
| /v2/generate/status/{id} | GET | [ImageGenerateStatusRequest][horde_sdk.ai_horde_api.apimodels.generate._status.ImageGenerateStatusRequest] |
| /v2/generate/submit | POST | [ImageGenerationJobSubmitRequest][horde_sdk.ai_horde_api.apimodels.generate._submit.ImageGenerationJobSubmitRequest] |
| /v2/generate/text/async | POST | [TextGenerateAsyncRequest][horde_sdk.ai_horde_api.apimodels.generate.text._async.TextGenerateAsyncRequest] |
| /v2/generate/text/pop | POST | [TextGenerateJobPopRequest][horde_sdk.ai_horde_api.apimodels.generate.text._pop.TextGenerateJobPopRequest] |
| /v2/generate/text/status/{id} | DELETE | [DeleteTextGenerateRequest][horde_sdk.ai_horde_api.apimodels.generate.text._status.DeleteTextGenerateRequest] |
| /v2/generate/text/status/{id} | GET | [TextGenerateStatusRequest][horde_sdk.ai_horde_api.apimodels.generate.text._status.TextGenerateStatusRequest] |
| /v2/generate/text/submit | POST | [TextGenerationJobSubmitRequest][horde_sdk.ai_horde_api.apimodels.generate.text._submit.TextGenerationJobSubmitRequest] |
| /v2/interrogate/async | POST | [AlchemyAsyncRequest][horde_sdk.ai_horde_api.apimodels.alchemy._async.AlchemyAsyncRequest] |
| /v2/interrogate/pop | POST | [AlchemyPopRequest][horde_sdk.ai_horde_api.apimodels.alchemy._pop.AlchemyPopRequest] |
| /v2/interrogate/status/{id} | DELETE | [AlchemyDeleteRequest][horde_sdk.ai_horde_api.apimodels.alchemy._status.AlchemyDeleteRequest] |
Expand All @@ -25,7 +30,8 @@ This is a mapping of the AI-Horde API models (defined at [https://stablehorde.ne
| /v2/status/models/{model_name} | GET | [HordeStatusModelsSingleRequest][horde_sdk.ai_horde_api.apimodels._status.HordeStatusModelsSingleRequest] |
| /v2/status/news | GET | [NewsRequest][horde_sdk.ai_horde_api.apimodels._status.NewsRequest] |
| /v2/status/performance | GET | [HordePerformanceRequest][horde_sdk.ai_horde_api.apimodels._status.HordePerformanceRequest] |
| /v2/workers | GET | [AllWorkersDetailsRequest][horde_sdk.ai_horde_api.apimodels.workers._workers_all.AllWorkersDetailsRequest] |
| /v2/workers | GET | [AllWorkersDetailsRequest][horde_sdk.ai_horde_api.apimodels.workers._workers.AllWorkersDetailsRequest] |
| /v2/workers/{worker_id} | GET | [SingleWorkerDetailsRequest][horde_sdk.ai_horde_api.apimodels.workers._workers.SingleWorkerDetailsRequest] |


## Responses
Expand All @@ -38,6 +44,11 @@ This is a mapping of the AI-Horde API models (defined at [https://stablehorde.ne
| /v2/generate/pop | 200 | [ImageGenerateJobPopResponse][horde_sdk.ai_horde_api.apimodels.generate._pop.ImageGenerateJobPopResponse] |
| /v2/generate/status/{id} | 200 | [ImageGenerateStatusResponse][horde_sdk.ai_horde_api.apimodels.generate._status.ImageGenerateStatusResponse] |
| /v2/generate/submit | 200 | [JobSubmitResponse][horde_sdk.ai_horde_api.apimodels.base.JobSubmitResponse] |
| /v2/generate/text/async | 200 | [TextGenerateAsyncDryRunResponse][horde_sdk.ai_horde_api.apimodels.generate.text._async.TextGenerateAsyncDryRunResponse] |
| /v2/generate/text/async | 202 | [TextGenerateAsyncResponse][horde_sdk.ai_horde_api.apimodels.generate.text._async.TextGenerateAsyncResponse] |
| /v2/generate/text/pop | 200 | [TextGenerateJobPopResponse][horde_sdk.ai_horde_api.apimodels.generate.text._pop.TextGenerateJobPopResponse] |
| /v2/generate/text/status/{id} | 200 | [TextGenerateStatusResponse][horde_sdk.ai_horde_api.apimodels.generate.text._status.TextGenerateStatusResponse] |
| /v2/generate/text/submit | 200 | [JobSubmitResponse][horde_sdk.ai_horde_api.apimodels.base.JobSubmitResponse] |
| /v2/interrogate/async | 202 | [AlchemyAsyncResponse][horde_sdk.ai_horde_api.apimodels.alchemy._async.AlchemyAsyncResponse] |
| /v2/interrogate/pop | 200 | [AlchemyPopResponse][horde_sdk.ai_horde_api.apimodels.alchemy._pop.AlchemyPopResponse] |
| /v2/interrogate/status/{id} | 200 | [AlchemyStatusResponse][horde_sdk.ai_horde_api.apimodels.alchemy._status.AlchemyStatusResponse] |
Expand All @@ -51,4 +62,5 @@ This is a mapping of the AI-Horde API models (defined at [https://stablehorde.ne
| /v2/status/models/{model_name} | 200 | [HordeStatusModelsSingleResponse][horde_sdk.ai_horde_api.apimodels._status.HordeStatusModelsSingleResponse] |
| /v2/status/news | 200 | [NewsResponse][horde_sdk.ai_horde_api.apimodels._status.NewsResponse] |
| /v2/status/performance | 200 | [HordePerformanceResponse][horde_sdk.ai_horde_api.apimodels._status.HordePerformanceResponse] |
| /v2/workers | 200 | [AllWorkersDetailsResponse][horde_sdk.ai_horde_api.apimodels.workers._workers_all.AllWorkersDetailsResponse] |
| /v2/workers | 200 | [AllWorkersDetailsResponse][horde_sdk.ai_horde_api.apimodels.workers._workers.AllWorkersDetailsResponse] |
| /v2/workers/{worker_id} | 200 | [SingleWorkerDetailsResponse][horde_sdk.ai_horde_api.apimodels.workers._workers.SingleWorkerDetailsResponse] |
12 changes: 12 additions & 0 deletions docs/api_to_sdk_payload_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@
"/v2/status/news": {
"GET": "horde_sdk.ai_horde_api.apimodels._status.NewsRequest"
},
"/v2/workers/{worker_id}": {
"GET": "horde_sdk.ai_horde_api.apimodels.workers._workers.SingleWorkerDetailsRequest"
},
"/v2/generate/text/async": {
"POST": "horde_sdk.ai_horde_api.apimodels.generate.text._async.TextGenerateAsyncRequest"
},
"/v2/generate/text/pop": {
"POST": "horde_sdk.ai_horde_api.apimodels.generate.text._pop.TextGenerateJobPopRequest"
},
"/v2/generate/text/submit": {
"POST": "horde_sdk.ai_horde_api.apimodels.generate.text._submit.TextGenerationJobSubmitRequest"
},
"/v2/stats/text/models": {
"GET": "horde_sdk.ai_horde_api.apimodels._stats.TextStatsModelsRequest"
},
Expand Down
13 changes: 13 additions & 0 deletions docs/api_to_sdk_response_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@
"/v2/status/news": {
"200": "horde_sdk.ai_horde_api.apimodels._status.NewsResponse"
},
"/v2/workers/{worker_id}": {
"200": "horde_sdk.ai_horde_api.apimodels.workers._workers.SingleWorkerDetailsResponse"
},
"/v2/generate/text/async": {
"200": "horde_sdk.ai_horde_api.apimodels.generate.text._async.TextGenerateAsyncDryRunResponse",
"202": "horde_sdk.ai_horde_api.apimodels.generate.text._async.TextGenerateAsyncResponse"
},
"/v2/generate/text/pop": {
"200": "horde_sdk.ai_horde_api.apimodels.generate.text._pop.TextGenerateJobPopResponse"
},
"/v2/generate/text/submit": {
"200": "horde_sdk.ai_horde_api.apimodels.base.JobSubmitResponse"
},
"/v2/stats/text/models": {
"200": "horde_sdk.ai_horde_api.apimodels._stats.TextModelStatsResponse"
},
Expand Down
180 changes: 180 additions & 0 deletions docs/request_field_names_and_descriptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@
"allow_controlnet",
null
],
[
"allow_sdxl_controlnet",
null
],
[
"allow_lora",
null
Expand Down Expand Up @@ -493,6 +497,152 @@
null
]
],
"SingleWorkerDetailsRequest": [
[
"apikey",
null
],
[
"accept",
null
],
[
"client_agent",
null
],
[
"worker_id",
null
]
],
"TextGenerateAsyncRequest": [
[
"trusted_workers",
null
],
[
"slow_workers",
null
],
[
"workers",
null
],
[
"worker_blacklist",
null
],
[
"models",
null
],
[
"dry_run",
null
],
[
"apikey",
null
],
[
"accept",
null
],
[
"client_agent",
null
],
[
"params",
null
],
[
"prompt",
"The prompt which will be sent to KoboldAI to generate text."
],
[
"allow_downgrade",
"When true and the request requires upfront kudos and the account does not have enough The request will be downgraded in max context and max tokens so that it does not need upfront kudos."
],
[
"disable_batching",
"When true, This request will not use batching. This will allow you to retrieve accurate seeds. Feature is restricted to Trusted users and Patreons."
],
[
"extra_source_images",
null
],
[
"proxied_account",
"If using a service account as a proxy, provide this value to identify the actual account from which this request is coming from."
],
[
"softprompt",
"Specify which softprompt needs to be used to service this request."
],
[
"webhook",
"Provide a URL where the AI Horde will send a POST call after each delivered generation. The request will include the details of the job as well as the request ID."
]
],
"TextGenerateJobPopRequest": [
[
"amount",
"How many jobvs to pop at the same time"
],
[
"bridge_agent",
"The worker name, version and website."
],
[
"models",
null
],
[
"name",
"The Name of the Worker."
],
[
"nsfw",
"Whether this worker can generate NSFW requests or not."
],
[
"priority_usernames",
null
],
[
"require_upfront_kudos",
"If True, this worker will only pick up requests where the owner has the required kudos to consume already available."
],
[
"threads",
"How many threads this worker is running. This is used to accurately the current power available in the horde."
],
[
"max_length",
"The maximum amount of tokens this worker can generate."
],
[
"max_context_length",
"The max amount of context to submit to this AI for sampling."
],
[
"softprompts",
"The available softprompt files on this worker for the currently running model."
],
[
"apikey",
null
],
[
"accept",
null
],
[
"client_agent",
null
]
],
"TextGenerateStatusRequest": [
[
"id_",
Expand All @@ -507,6 +657,36 @@
null
]
],
"TextGenerationJobSubmitRequest": [
[
"apikey",
null
],
[
"id_",
null
],
[
"accept",
null
],
[
"client_agent",
null
],
[
"generation",
null
],
[
"state",
null
],
[
"gen_metadata",
null
]
],
"TextStatsModelsRequest": [
[
"accept",
Expand Down
Loading

0 comments on commit 103085a

Please sign in to comment.