Set temperature to 0 for prompt injection classifier

Deterministic output improves consistency of the safety classifier.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-27 12:02:53 +01:00
committed by Sacha Al Himdani
parent ef8402ca93
commit ded859d130

View File

@@ -68,7 +68,8 @@ func (g *PromptInjectionGuardrail) Check(ctx context.Context, messages []llm.Mes
Parts: []llm.Part{llm.TextPart{Text: userText}},
},
},
MaxTokens: new(10),
MaxTokens: new(10),
Temperature: new(0.0),
})
if err != nil {
// If the classifier fails, allow the message through rather than