Created
August 16, 2023 23:27
-
-
Save johnd0e/2f066aa1327245aafae699cc6c31dbdd to your computer and use it in GitHub Desktop.
KoboldAI API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
components: | |
schemas: | |
AddSentenceSpacingSettings: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
AuthorsNoteDepthSetting: | |
properties: | |
value: | |
maximum: 5 | |
minimum: 1 | |
type: integer | |
required: | |
- value | |
type: object | |
AuthorsNoteSetting: | |
properties: | |
value: | |
type: string | |
required: | |
- value | |
type: object | |
AuthorsNoteTemplateSetting: | |
properties: | |
value: | |
type: string | |
required: | |
- value | |
type: object | |
BasicBoolean: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
BasicError: | |
properties: | |
msg: | |
type: string | |
type: | |
type: string | |
required: | |
- msg | |
- type | |
type: object | |
BasicResult: | |
properties: | |
result: | |
$ref: '#/components/schemas/BasicResultInner' | |
required: | |
- result | |
type: object | |
BasicResultInner: | |
properties: | |
result: | |
type: string | |
required: | |
- result | |
type: object | |
BasicResults: | |
properties: | |
results: | |
items: | |
$ref: '#/components/schemas/BasicResultInner' | |
type: array | |
required: | |
- results | |
type: object | |
BasicString: | |
properties: | |
value: | |
type: string | |
required: | |
- value | |
type: object | |
BasicUID: | |
properties: | |
uid: | |
description: 32-bit signed integer unique to this world info entry/folder. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
required: | |
- uid | |
type: object | |
Empty: | |
properties: {} | |
type: object | |
GenerationInput: | |
properties: | |
disable_input_formatting: | |
default: true | |
description: When enabled, all input formatting options default to `false` instead of the value in the KoboldAI GUI | |
type: boolean | |
disable_output_formatting: | |
default: true | |
description: When enabled, all output formatting options default to `false` instead of the value in the KoboldAI GUI. | |
type: boolean | |
frmtadsnsp: | |
description: |- | |
Input formatting option. When enabled, adds a leading space to your input if there is no trailing whitespace at the end of the previous action. | |
If `disable_input_formatting` is `true`, this defaults to `false` instead of the value in the KoboldAI GUI. | |
type: boolean | |
frmtrmblln: | |
description: |- | |
Output formatting option. When enabled, replaces all occurrences of two or more consecutive newlines in the output with one newline. | |
If `disable_output_formatting` is `true`, this defaults to `false` instead of the value in the KoboldAI GUI. | |
type: boolean | |
frmtrmspch: | |
description: |- | |
Output formatting option. When enabled, removes `#/@%{}+=~|\^<>` from the output. | |
If `disable_output_formatting` is `true`, this defaults to `false` instead of the value in the KoboldAI GUI. | |
type: boolean | |
frmttriminc: | |
description: |- | |
Output formatting option. When enabled, removes some characters from the end of the output such that the output doesn't end in the middle of a sentence. If the output is less than one sentence long, does nothing. | |
If `disable_output_formatting` is `true`, this defaults to `false` instead of the value in the KoboldAI GUI. | |
type: boolean | |
max_context_length: | |
description: Maximum number of tokens to send to the model. | |
maximum: 2048 | |
minimum: 512 | |
type: integer | |
max_length: | |
description: Number of tokens to generate. | |
maximum: 512 | |
minimum: 1 | |
type: integer | |
'n': | |
description: Number of outputs to generate. | |
maximum: 5 | |
minimum: 1 | |
type: integer | |
prompt: | |
description: This is the submission. | |
type: string | |
quiet: | |
description: When enabled, Generated output will not be displayed in the console. | |
type: boolean | |
rep_pen: | |
description: Base repetition penalty value. | |
minimum: 1 | |
type: number | |
rep_pen_range: | |
description: Repetition penalty range. | |
minimum: 0 | |
type: integer | |
rep_pen_slope: | |
description: Repetition penalty slope. | |
minimum: 0 | |
type: number | |
sampler_full_determinism: | |
description: If enabled, the generated text will always be the same as long as you use the same RNG seed, input and settings. If disabled, only the *sequence* of generated texts that you get when repeatedly generating text will be the same given the same RNG seed, input and settings. | |
type: boolean | |
sampler_order: | |
description: Sampler order to be used. If N is the length of this array, then N must be greater than or equal to 6 and the array must be a permutation of the first N non-negative integers. | |
items: | |
type: integer | |
minItems: 6 | |
type: array | |
sampler_seed: | |
description: RNG seed to use for sampling. If not specified, the global RNG will be used. | |
maximum: 18446744073709552000 | |
minimum: 0 | |
type: integer | |
singleline: | |
description: |- | |
Output formatting option. When enabled, removes everything after the first line of the output, including the newline. | |
If `disable_output_formatting` is `true`, this defaults to `false` instead of the value in the KoboldAI GUI. | |
type: boolean | |
soft_prompt: | |
description: Soft prompt to use when generating. If set to the empty string or any other string containing no non-whitespace characters, uses no soft prompt. | |
pattern: ^[^/\\]*$ | |
type: string | |
temperature: | |
description: Temperature value. | |
exclusiveMinimum: 0 | |
type: number | |
tfs: | |
description: Tail free sampling value. | |
maximum: 1 | |
minimum: 0 | |
type: number | |
top_a: | |
description: Top-a sampling value. | |
minimum: 0 | |
type: number | |
top_k: | |
description: Top-k sampling value. | |
minimum: 0 | |
type: integer | |
top_p: | |
description: Top-p sampling value. | |
maximum: 1 | |
minimum: 0 | |
type: number | |
typical: | |
description: Typical sampling value. | |
maximum: 1 | |
minimum: 0 | |
type: number | |
use_authors_note: | |
default: false | |
description: Whether or not to use the author's note from the KoboldAI GUI when generating text. This has no effect unless `use_story` is also enabled. | |
type: boolean | |
use_memory: | |
default: false | |
description: Whether or not to use the memory from the KoboldAI GUI when generating text. | |
type: boolean | |
use_story: | |
default: false | |
description: Whether or not to use the story from the KoboldAI GUI when generating text. | |
type: boolean | |
use_userscripts: | |
default: false | |
description: Whether or not to use the userscripts from the KoboldAI GUI when generating text. | |
type: boolean | |
use_world_info: | |
default: false | |
description: Whether or not to use the world info from the KoboldAI GUI when generating text. | |
type: boolean | |
required: | |
- prompt | |
type: object | |
GenerationOutput: | |
properties: | |
results: | |
description: Array of generated outputs. | |
items: | |
$ref: '#/components/schemas/GenerationResult' | |
type: array | |
required: | |
- results | |
type: object | |
GenerationResult: | |
properties: | |
text: | |
description: Generated output as plain text. | |
type: string | |
required: | |
- text | |
type: object | |
GensPerActionSetting: | |
properties: | |
value: | |
maximum: 5 | |
minimum: 0 | |
type: integer | |
required: | |
- value | |
type: object | |
MaxContextLengthSetting: | |
properties: | |
value: | |
maximum: 2048 | |
minimum: 512 | |
type: integer | |
required: | |
- value | |
type: object | |
MaxLengthSetting: | |
properties: | |
value: | |
maximum: 512 | |
minimum: 1 | |
type: integer | |
required: | |
- value | |
type: object | |
MemorySetting: | |
properties: | |
value: | |
type: string | |
required: | |
- value | |
type: object | |
ModelSelection: | |
properties: | |
model: | |
description: Hugging Face model ID, the path to a model folder (relative to the "models" folder in the KoboldAI root folder) or "ReadOnly" for no model | |
pattern: ^(?!\s*NeoCustom)(?!\s*GPT2Custom)(?!\s*TPUMeshTransformerGPTJ)(?!\s*TPUMeshTransformerGPTNeoX)(?!\s*GooseAI)(?!\s*OAI)(?!\s*InferKit)(?!\s*Colab)(?!\s*API).*$ | |
type: string | |
required: | |
- model | |
type: object | |
NotFoundError: | |
properties: | |
detail: | |
$ref: '#/components/schemas/BasicError' | |
required: | |
- detail | |
type: object | |
NotImplementedError: | |
properties: | |
detail: | |
$ref: '#/components/schemas/BasicError' | |
required: | |
- detail | |
type: object | |
OutOfMemoryError: | |
properties: | |
detail: | |
$ref: '#/components/schemas/BasicError' | |
required: | |
- detail | |
type: object | |
RemoveBlankLinesSettings: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
RemoveSpecialCharactersSettings: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
SamplerFullDeterminismSetting: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
SamplerOrderSetting: | |
properties: | |
value: | |
items: | |
type: integer | |
minItems: 6 | |
type: array | |
required: | |
- value | |
type: object | |
SamplerSeedSetting: | |
properties: | |
value: | |
maximum: 18446744073709552000 | |
minimum: 0 | |
type: integer | |
required: | |
- value | |
type: object | |
ServerBusyError: | |
properties: | |
detail: | |
$ref: '#/components/schemas/BasicError' | |
required: | |
- detail | |
type: object | |
SingleLineSettings: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
SoftPromptSetting: | |
properties: | |
value: | |
description: Soft prompt name, or a string containing only whitespace for no soft prompt. If using the GET method and no soft prompt is loaded, this will always be the empty string. | |
pattern: ^[^/\\]*$ | |
type: string | |
required: | |
- value | |
type: object | |
SoftPromptsList: | |
properties: | |
values: | |
description: Array of available softprompts. | |
items: | |
$ref: '#/components/schemas/SoftPromptSetting' | |
type: array | |
required: | |
- values | |
type: object | |
Story: | |
properties: | |
results: | |
description: Array of story actions. The array is sorted such that actions closer to the end of this array are closer to the end of the story. | |
items: | |
$ref: '#/components/schemas/StoryChunk' | |
type: array | |
required: | |
- results | |
type: object | |
StoryChunk: | |
properties: | |
num: | |
description: Guaranteed to not equal the `num` of any other active story chunk. Equals 0 iff this is the first action of the story (the prompt). | |
type: integer | |
text: | |
description: The text inside this story chunk. | |
type: string | |
required: | |
- num | |
- text | |
type: object | |
StoryChunkNum: | |
properties: | |
value: | |
type: integer | |
required: | |
- value | |
type: object | |
StoryChunkResult: | |
properties: | |
result: | |
$ref: '#/components/schemas/StoryChunk' | |
required: | |
- result | |
type: object | |
StoryChunkSetText: | |
properties: | |
value: | |
pattern: ^(.|\n)*\S$ | |
type: string | |
required: | |
- value | |
type: object | |
StoryChunkText: | |
properties: | |
value: | |
type: string | |
required: | |
- value | |
type: object | |
StoryEmptyError: | |
properties: | |
detail: | |
$ref: '#/components/schemas/BasicError' | |
required: | |
- detail | |
type: object | |
StoryLoad: | |
properties: | |
name: | |
pattern: ^[^/\\]*$ | |
type: string | |
required: | |
- name | |
type: object | |
StorySave: | |
properties: | |
name: | |
pattern: ^(?=.*\S)(?!.*[/\\]).*$ | |
type: string | |
required: | |
- name | |
type: object | |
StoryTooShortError: | |
properties: | |
detail: | |
$ref: '#/components/schemas/BasicError' | |
required: | |
- detail | |
type: object | |
SubmissionInput: | |
properties: | |
disable_input_formatting: | |
default: true | |
description: When enabled, disables all input formatting options, overriding their individual enabled/disabled states. | |
type: boolean | |
frmtadsnsp: | |
description: Input formatting option. When enabled, adds a leading space to your input if there is no trailing whitespace at the end of the previous action. | |
type: boolean | |
prompt: | |
description: This is the submission. | |
pattern: ^[\S\s]*\S[\S\s]*$ | |
type: string | |
required: | |
- prompt | |
type: object | |
TailFreeSamplingSetting: | |
properties: | |
value: | |
maximum: 1 | |
minimum: 0 | |
type: number | |
required: | |
- value | |
type: object | |
TemperatureSamplingSetting: | |
properties: | |
value: | |
exclusiveMinimum: 0 | |
type: number | |
required: | |
- value | |
type: object | |
TopASamplingSetting: | |
properties: | |
value: | |
minimum: 0 | |
type: number | |
required: | |
- value | |
type: object | |
TopKSamplingSetting: | |
properties: | |
value: | |
minimum: 0 | |
type: integer | |
required: | |
- value | |
type: object | |
TopPSamplingSetting: | |
properties: | |
value: | |
maximum: 1 | |
minimum: 0 | |
type: number | |
required: | |
- value | |
type: object | |
TrimIncompleteSentencesSettings: | |
properties: | |
value: | |
type: boolean | |
required: | |
- value | |
type: object | |
TypicalSamplingSetting: | |
properties: | |
value: | |
maximum: 1 | |
minimum: 0 | |
type: number | |
required: | |
- value | |
type: object | |
ValidationError: | |
properties: | |
detail: | |
additionalProperties: | |
items: | |
type: string | |
minItems: 1 | |
type: array | |
type: object | |
required: | |
- detail | |
type: object | |
WorldInfo: | |
properties: | |
entries: | |
items: | |
$ref: '#/components/schemas/WorldInfoEntry' | |
type: array | |
folders: | |
items: | |
$ref: '#/components/schemas/WorldInfoFolder' | |
type: array | |
required: | |
- entries | |
- folders | |
type: object | |
WorldInfoDepthSetting: | |
properties: | |
value: | |
maximum: 5 | |
minimum: 1 | |
type: integer | |
required: | |
- value | |
type: object | |
WorldInfoEntries: | |
properties: | |
entries: | |
items: | |
$ref: '#/components/schemas/WorldInfoEntry' | |
type: array | |
required: | |
- entries | |
type: object | |
WorldInfoEntriesUIDs: | |
properties: | |
entries: | |
items: | |
description: 32-bit signed integer unique to this world info entry. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
type: array | |
required: | |
- entries | |
type: object | |
WorldInfoEntry: | |
properties: | |
comment: | |
description: The comment/description/title for this world info entry. | |
type: string | |
constant: | |
description: Whether or not constant mode is enabled for this world info entry. | |
type: boolean | |
content: | |
description: The "What To Remember" for this entry. | |
type: string | |
key: | |
description: Comma-separated list of keys, or of primary keys if selective mode is enabled. | |
type: string | |
keysecondary: | |
description: Comma-separated list of secondary keys if selective mode is enabled. | |
type: string | |
selective: | |
description: Whether or not selective mode is enabled for this world info entry. | |
type: boolean | |
uid: | |
description: 32-bit signed integer unique to this world info entry. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
required: | |
- comment | |
- constant | |
- content | |
- key | |
- selective | |
- uid | |
type: object | |
WorldInfoFolder: | |
properties: | |
entries: | |
items: | |
$ref: '#/components/schemas/WorldInfoEntry' | |
type: array | |
name: | |
description: Name of this world info folder. | |
type: string | |
uid: | |
description: 32-bit signed integer unique to this world info folder. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
required: | |
- entries | |
- name | |
- uid | |
type: object | |
WorldInfoFolderBasic: | |
properties: | |
name: | |
description: Name of this world info folder. | |
type: string | |
uid: | |
description: 32-bit signed integer unique to this world info folder. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
required: | |
- name | |
- uid | |
type: object | |
WorldInfoFolderUIDs: | |
properties: | |
entries: | |
items: | |
description: 32-bit signed integer unique to this world info entry. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
type: array | |
uid: | |
description: 32-bit signed integer unique to this world info folder. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
required: | |
- entries | |
- uid | |
type: object | |
WorldInfoFolders: | |
properties: | |
folders: | |
items: | |
$ref: '#/components/schemas/WorldInfoFolderBasic' | |
type: array | |
required: | |
- folders | |
type: object | |
WorldInfoFoldersUIDs: | |
properties: | |
folders: | |
items: | |
description: 32-bit signed integer unique to this world info folder. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
type: array | |
required: | |
- folders | |
type: object | |
WorldInfoUIDs: | |
properties: | |
entries: | |
items: | |
description: 32-bit signed integer unique to this world info entry. | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
type: array | |
folders: | |
items: | |
$ref: '#/components/schemas/WorldInfoFolderUIDs' | |
type: array | |
required: | |
- entries | |
- folders | |
type: object | |
info: | |
title: KoboldAI API | |
version: 1.2.1 | |
openapi: 3.0.3 | |
paths: | |
/config/authors_note: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: '' | |
schema: | |
$ref: '#/components/schemas/AuthorsNoteSetting' | |
description: Successful request | |
summary: Retrieve the current author's note setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: '' | |
schema: | |
$ref: '#/components/schemas/AuthorsNoteSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set author's note setting to specified value | |
tags: | |
- config | |
/config/authors_note_depth: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 3 | |
schema: | |
$ref: '#/components/schemas/AuthorsNoteDepthSetting' | |
description: Successful request | |
summary: Retrieve the current author's note depth setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 3 | |
schema: | |
$ref: '#/components/schemas/AuthorsNoteDepthSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set author's note depth setting to specified value | |
tags: | |
- config | |
/config/authors_note_template: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: '[Author''s note: <|>]' | |
schema: | |
$ref: '#/components/schemas/AuthorsNoteTemplateSetting' | |
description: Successful request | |
summary: Retrieve the current author's note template setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: '[Author''s note: <|>]' | |
schema: | |
$ref: '#/components/schemas/AuthorsNoteTemplateSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set author's note template setting to specified value | |
tags: | |
- config | |
/config/frmtadsnsp: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/AddSentenceSpacingSettings' | |
description: Successful request | |
summary: Retrieve the current add sentence spacing (input formatting) setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/AddSentenceSpacingSettings' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set add sentence spacing (input formatting) setting to specified value | |
tags: | |
- config | |
/config/frmtrmblln: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/RemoveBlankLinesSettings' | |
description: Successful request | |
summary: Retrieve the current remove blank lines (output formatting) setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/RemoveBlankLinesSettings' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set remove blank lines (output formatting) setting to specified value | |
tags: | |
- config | |
/config/frmtrmspch: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/RemoveSpecialCharactersSettings' | |
description: Successful request | |
summary: Retrieve the current remove special characters (output formatting) setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/RemoveSpecialCharactersSettings' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set remove special characters (output formatting) setting to specified value | |
tags: | |
- config | |
/config/frmttriminc: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/TrimIncompleteSentencesSettings' | |
description: Successful request | |
summary: Retrieve the current trim incomplete sentences (output formatting) setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/TrimIncompleteSentencesSettings' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set trim incomplete sentences (output formatting) setting to specified value | |
tags: | |
- config | |
/config/max_context_length: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 2048 | |
schema: | |
$ref: '#/components/schemas/MaxContextLengthSetting' | |
description: Successful request | |
summary: Retrieve the current max context length setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 2048 | |
schema: | |
$ref: '#/components/schemas/MaxContextLengthSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set max context length setting to specified value | |
tags: | |
- config | |
/config/max_length: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 80 | |
schema: | |
$ref: '#/components/schemas/MaxLengthSetting' | |
description: Successful request | |
summary: Retrieve the current max length setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 80 | |
schema: | |
$ref: '#/components/schemas/MaxLengthSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set max length setting to specified value | |
tags: | |
- config | |
/config/memory: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: Memory | |
schema: | |
$ref: '#/components/schemas/MemorySetting' | |
description: Successful request | |
summary: Retrieve the current memory setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: Memory | |
schema: | |
$ref: '#/components/schemas/MemorySetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set memory setting to specified value | |
tags: | |
- config | |
/config/n: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 1 | |
schema: | |
$ref: '#/components/schemas/GensPerActionSetting' | |
description: Successful request | |
summary: Retrieve the current Gens Per Action setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 1 | |
schema: | |
$ref: '#/components/schemas/GensPerActionSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set Gens Per Action setting to specified value | |
tags: | |
- config | |
/config/sampler_full_determinism: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/SamplerFullDeterminismSetting' | |
description: Successful request | |
summary: Retrieve the current sampler full determinism setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/SamplerFullDeterminismSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set sampler full determinism setting to specified value | |
tags: | |
- config | |
/config/sampler_order: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: | |
- 6 | |
- 0 | |
- 1 | |
- 2 | |
- 3 | |
- 4 | |
- 5 | |
schema: | |
$ref: '#/components/schemas/SamplerOrderSetting' | |
description: Successful request | |
summary: Retrieve the current sampler order setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: | |
- 6 | |
- 0 | |
- 1 | |
- 2 | |
- 3 | |
- 4 | |
- 5 | |
schema: | |
$ref: '#/components/schemas/SamplerOrderSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set sampler order setting to specified value | |
tags: | |
- config | |
/config/sampler_seed: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 3475097509890965500 | |
schema: | |
$ref: '#/components/schemas/SamplerSeedSetting' | |
description: Successful request | |
summary: Retrieve the current global sampler seed value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 3475097509890965500 | |
schema: | |
$ref: '#/components/schemas/SamplerSeedSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the global sampler seed value | |
tags: | |
- config | |
/config/singleline: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/SingleLineSettings' | |
description: Successful request | |
summary: Retrieve the current single line (output formatting) setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: false | |
schema: | |
$ref: '#/components/schemas/SingleLineSettings' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set single line (output formatting) setting to specified value | |
tags: | |
- config | |
/config/soft_prompt: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: '' | |
schema: | |
$ref: '#/components/schemas/SoftPromptSetting' | |
description: Successful request | |
summary: Retrieve the current soft prompt name | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: '' | |
schema: | |
$ref: '#/components/schemas/SoftPromptSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set soft prompt by name | |
tags: | |
- config | |
/config/soft_prompts_list: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
values: [] | |
schema: | |
$ref: '#/components/schemas/SoftPromptsList' | |
description: Successful request | |
summary: Retrieve all available softprompt filenames | |
tags: | |
- config | |
/config/temperature: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 0.5 | |
schema: | |
$ref: '#/components/schemas/TemperatureSamplingSetting' | |
description: Successful request | |
summary: Retrieve the current temperature setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 0.5 | |
schema: | |
$ref: '#/components/schemas/TemperatureSamplingSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set temperature setting to specified value | |
tags: | |
- config | |
/config/tfs: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 1 | |
schema: | |
$ref: '#/components/schemas/TailFreeSamplingSetting' | |
description: Successful request | |
summary: Retrieve the current tail free sampling setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 1 | |
schema: | |
$ref: '#/components/schemas/TailFreeSamplingSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set tail free sampling setting to specified value | |
tags: | |
- config | |
/config/top_a: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 0 | |
schema: | |
$ref: '#/components/schemas/TopASamplingSetting' | |
description: Successful request | |
summary: Retrieve the current top-a sampling setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 0 | |
schema: | |
$ref: '#/components/schemas/TopASamplingSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set top-a sampling setting to specified value | |
tags: | |
- config | |
/config/top_k: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 0 | |
schema: | |
$ref: '#/components/schemas/TopKSamplingSetting' | |
description: Successful request | |
summary: Retrieve the current top-k sampling setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 0 | |
schema: | |
$ref: '#/components/schemas/TopKSamplingSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set top-k sampling setting to specified value | |
tags: | |
- config | |
/config/top_p: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 0.9 | |
schema: | |
$ref: '#/components/schemas/TopPSamplingSetting' | |
description: Successful request | |
summary: Retrieve the current top-p sampling setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 0.9 | |
schema: | |
$ref: '#/components/schemas/TopPSamplingSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set top-p sampling setting to specified value | |
tags: | |
- config | |
/config/typical: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 1 | |
schema: | |
$ref: '#/components/schemas/TypicalSamplingSetting' | |
description: Successful request | |
summary: Retrieve the current typical sampling setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 1 | |
schema: | |
$ref: '#/components/schemas/TypicalSamplingSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set typical sampling setting to specified value | |
tags: | |
- config | |
/config/world_info_depth: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
value: 3 | |
schema: | |
$ref: '#/components/schemas/WorldInfoDepthSetting' | |
description: Successful request | |
summary: Retrieve the current world info depth setting value | |
tags: | |
- config | |
put: | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: 3 | |
schema: | |
$ref: '#/components/schemas/WorldInfoDepthSetting' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set world info depth setting to specified value | |
tags: | |
- config | |
/generate: | |
post: | |
description: |- | |
Generates text given a submission, sampler settings, soft prompt and number of return sequences. | |
By default, the story, userscripts, memory, author's note and world info are disabled. | |
Unless otherwise specified, optional values default to the values in the KoboldAI GUI. | |
requestBody: | |
content: | |
application/json: | |
example: | |
prompt: Niko the kobold stalked carefully down the alley, his small scaly figure obscured by a dusky cloak that fluttered lightly in the cold winter breeze. | |
temperature: 0.5 | |
top_p: 0.9 | |
schema: | |
$ref: '#/components/schemas/GenerationInput' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
results: | |
- text: ' Holding up his tail to keep it from dragging in the dirty snow that covered the cobblestone, he waited patiently for the butcher to turn his attention from his stall so that he could pilfer his next meal: a tender-looking chicken.' | |
schema: | |
$ref: '#/components/schemas/GenerationOutput' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
'501': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: API generation is not supported in read-only mode; please load a model and then try again. | |
type: not_implemented | |
schema: | |
$ref: '#/components/schemas/NotImplementedError' | |
description: Not implemented | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
'507': | |
content: | |
application/json: | |
examples: | |
cpu.default_cpu_allocator: | |
value: | |
detail: | |
msg: 'KoboldAI ran out of memory: DefaultCPUAllocator: not enough memory: you tried to allocate 209715200 bytes.' | |
type: out_of_memory.cpu.default_cpu_allocator | |
gpu.cuda: | |
value: | |
detail: | |
msg: 'KoboldAI ran out of memory: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 2.97 GiB already allocated; 0 bytes free; 2.99 GiB reserved in total by PyTorch)' | |
type: out_of_memory.gpu.cuda | |
gpu.hip: | |
value: | |
detail: | |
msg: 'KoboldAI ran out of memory: HIP out of memory. Tried to allocate 20.00 MiB (GPU 0; 4.00 GiB total capacity; 2.97 GiB already allocated; 0 bytes free; 2.99 GiB reserved in total by PyTorch)' | |
type: out_of_memory.gpu.hip | |
tpu.hbm: | |
value: | |
detail: | |
msg: 'KoboldAI ran out of memory: Compilation failed: Compilation failure: Ran out of memory in memory space hbm. Used 8.83G of 8.00G hbm. Exceeded hbm capacity by 848.88M.' | |
type: out_of_memory.tpu.hbm | |
unknown.unknown: | |
value: | |
detail: | |
msg: KoboldAI ran out of memory. | |
type: out_of_memory.unknown.unknown | |
schema: | |
$ref: '#/components/schemas/OutOfMemoryError' | |
description: Out of memory | |
summary: Generate text | |
tags: | |
- generate | |
/info/version: | |
get: | |
description: Returns the version of the API that you are currently using. | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
result: 1.0.0 | |
schema: | |
$ref: '#/components/schemas/BasicResult' | |
description: Successful request | |
summary: Current API version | |
tags: | |
- info | |
/info/version/latest: | |
get: | |
description: Returns the latest API version available. | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
result: 1.0.0 | |
schema: | |
$ref: '#/components/schemas/BasicResult' | |
description: Successful request | |
summary: Latest API version | |
tags: | |
- info | |
/info/version/list: | |
get: | |
description: Returns a list of available API versions sorted in ascending order. | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
results: | |
- 1.0.0 | |
schema: | |
$ref: '#/components/schemas/BasicResults' | |
description: Successful request | |
summary: List API versions | |
tags: | |
- info | |
/model: | |
get: | |
description: Gets the current model string, which is shown in the title of the KoboldAI GUI in parentheses, e.g. "KoboldAI Client (KoboldAI/fairseq-dense-13B-Nerys-v2)". | |
responses: | |
'200': | |
content: | |
application/json: | |
example: | |
result: KoboldAI/fairseq-dense-13B-Nerys-v2 | |
schema: | |
$ref: '#/components/schemas/BasicResult' | |
description: Successful request | |
summary: Retrieve the current model string | |
tags: | |
- model | |
put: | |
description: Loads a model given its Hugging Face model ID, the path to a model folder (relative to the "models" folder in the KoboldAI root folder) or "ReadOnly" for no model. | |
requestBody: | |
content: | |
application/json: | |
example: | |
model: ReadOnly | |
schema: | |
$ref: '#/components/schemas/ModelSelection' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
summary: Load a model | |
tags: | |
- model | |
/story: | |
delete: | |
description: Starts a new blank story. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
summary: Clear the story | |
tags: | |
- story | |
get: | |
description: Returns the entire story currently shown in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Story' | |
description: Successful request | |
summary: Retrieve the entire story | |
tags: | |
- story | |
/story/end: | |
get: | |
description: Returns the last action of the story in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/StoryChunkResult' | |
description: Successful request | |
'510': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Could not retrieve the last action of the story because the story is empty. | |
type: story_empty | |
schema: | |
$ref: '#/components/schemas/StoryEmptyError' | |
description: Story is empty | |
summary: Retrieve the last action of the story | |
tags: | |
- story | |
post: | |
description: Inserts a single action at the end of the story in the KoboldAI GUI without generating text. | |
requestBody: | |
content: | |
application/json: | |
example: | |
prompt: ' This is some text to put at the end of the story.' | |
schema: | |
$ref: '#/components/schemas/SubmissionInput' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
summary: Add an action to the end of the story | |
tags: | |
- story | |
/story/end/delete: | |
post: | |
description: Removes the last action of the story in the KoboldAI GUI. | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
'510': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Could not delete the last action of the story because the number of actions in the story is less than or equal to 1. | |
type: story_too_short | |
schema: | |
$ref: '#/components/schemas/StoryTooShortError' | |
description: Story too short | |
summary: Remove the last action of the story | |
tags: | |
- story | |
/story/end/num: | |
get: | |
description: Returns the `num` of the last action of the story in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/StoryChunkNum' | |
description: Successful request | |
'510': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Could not retrieve the last action of the story because the story is empty. | |
type: story_empty | |
schema: | |
$ref: '#/components/schemas/StoryEmptyError' | |
description: Story is empty | |
summary: Retrieve the num of the last action of the story | |
tags: | |
- story | |
/story/end/text: | |
get: | |
description: Returns the text of the last action of the story in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/StoryChunkText' | |
description: Successful request | |
'510': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Could not retrieve the last action of the story because the story is empty. | |
type: story_empty | |
schema: | |
$ref: '#/components/schemas/StoryEmptyError' | |
description: Story is empty | |
summary: Retrieve the text of the last action of the story | |
tags: | |
- story | |
put: | |
description: Sets the text of the last action of the story in the KoboldAI GUI to the desired value. | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/StoryChunkSetText' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
'510': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Could not retrieve the last action of the story because the story is empty. | |
type: story_empty | |
schema: | |
$ref: '#/components/schemas/StoryEmptyError' | |
description: Story is empty | |
summary: Set the text of the last action of the story | |
tags: | |
- story | |
/story/load: | |
put: | |
description: Loads a story given its filename (without the .json). | |
requestBody: | |
content: | |
application/json: | |
example: | |
name: string | |
schema: | |
$ref: '#/components/schemas/StoryLoad' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
summary: Load a story | |
tags: | |
- story | |
/story/nums: | |
get: | |
description: Returns the `num`s of the story chunks currently shown in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Story' | |
description: Successful request | |
summary: Retrieve a list of the nums of the chunks in the current story | |
tags: | |
- story | |
/story/nums/{num}: | |
get: | |
parameters: | |
- description: '`num` of the desired story chunk.' | |
in: path | |
name: num | |
required: true | |
schema: | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
description: Successful request | |
summary: Determine whether or not there is a story chunk with the given num | |
tags: | |
- story | |
/story/save: | |
put: | |
description: Saves the current story given its destination filename (without the .json). | |
requestBody: | |
content: | |
application/json: | |
example: | |
name: string | |
schema: | |
$ref: '#/components/schemas/StorySave' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Save the current story | |
tags: | |
- story | |
/story/{num}: | |
delete: | |
description: Removes a story chunk from the story in the KoboldAI GUI given its `num`. Cannot be used to delete the first action (the prompt). | |
parameters: | |
- description: '`num` of the desired story chunk. Must be larger than or equal to 1.' | |
in: path | |
name: num | |
required: true | |
schema: | |
minimum: 1 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No chunk with the given num exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'503': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: Server is busy; please try again later. | |
type: service_unavailable | |
schema: | |
$ref: '#/components/schemas/ServerBusyError' | |
description: Server is busy | |
summary: Remove a story chunk | |
tags: | |
- story | |
get: | |
description: Returns information about a story chunk given its `num`. | |
parameters: | |
- description: '`num` of the desired story chunk.' | |
in: path | |
name: num | |
required: true | |
schema: | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/StoryChunkResult' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No chunk with the given num exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve a story chunk | |
tags: | |
- story | |
/story/{num}/text: | |
get: | |
description: Returns the text inside a story chunk given its `num`. | |
parameters: | |
- description: '`num` of the desired story chunk.' | |
in: path | |
name: num | |
required: true | |
schema: | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/StoryChunkText' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No chunk with the given num exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the text of a story chunk | |
tags: | |
- story | |
put: | |
description: Sets the text inside a story chunk given its `num`. | |
parameters: | |
- description: '`num` of the desired story chunk.' | |
in: path | |
name: num | |
required: true | |
schema: | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/StoryChunkSetText' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No chunk with the given num exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the text of a story chunk | |
tags: | |
- story | |
/world_info: | |
get: | |
description: |- | |
Returns all world info entries currently shown in the KoboldAI GUI. | |
The `folders` are sorted in the same order as they are in the GUI and the `entries` within the folders and within the parent `result` object are all sorted in the same order as they are in their respective parts of the GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfo' | |
description: Successful request | |
summary: Retrieve all world info entries | |
tags: | |
- world_info | |
/world_info/folders: | |
get: | |
description: |- | |
Returns details about all world info folders currently shown in the KoboldAI GUI. | |
The `folders` are sorted in the same order as they are in the GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoFolders' | |
description: Successful request | |
summary: Retrieve all world info folders | |
tags: | |
- world_info | |
post: | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicUID' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Create a new world info folder at the end of the world info | |
tags: | |
- world_info | |
/world_info/folders/none: | |
get: | |
description: |- | |
Returns all world info entries that are not in a world info folder. | |
The `entries` are sorted in the same order as they are in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoEntries' | |
description: Successful request | |
summary: Retrieve all world info entries not in a folder | |
tags: | |
- world_info | |
post: | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicUID' | |
description: Successful request | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Create a new world info entry outside of a world info folder, at the end of the world info | |
tags: | |
- world_info | |
/world_info/folders/none/uids: | |
get: | |
description: |- | |
Returns the `uid`s of all world info entries that are not in a world info folder. | |
The `entries` are sorted in the same order as they are in the KoboldAI GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoEntriesUIDs' | |
description: Successful request | |
summary: Retrieve the UIDs of all world info entries not in a folder | |
tags: | |
- world_info | |
/world_info/folders/none/uids/{uid}: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
description: Successful request | |
summary: Determine whether or not there is a world info entry with the given UID that is not in a world info folder | |
tags: | |
- world_info | |
/world_info/folders/uids: | |
get: | |
description: |- | |
Returns the `uid`s of all world info folders currently shown in the KoboldAI GUI. | |
The `folders` are sorted in the same order as they are in the GUI. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoFoldersUIDs' | |
description: Successful request | |
summary: Retrieve the UIDs all world info folders | |
tags: | |
- world_info | |
/world_info/folders/{folder_uid}/uids/{entry_uid}: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: folder_uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: entry_uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
description: Successful request | |
summary: Determine whether or not there is a world info entry with the given UID in the world info folder with the given UID | |
tags: | |
- world_info | |
/world_info/folders/{uid}: | |
delete: | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info folders with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Delete the world info folder with the given UID | |
tags: | |
- world_info | |
get: | |
description: |- | |
Returns all world info entries that are in the world info folder with the given `uid`. | |
The `entries` are sorted in the same order as they are in the KoboldAI GUI. | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoEntries' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info folder with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve all world info entries in the given folder | |
tags: | |
- world_info | |
post: | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicUID' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info folder with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Create a new world info entry at the end of the world info folder with the given UID | |
tags: | |
- world_info | |
/world_info/folders/{uid}/name: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info folder with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the name of the world info folder with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info folder with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the name of the world info folder with the given UID to the specified value | |
tags: | |
- world_info | |
/world_info/folders/{uid}/uids: | |
get: | |
description: |- | |
Returns the `uid`s of all world info entries that are in the world info folder with the given `uid`. | |
The `entries` are sorted in the same order as they are in the KoboldAI GUI. | |
parameters: | |
- description: '`uid` of the desired world info folder.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoEntriesUIDs' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info folder with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the UIDs of all world info entries in the given folder | |
tags: | |
- world_info | |
/world_info/uids: | |
get: | |
description: Returns in a similar format as GET /world_info except only the `uid`s are returned. | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoUIDs' | |
description: Successful request | |
summary: Retrieve the UIDs of all world info entries | |
tags: | |
- world_info | |
/world_info/uids/{uid}: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
description: Successful request | |
summary: Determine whether or not there is a world info entry with the given UID | |
tags: | |
- world_info | |
/world_info/{uid}: | |
delete: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Delete the world info entry with the given UID | |
tags: | |
- world_info | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WorldInfoEntry' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve information about the world info entry with the given UID | |
tags: | |
- world_info | |
/world_info/{uid}/comment: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the comment of the world info entry with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the comment of the world info entry with the given UID to the specified value | |
tags: | |
- world_info | |
/world_info/{uid}/constant: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the constant mode state of the world info entry with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: true | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the constant mode state of the world info entry with the given UID to the specified value | |
tags: | |
- world_info | |
/world_info/{uid}/content: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the content of the world info entry with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the content of the world info entry with the given UID to the specified value | |
tags: | |
- world_info | |
/world_info/{uid}/key: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the keys or primary keys of the world info entry with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the keys or primary keys of the world info entry with the given UID to the specified value | |
tags: | |
- world_info | |
/world_info/{uid}/keysecondary: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the secondary keys of the world info entry with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: string | |
schema: | |
$ref: '#/components/schemas/BasicString' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the secondary keys of the world info entry with the given UID to the specified value | |
tags: | |
- world_info | |
/world_info/{uid}/selective: | |
get: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
summary: Retrieve the selective mode state of the world info entry with the given UID | |
tags: | |
- world_info | |
put: | |
parameters: | |
- description: '`uid` of the desired world info entry.' | |
in: path | |
name: uid | |
required: true | |
schema: | |
maximum: 2147483647 | |
minimum: -2147483648 | |
type: integer | |
requestBody: | |
content: | |
application/json: | |
example: | |
value: true | |
schema: | |
$ref: '#/components/schemas/BasicBoolean' | |
required: true | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Empty' | |
description: Successful request | |
'404': | |
content: | |
application/json: | |
example: | |
detail: | |
msg: No world info entry with the given uid exists. | |
type: key_error | |
schema: | |
$ref: '#/components/schemas/NotFoundError' | |
description: Not found | |
'422': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ValidationError' | |
description: Validation error | |
summary: Set the selective mode state of the world info entry with the given UID to the specified value | |
tags: | |
- world_info | |
servers: | |
- url: /api/v1 | |
tags: | |
- description: Metadata about this API | |
name: info | |
- description: Text generation endpoints | |
name: generate | |
- description: Information about the current text generation model | |
name: model | |
- description: Endpoints for managing the story in the KoboldAI GUI | |
name: story | |
- description: Endpoints for managing the world info in the KoboldAI GUI | |
name: world_info | |
- description: Allows you to get/set various setting values | |
name: config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment