mirror of
https://github.com/mudler/LocalAI.git
synced 2026-04-16 12:59:33 -04:00
feat(swagger): update swagger (#9318)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
This commit is contained in:
@@ -771,6 +771,57 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/models/toggle-pinned/{name}/{action}": {
|
||||
"put": {
|
||||
"description": "Pin or unpin a model. Pinned models stay loaded and are excluded from automatic eviction.",
|
||||
"tags": [
|
||||
"config"
|
||||
],
|
||||
"summary": "Toggle model pinned status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Model name",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Action: 'pin' or 'unpin'",
|
||||
"name": "action",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/models/vram-estimate": {
|
||||
"post": {
|
||||
"description": "Estimates VRAM based on model weight files, context size, and GPU layers",
|
||||
|
||||
@@ -768,6 +768,57 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/models/toggle-pinned/{name}/{action}": {
|
||||
"put": {
|
||||
"description": "Pin or unpin a model. Pinned models stay loaded and are excluded from automatic eviction.",
|
||||
"tags": [
|
||||
"config"
|
||||
],
|
||||
"summary": "Toggle model pinned status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Model name",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Action: 'pin' or 'unpin'",
|
||||
"name": "action",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/localai.ModelResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/models/vram-estimate": {
|
||||
"post": {
|
||||
"description": "Estimates VRAM based on model weight files, context size, and GPU layers",
|
||||
|
||||
@@ -2241,6 +2241,41 @@ paths:
|
||||
summary: Get dynamic autocomplete values for a config field
|
||||
tags:
|
||||
- config
|
||||
/api/models/toggle-pinned/{name}/{action}:
|
||||
put:
|
||||
description: Pin or unpin a model. Pinned models stay loaded and are excluded
|
||||
from automatic eviction.
|
||||
parameters:
|
||||
- description: Model name
|
||||
in: path
|
||||
name: name
|
||||
required: true
|
||||
type: string
|
||||
- description: 'Action: ''pin'' or ''unpin'''
|
||||
in: path
|
||||
name: action
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/localai.ModelResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/localai.ModelResponse'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/localai.ModelResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/localai.ModelResponse'
|
||||
summary: Toggle model pinned status
|
||||
tags:
|
||||
- config
|
||||
/api/models/vram-estimate:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user