feat: add gallery repositories

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
mudler 2023-06-23 00:23:50 +02:00
parent 2a45a99737
commit 1c30c2446c
7 changed files with 231 additions and 69 deletions

View file

@ -104,7 +104,10 @@ func App(opts ...AppOption) (*fiber.App, error) {
// LocalAI API endpoints
applier := newGalleryApplier(options.loader.ModelPath)
applier.start(options.context, cm)
app.Post("/models/apply", applyModelGallery(options.loader.ModelPath, cm, applier.C))
app.Post("/models/apply", applyModelGallery(options.loader.ModelPath, cm, applier.C, options.galleries))
app.Post("/models/list", listModelFromGallery(options.galleries))
app.Get("/models/jobs/:uuid", getOpStatus(applier))
// openAI compatible API endpoint