mirror of
https://github.com/mudler/LocalAI.git
synced 2025-04-25 13:29:58 +00:00
* Support specifying oci:// and ollama:// for model URLs Fixes: https://github.com/mudler/LocalAI/issues/2527 Fixes: https://github.com/mudler/LocalAI/issues/1028 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Lower watcher warnings Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Allow to install ollama models from CLI Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fixup tests Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Do not keep file ownership Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * Skip test on darwin Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
22 lines
478 B
Go
22 lines
478 B
Go
package oci_test
|
|
|
|
import (
|
|
"os"
|
|
|
|
. "github.com/go-skynet/LocalAI/pkg/oci" // Update with your module path
|
|
. "github.com/onsi/ginkgo/v2"
|
|
. "github.com/onsi/gomega"
|
|
)
|
|
|
|
var _ = Describe("OCI", func() {
|
|
Context("ollama", func() {
|
|
It("pulls model files", func() {
|
|
f, err := os.CreateTemp("", "ollama")
|
|
Expect(err).NotTo(HaveOccurred())
|
|
defer os.RemoveAll(f.Name())
|
|
err = OllamaFetchModel("gemma:2b", f.Name(), nil)
|
|
Expect(err).NotTo(HaveOccurred())
|
|
})
|
|
})
|
|
})
|