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:
parent
c8f3cdd6c8
commit
f0f93dbe0b
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ async def math_guardrail(
|
||||||
|
|
||||||
return GuardrailFunctionOutput(
|
return GuardrailFunctionOutput(
|
||||||
output_info=final_output,
|
output_info=final_output,
|
||||||
tripwire_triggered=not final_output.is_math_homework,
|
tripwire_triggered=final_output.is_math_homework,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue