mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 17:14:28 +00:00
457 lines
15 KiB
Go
457 lines
15 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"license": {
|
|
"name": "MIT License",
|
|
"url": "https://opensource.org/license/mit/"
|
|
},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/instances": {
|
|
"get": {
|
|
"description": "Returns a list of all instances managed by the server",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "List all instances",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of instances",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Creates a new instance with the provided configuration options",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Create and start a new instance",
|
|
"parameters": [
|
|
{
|
|
"description": "Instance configuration options",
|
|
"name": "options",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.InstanceOptions"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Created instance details",
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid request body",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/instances/{name}": {
|
|
"get": {
|
|
"description": "Returns the details of a specific instance by name",
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Get details of a specific instance",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Instance Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Instance details",
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid name format",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Updates the configuration of a specific instance by name",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Update an instance's configuration",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Instance Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Instance configuration options",
|
|
"name": "options",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.InstanceOptions"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Updated instance details",
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid name format",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Stops and removes a specific instance by name",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Delete an instance",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Instance Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"204": {
|
|
"description": "No Content"
|
|
},
|
|
"400": {
|
|
"description": "Invalid name format",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/instances/{name}/restart": {
|
|
"post": {
|
|
"description": "Restarts a specific instance by name",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Restart a running instance",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Instance Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Restarted instance details",
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid name format",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/instances/{name}/start": {
|
|
"post": {
|
|
"description": "Starts a specific instance by name",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Start a stopped instance",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Instance Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Started instance details",
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid name format",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/instances/{name}/stop": {
|
|
"post": {
|
|
"description": "Stops a specific instance by name",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"instances"
|
|
],
|
|
"summary": "Stop a running instance",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Instance Name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Stopped instance details",
|
|
"schema": {
|
|
"$ref": "#/definitions/llamactl.Instance"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid name format",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal Server Error",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/server/devices": {
|
|
"get": {
|
|
"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": {
|
|
"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": {
|
|
"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"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"llamactl.Instance": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"running": {
|
|
"description": "Status",
|
|
"type": "boolean"
|
|
},
|
|
"stdErrChan": {
|
|
"description": "Channel for sending error messages",
|
|
"type": "object"
|
|
},
|
|
"stdOutChan": {
|
|
"description": "Output channels",
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"llamactl.InstanceOptions": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "1.0",
|
|
Host: "",
|
|
BasePath: "/api/v1",
|
|
Schemes: []string{},
|
|
Title: "llamactl API",
|
|
Description: "llamactl is a control server for managing Llama Server instances.",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|