2023-06-24 06:18:17 +00:00
|
|
|
package gallery_test
|
2023-05-20 07:06:30 +00:00
|
|
|
|
|
|
|
import (
|
2023-06-24 06:18:17 +00:00
|
|
|
. "github.com/go-skynet/LocalAI/pkg/gallery"
|
2023-05-20 07:06:30 +00:00
|
|
|
. "github.com/onsi/ginkgo/v2"
|
|
|
|
. "github.com/onsi/gomega"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ = Describe("Gallery API tests", func() {
|
|
|
|
Context("requests", func() {
|
|
|
|
It("parses github with a branch", func() {
|
2023-06-24 06:18:17 +00:00
|
|
|
req := GalleryModel{URL: "github:go-skynet/model-gallery/gpt4all-j.yaml@main"}
|
2023-06-26 10:25:38 +00:00
|
|
|
e, err := GetGalleryConfigFromURL(req.URL)
|
2023-06-24 06:18:17 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(e.Name).To(Equal("gpt4all-j"))
|
|
|
|
})
|
2023-05-20 07:06:30 +00:00
|
|
|
})
|
|
|
|
})
|