Fix guardrail trigger in input_guardrails.py

Remove the `not` keyword from the `tripwire_triggered` parameter in the `math_guardrail` function in `examples/agent_patterns/input_guardrails.py`.

The not keyword prevented the guardrail from being triggered, which defeats the purpose of the example.
This commit is contained in:
Harsh Jain 2025-03-12 18:10:28 +05:30
parent cd942d0d2f
commit 6a32dab4c6
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ async def math_guardrail(
return GuardrailFunctionOutput(
output_info=final_output,
tripwire_triggered=not final_output.is_math_homework,
tripwire_triggered=final_output.is_math_homework,
)