@@ -42,7 +42,9 @@ var _ = Describe("Preload test", func() {
4242 url := "https://raw.githubusercontent.com/mudler/LocalAI-examples/main/configurations/phi-2.yaml"
4343 fileName := fmt .Sprintf ("%s.yaml" , "phi-2" )
4444
45- galleryService := services .NewGalleryService (& config.ApplicationConfig {}, ml )
45+ galleryService := services .NewGalleryService (& config.ApplicationConfig {
46+ SystemState : systemState ,
47+ }, ml )
4648 galleryService .Start (ctx , config .NewModelConfigLoader (tmpdir ), systemState )
4749
4850 err := InstallModels (ctx , galleryService , []config.Gallery {}, []config.Gallery {}, systemState , ml , true , true , func (s1 , s2 , s3 string , f float64 ) {
@@ -60,17 +62,22 @@ var _ = Describe("Preload test", func() {
6062 url := "huggingface://TheBloke/TinyLlama-1.1B-Chat-v0.3-GGUF/tinyllama-1.1b-chat-v0.3.Q2_K.gguf"
6163 fileName := fmt .Sprintf ("%s.gguf" , "tinyllama-1.1b-chat-v0.3.Q2_K" )
6264
63- galleryService := services .NewGalleryService (& config.ApplicationConfig {}, ml )
65+ galleryService := services .NewGalleryService (& config.ApplicationConfig {
66+ SystemState : systemState ,
67+ }, ml )
68+ galleryService .Start (ctx , config .NewModelConfigLoader (tmpdir ), systemState )
6469
6570 err := InstallModels (ctx , galleryService , []config.Gallery {}, []config.Gallery {}, systemState , ml , true , true , func (s1 , s2 , s3 string , f float64 ) {
6671 fmt .Println (s1 , s2 , s3 , f )
6772 }, url )
6873 Expect (err ).ToNot (HaveOccurred ())
6974
7075 resultFile := filepath .Join (tmpdir , fileName )
76+ dirs , err := os .ReadDir (tmpdir )
77+ Expect (err ).ToNot (HaveOccurred ())
7178
7279 _ , err = os .Stat (resultFile )
73- Expect (err ).ToNot (HaveOccurred ())
80+ Expect (err ).ToNot (HaveOccurred (), fmt . Sprintf ( "%+v" , dirs ) )
7481 })
7582 })
7683})
0 commit comments