added singleinstance flag and local shutdown api

This commit is contained in:
Concedo 2025-05-31 11:37:32 +08:00
parent 12f99ba907
commit 08e0745e7e
2 changed files with 62 additions and 1 deletions

View file

@ -439,7 +439,7 @@
},
"info": {
"title": "KoboldCpp API",
"description": "For swagger.json, <a href=\"?json=1\">click here</a>.",
"description": "For swagger.json, <a href=\"?json=1\">click here</a> or use <a href=\"https://lite.koboldai.net/koboldcpp_api.json\">online version</a>.",
"version": "2025.01.08"
},
"openapi": "3.0.3",
@ -1900,6 +1900,35 @@
]
}
},
"/api/extra/shutdown": {
"post": {
"description": "Shuts down the server and exits koboldcpp. Only usable from localhost! Both old and new KoboldCpp Server must have been launched with the --singleinstance flag for this to work.",
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"success": true
},
"schema": {
"properties": {
"success": {
"type": "boolean",
"description": "Whether the operation was successful."
}
}
}
}
},
"description": "Successful request"
}
},
"summary": "Shuts down the current KoboldCpp server.",
"tags": [
"api/extra"
]
}
},
"/props": {
"get": {
"summary": "Returns the Jinja template stored in the GGUF model, if found.",