mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-30 06:30:43 +00:00
feat: allow to specify additional files in the request
This commit is contained in:
parent
5a6d9d4e5b
commit
082e4f0da9
1 changed files with 5 additions and 2 deletions
|
@ -86,6 +86,8 @@ func (g *galleryApplier) start(c context.Context, cm *ConfigMerger) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.Files = append(config.Files, op.req.AdditionalFiles...)
|
||||||
|
|
||||||
if err := gallery.Apply(g.modelPath, op.req.Name, &config); err != nil {
|
if err := gallery.Apply(g.modelPath, op.req.Name, &config); err != nil {
|
||||||
updateError(err)
|
updateError(err)
|
||||||
continue
|
continue
|
||||||
|
@ -106,8 +108,9 @@ func (g *galleryApplier) start(c context.Context, cm *ConfigMerger) {
|
||||||
// endpoints
|
// endpoints
|
||||||
|
|
||||||
type ApplyGalleryModelRequest struct {
|
type ApplyGalleryModelRequest struct {
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
AdditionalFiles []gallery.File `json:"file"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func getOpStatus(g *galleryApplier) func(c *fiber.Ctx) error {
|
func getOpStatus(g *galleryApplier) func(c *fiber.Ctx) error {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue