updated docs, fixed a few issues with multiplayer

This commit is contained in:
Concedo
2024-11-21 18:16:13 +08:00
parent 232e4d2c38
commit c2ca2ec2bc
3 changed files with 163 additions and 33 deletions
+120 -3
View File
@@ -411,7 +411,7 @@
"info": {
"title": "KoboldCpp API",
"description": "For swagger.json, <a href=\"?json=1\">click here</a>.",
"version": "1.61"
"version": "1.79"
},
"openapi": "3.0.3",
"paths": {
@@ -610,10 +610,12 @@
"application/json": {
"example": {
"result": "KoboldCpp",
"version": "1.61",
"version": "1.79",
"protected": false,
"txt2img": false,
"vision": false
"vision": false,
"transcribe":false,
"multiplayer": false,
},
"schema": {
"$ref": "#/components/schemas/KcppVersion"
@@ -684,6 +686,121 @@
]
}
},
"/api/extra/multiplayer/status": {
"get": {
"responses": {
"200": {
"content": {
"application/json": {
"example": {"turn_major": 0, "turn_minor": 0, "idle": 1, "data_format":""},
"schema": {
"properties": {
"turn_major": {"type": "string"},
"turn_minor": {"type": "string"},
"idle": {"type": "number"},
"data_format": {"type": "string"},
},
"type": "object"
}
}
},
"description": "Successful request"
}
},
"description": "Fetches the current multiplayer turn information. Only useful for Multiplayer sessions in KoboldAI Lite.",
"summary": "Fetches the current multiplayer turn information.",
"tags": [
"api/extra"
]
}
},
"/api/extra/multiplayer/getstory": {
"get": {
"responses": {
"200": {
"content": {
"text/plain": {
"schema": {
"type": "string",
"example": "base64_lzma_str"
}
}
},
"description": "Successful request"
}
},
"description": "Fetches the current multiplayer story data, LZMA compressed encoded base64. Data is usually in the same format is KAI Lite compressed savefiles.",
"summary": "Fetches the current multiplayer story data, LZMA compressed encoded base64",
"tags": [
"api/extra"
]
}
},
"/api/extra/multiplayer/setstory": {
"post": {
"description": "Sets the current multiplayer story and increments the turn.",
"requestBody": {
"content": {
"application/json": {
"example": {
"full_update": true,
"data_format": "kcpp_lzma_b64",
"data": "base64_lzma_str",
},
"schema": {
"properties": {
"full_update": {
"type": "boolean"
},
"data_format": {
"type": "string"
},
"data": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": false
},
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"results": [
{
"success": true,
"turn_major": 1,
"turn_minor": 0,
"idle": 1,
"data_format":"",
}
]
},
"schema": {
"properties": {
"success": {"type": "boolean"},
"turn_major": {"type": "string"},
"turn_minor": {"type": "string"},
"idle": {"type": "number"},
"data_format": {"type": "string"},
},
"type": "object"
}
}
},
"description": "Successful request"
}
},
"summary": "Sets the current multiplayer story and increments the turn.",
"tags": [
"api/extra"
]
}
},
"/api/extra/generate/stream": {
"post": {
"description": "Generates text given a prompt and generation settings, with SSE streaming.\n\nUnspecified values are set to defaults.\n\nSSE streaming establishes a persistent connection, returning ongoing process in the form of message events.\n\n``` \nevent: message\ndata: {data}\n\n```",