@@ -30,10 +30,10 @@ import (
3030)
3131
3232type modelApplyRequest struct {
33- ID string `json:"id"`
34- URL string `json:"url"`
35- Name string `json:"name"`
36- Overrides map [string ]string `json:"overrides"`
33+ ID string `json:"id"`
34+ URL string `json:"url"`
35+ Name string `json:"name"`
36+ Overrides map [string ]interface {} `json:"overrides"`
3737}
3838
3939func getModelStatus (url string ) (response map [string ]interface {}) {
@@ -243,7 +243,7 @@ var _ = Describe("API test", func() {
243243 response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
244244 URL : "https://raw.githubusercontent.com/go-skynet/model-gallery/main/bert-embeddings.yaml" ,
245245 Name : "bert" ,
246- Overrides : map [string ]string {
246+ Overrides : map [string ]interface {} {
247247 "backend" : "llama" ,
248248 },
249249 })
@@ -269,7 +269,7 @@ var _ = Describe("API test", func() {
269269 response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
270270 URL : "https://raw.githubusercontent.com/go-skynet/model-gallery/main/bert-embeddings.yaml" ,
271271 Name : "bert" ,
272- Overrides : map [string ]string {},
272+ Overrides : map [string ]interface {} {},
273273 })
274274
275275 Expect (response ["uuid" ]).ToNot (BeEmpty (), fmt .Sprint (response ))
@@ -297,7 +297,7 @@ var _ = Describe("API test", func() {
297297 response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
298298 URL : "github:go-skynet/model-gallery/openllama_3b.yaml" ,
299299 Name : "openllama_3b" ,
300- Overrides : map [string ]string { "backend" : "llama" },
300+ Overrides : map [string ]interface {}{ "backend" : "llama" , "mmap" : true , "f16" : true , "context_size" : 128 },
301301 })
302302
303303 Expect (response ["uuid" ]).ToNot (BeEmpty (), fmt .Sprint (response ))
@@ -366,9 +366,8 @@ var _ = Describe("API test", func() {
366366 }
367367
368368 response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
369- URL : "github:go-skynet/model-gallery/gpt4all-j.yaml" ,
370- Name : "gpt4all-j" ,
371- Overrides : map [string ]string {},
369+ URL : "github:go-skynet/model-gallery/gpt4all-j.yaml" ,
370+ Name : "gpt4all-j" ,
372371 })
373372
374373 Expect (response ["uuid" ]).ToNot (BeEmpty (), fmt .Sprint (response ))
0 commit comments