@@ -30,10 +30,10 @@ import (
30
30
)
31
31
32
32
type 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"`
37
37
}
38
38
39
39
func getModelStatus (url string ) (response map [string ]interface {}) {
@@ -243,7 +243,7 @@ var _ = Describe("API test", func() {
243
243
response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
244
244
URL : "https://raw.githubusercontent.com/go-skynet/model-gallery/main/bert-embeddings.yaml" ,
245
245
Name : "bert" ,
246
- Overrides : map [string ]string {
246
+ Overrides : map [string ]interface {} {
247
247
"backend" : "llama" ,
248
248
},
249
249
})
@@ -269,7 +269,7 @@ var _ = Describe("API test", func() {
269
269
response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
270
270
URL : "https://raw.githubusercontent.com/go-skynet/model-gallery/main/bert-embeddings.yaml" ,
271
271
Name : "bert" ,
272
- Overrides : map [string ]string {},
272
+ Overrides : map [string ]interface {} {},
273
273
})
274
274
275
275
Expect (response ["uuid" ]).ToNot (BeEmpty (), fmt .Sprint (response ))
@@ -297,7 +297,7 @@ var _ = Describe("API test", func() {
297
297
response := postModelApplyRequest ("http://127.0.0.1:9090/models/apply" , modelApplyRequest {
298
298
URL : "github:go-skynet/model-gallery/openllama_3b.yaml" ,
299
299
Name : "openllama_3b" ,
300
- Overrides : map [string ]string { "backend" : "llama" },
300
+ Overrides : map [string ]interface {}{ "backend" : "llama" , "mmap" : true , "f16" : true , "context_size" : 128 },
301
301
})
302
302
303
303
Expect (response ["uuid" ]).ToNot (BeEmpty (), fmt .Sprint (response ))
@@ -366,9 +366,8 @@ var _ = Describe("API test", func() {
366
366
}
367
367
368
368
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" ,
372
371
})
373
372
374
373
Expect (response ["uuid" ]).ToNot (BeEmpty (), fmt .Sprint (response ))
0 commit comments