mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 02:16:36 +02:00
int
This commit is contained in:
parent
e2c3f6b3e2
commit
0f1910129f
5 changed files with 42 additions and 77 deletions
|
@ -45,14 +45,7 @@ func TestUnicodeModelDir(t *testing.T) {
|
|||
defer os.RemoveAll(modelDir)
|
||||
slog.Info("unicode", "OLLAMA_MODELS", modelDir)
|
||||
|
||||
oldModelsDir := os.Getenv("OLLAMA_MODELS")
|
||||
if oldModelsDir == "" {
|
||||
defer os.Unsetenv("OLLAMA_MODELS")
|
||||
} else {
|
||||
defer os.Setenv("OLLAMA_MODELS", oldModelsDir)
|
||||
}
|
||||
err = os.Setenv("OLLAMA_MODELS", modelDir)
|
||||
require.NoError(t, err)
|
||||
t.Setenv("OLLAMA_MODELS", modelDir)
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
|
||||
defer cancel()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue