Skip to content

Commit f0f93db

Browse files
committed
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.
1 parent c8f3cdd commit f0f93db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: examples/agent_patterns/input_guardrails.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ async def math_guardrail(
5353

5454
return GuardrailFunctionOutput(
5555
output_info=final_output,
56-
tripwire_triggered=not final_output.is_math_homework,
56+
tripwire_triggered=final_output.is_math_homework,
5757
)
5858

5959

0 commit comments

Comments
 (0)