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:
committed by
Sacha Al Himdani
parent
ef8402ca93
commit
ded859d130
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user