Skip to content

Commit a711234

Browse files
authored
ollama: set seed and temperature for deterministic test output (#4306)
The integration test was flaky because tinyllama produced non-deterministic responses. Set seed=42 and temperature=0 in the test helper to get reproducible output. Fixes CON-435
1 parent 8cc1de2 commit a711234

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/impl/ollama/chat_processor_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func createCompletionProcessorForTest(t *testing.T, addr string) *ollamaCompleti
3838
// use smallest model possible to make it cheaper
3939
model: "tinyllama",
4040
client: NewClient(url, http.DefaultClient),
41+
opts: map[string]any{
42+
"seed": 42,
43+
"temperature": 0,
44+
},
4145
},
4246
userPrompt: nil,
4347
systemPrompt: nil,

0 commit comments

Comments
 (0)