add OLLAMA_MODELS to envconfig (#5029)

This commit is contained in:
Patrick Devine 2024-06-13 15:52:03 -04:00 committed by GitHub
parent 1fd236d177
commit 94618b2365
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 47 additions and 11 deletions

View file

@ -18,6 +18,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/ollama/ollama/api"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/parser"
"github.com/ollama/ollama/types/model"
"github.com/ollama/ollama/version"
@ -216,6 +217,7 @@ func Test_Routes(t *testing.T) {
}
t.Setenv("OLLAMA_MODELS", t.TempDir())
envconfig.LoadConfig()
s := &Server{}
router := s.GenerateRoutes()
@ -246,6 +248,7 @@ func Test_Routes(t *testing.T) {
func TestCase(t *testing.T) {
t.Setenv("OLLAMA_MODELS", t.TempDir())
envconfig.LoadConfig()
cases := []string{
"mistral",