mirror of
https://github.com/mudler/LocalAI.git
synced 2025-02-11 13:15:20 +00:00
fix(tests): pin to branch for config used in tests (#4721)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
cd5489ce47
commit
af41436f1b
@ -48,9 +48,9 @@ parameters:
|
|||||||
Expect(config.Name).To(Equal("bar-baz"))
|
Expect(config.Name).To(Equal("bar-baz"))
|
||||||
Expect(config.Validate()).To(BeTrue())
|
Expect(config.Validate()).To(BeTrue())
|
||||||
|
|
||||||
// download https://raw.githubusercontent.com/mudler/LocalAI/master/embedded/models/hermes-2-pro-mistral.yaml
|
// download https://raw.githubusercontent.com/mudler/LocalAI/v2.25.0/embedded/models/hermes-2-pro-mistral.yaml
|
||||||
httpClient := http.Client{}
|
httpClient := http.Client{}
|
||||||
resp, err := httpClient.Get("https://raw.githubusercontent.com/mudler/LocalAI/master/embedded/models/hermes-2-pro-mistral.yaml")
|
resp, err := httpClient.Get("https://raw.githubusercontent.com/mudler/LocalAI/v2.25.0/embedded/models/hermes-2-pro-mistral.yaml")
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
tmp, err = os.CreateTemp("", "config.yaml")
|
tmp, err = os.CreateTemp("", "config.yaml")
|
||||||
|
@ -476,7 +476,7 @@ var _ = Describe("API test", func() {
|
|||||||
})
|
})
|
||||||
It("apply models from config", func() {
|
It("apply models from config", func() {
|
||||||
response := postModelApplyRequest("http://127.0.0.1:9090/models/apply", modelApplyRequest{
|
response := postModelApplyRequest("http://127.0.0.1:9090/models/apply", modelApplyRequest{
|
||||||
ConfigURL: "https://raw.githubusercontent.com/mudler/LocalAI/master/embedded/models/hermes-2-pro-mistral.yaml",
|
ConfigURL: "https://raw.githubusercontent.com/mudler/LocalAI/v2.25.0/embedded/models/hermes-2-pro-mistral.yaml",
|
||||||
})
|
})
|
||||||
|
|
||||||
Expect(response["uuid"]).ToNot(BeEmpty(), fmt.Sprint(response))
|
Expect(response["uuid"]).ToNot(BeEmpty(), fmt.Sprint(response))
|
||||||
@ -600,7 +600,7 @@ var _ = Describe("API test", func() {
|
|||||||
|
|
||||||
modelName := "hermes-2-pro-mistral"
|
modelName := "hermes-2-pro-mistral"
|
||||||
response := postModelApplyRequest("http://127.0.0.1:9090/models/apply", modelApplyRequest{
|
response := postModelApplyRequest("http://127.0.0.1:9090/models/apply", modelApplyRequest{
|
||||||
ConfigURL: "https://raw.githubusercontent.com/mudler/LocalAI/master/embedded/models/hermes-2-pro-mistral.yaml",
|
ConfigURL: "https://raw.githubusercontent.com/mudler/LocalAI/v2.25.0/embedded/models/hermes-2-pro-mistral.yaml",
|
||||||
})
|
})
|
||||||
|
|
||||||
Expect(response["uuid"]).ToNot(BeEmpty(), fmt.Sprint(response))
|
Expect(response["uuid"]).ToNot(BeEmpty(), fmt.Sprint(response))
|
||||||
|
@ -134,12 +134,12 @@ curl $LOCALAI/models/apply -H "Content-Type: application/json" -d '{
|
|||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
An example that installs openllama can be:
|
An example that installs hermes-2-pro-mistral can be:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
LOCALAI=http://localhost:8080
|
LOCALAI=http://localhost:8080
|
||||||
curl $LOCALAI/models/apply -H "Content-Type: application/json" -d '{
|
curl $LOCALAI/models/apply -H "Content-Type: application/json" -d '{
|
||||||
"config_url": "https://raw.githubusercontent.com/mudler/LocalAI/master/embedded/models/hermes-2-pro-mistral.yaml"
|
"config_url": "https://raw.githubusercontent.com/mudler/LocalAI/v2.25.0/embedded/models/hermes-2-pro-mistral.yaml"
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user