config: allow setting context length through env var (#8938)

* envconfig: allow setting context length through env var
This commit is contained in:
Parth Sareen
2025-02-24 13:26:35 -08:00
committed by GitHub
parent 4604b10306
commit 314573bfe8
4 changed files with 23 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ import (
func TestEstimateGPULayers(t *testing.T) {
t.Setenv("OLLAMA_DEBUG", "1")
t.Setenv("OLLAMA_KV_CACHE_TYPE", "") // Ensure default f16
t.Setenv("OLLAMA_CONTEXT_LENGTH", "2048")
modelName := "dummy"
f, err := os.CreateTemp(t.TempDir(), modelName)