Refactor API endpoints to use /backends/llama-cpp path and update related documentation

This commit is contained in:
2025-09-23 21:27:58 +02:00
parent 322e1c5eb7
commit 30e40ecd30
5 changed files with 228 additions and 231 deletions

View File

@@ -19,6 +19,62 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/backends/llama-cpp/devices": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns a list of available devices for the llama server",
"tags": [
"backends"
],
"summary": "List available devices for llama server",
"responses": {
"200": {
"description": "List of devices",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/backends/llama-cpp/help": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns the help text for the llama server command",
"tags": [
"backends"
],
"summary": "Get help for llama server",
"responses": {
"200": {
"description": "Help text",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/backends/llama-cpp/parse-command": {
"post": {
"security": [
@@ -76,6 +132,34 @@ const docTemplate = `{
}
}
},
"/backends/llama-cpp/version": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns the version of the llama server command",
"tags": [
"backends"
],
"summary": "Get version of llama server",
"responses": {
"200": {
"description": "Version information",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/backends/mlx/parse-command": {
"post": {
"security": [
@@ -658,90 +742,6 @@ const docTemplate = `{
}
}
},
"/server/devices": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns a list of available devices for the llama server",
"tags": [
"server"
],
"summary": "List available devices for llama server",
"responses": {
"200": {
"description": "List of devices",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/server/help": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns the help text for the llama server command",
"tags": [
"server"
],
"summary": "Get help for llama server",
"responses": {
"200": {
"description": "Help text",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/server/version": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Returns the version of the llama server command",
"tags": [
"server"
],
"summary": "Get version of llama server",
"responses": {
"200": {
"description": "Version information",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"type": "string"
}
}
}
}
},
"/v1/": {
"post": {
"security": [