Skip to content

Commit f875599

Browse files
localai-botmudler
andauthored
feat(swagger): update swagger (#11001)
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
1 parent d0401f9 commit f875599

3 files changed

Lines changed: 68 additions & 0 deletions

File tree

swagger/docs.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3789,6 +3789,15 @@ const docTemplate = `{
37893789
}
37903790
}
37913791
},
3792+
"gallery.Variant": {
3793+
"type": "object",
3794+
"properties": {
3795+
"model": {
3796+
"description": "Model is the name of a gallery entry that declares no variants of its own.",
3797+
"type": "string"
3798+
}
3799+
}
3800+
},
37923801
"galleryop.NodeProgress": {
37933802
"type": "object",
37943803
"properties": {
@@ -4008,6 +4017,17 @@ const docTemplate = `{
40084017
"items": {
40094018
"type": "string"
40104019
}
4020+
},
4021+
"variant": {
4022+
"description": "Variant installs one specific build of an entry that declares variants,\nnamed as it appears in the entry's ` + "`" + `variants` + "`" + ` list (see the ` + "`" + `variants` + "`" + `\nand ` + "`" + `auto_variant` + "`" + ` fields of the gallery listing). Leave it empty to let\nLocalAI auto-select the largest build this host can actually run.",
4023+
"type": "string"
4024+
},
4025+
"variants": {
4026+
"description": "Variants is an optional, UNORDERED list of alternative builds of the same\nmodel (other backends such as MLX or vLLM, other quantizations) that the\ninstaller may pick instead of this entry's own payload. Authoring is\ndeliberately dumb: name the models, and the selector works out which one\nthis host should get.\n\nThe entry itself is always the last resort, so an entry carrying variants\nstays a complete, installable entry and older LocalAI releases, which drop\nthis key, install it exactly as before.",
4027+
"type": "array",
4028+
"items": {
4029+
"$ref": "#/definitions/gallery.Variant"
4030+
}
40114031
}
40124032
}
40134033
},

swagger/swagger.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,6 +3786,15 @@
37863786
}
37873787
}
37883788
},
3789+
"gallery.Variant": {
3790+
"type": "object",
3791+
"properties": {
3792+
"model": {
3793+
"description": "Model is the name of a gallery entry that declares no variants of its own.",
3794+
"type": "string"
3795+
}
3796+
}
3797+
},
37893798
"galleryop.NodeProgress": {
37903799
"type": "object",
37913800
"properties": {
@@ -4005,6 +4014,17 @@
40054014
"items": {
40064015
"type": "string"
40074016
}
4017+
},
4018+
"variant": {
4019+
"description": "Variant installs one specific build of an entry that declares variants,\nnamed as it appears in the entry's `variants` list (see the `variants`\nand `auto_variant` fields of the gallery listing). Leave it empty to let\nLocalAI auto-select the largest build this host can actually run.",
4020+
"type": "string"
4021+
},
4022+
"variants": {
4023+
"description": "Variants is an optional, UNORDERED list of alternative builds of the same\nmodel (other backends such as MLX or vLLM, other quantizations) that the\ninstaller may pick instead of this entry's own payload. Authoring is\ndeliberately dumb: name the models, and the selector works out which one\nthis host should get.\n\nThe entry itself is always the last resort, so an entry carrying variants\nstays a complete, installable entry and older LocalAI releases, which drop\nthis key, install it exactly as before.",
4024+
"type": "array",
4025+
"items": {
4026+
"$ref": "#/definitions/gallery.Variant"
4027+
}
40084028
}
40094029
}
40104030
},

swagger/swagger.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,13 @@ definitions:
210210
$ref: '#/definitions/gallery.NodeDriftInfo'
211211
type: array
212212
type: object
213+
gallery.Variant:
214+
properties:
215+
model:
216+
description: Model is the name of a gallery entry that declares no variants
217+
of its own.
218+
type: string
219+
type: object
213220
galleryop.NodeProgress:
214221
properties:
215222
current:
@@ -372,6 +379,27 @@ definitions:
372379
items:
373380
type: string
374381
type: array
382+
variant:
383+
description: |-
384+
Variant installs one specific build of an entry that declares variants,
385+
named as it appears in the entry's `variants` list (see the `variants`
386+
and `auto_variant` fields of the gallery listing). Leave it empty to let
387+
LocalAI auto-select the largest build this host can actually run.
388+
type: string
389+
variants:
390+
description: |-
391+
Variants is an optional, UNORDERED list of alternative builds of the same
392+
model (other backends such as MLX or vLLM, other quantizations) that the
393+
installer may pick instead of this entry's own payload. Authoring is
394+
deliberately dumb: name the models, and the selector works out which one
395+
this host should get.
396+
397+
The entry itself is always the last resort, so an entry carrying variants
398+
stays a complete, installable entry and older LocalAI releases, which drop
399+
this key, install it exactly as before.
400+
items:
401+
$ref: '#/definitions/gallery.Variant'
402+
type: array
375403
type: object
376404
localai.ModelResponse:
377405
properties:

0 commit comments

Comments
 (0)