@@ -78,8 +78,9 @@ class InputGuardrail(Generic[TContext]):
78
78
You can use the `@input_guardrail()` decorator to turn a function into an `InputGuardrail`, or
79
79
create an `InputGuardrail` manually.
80
80
81
- Guardrails return a `GuardrailResult`. If `result.tripwire_triggered` is `True`, the agent
82
- execution will immediately stop and a `InputGuardrailTripwireTriggered` exception will be raised
81
+ Guardrails return a `GuardrailResult`. If `result.tripwire_triggered` is `True`,
82
+ the agent's execution will immediately stop, and
83
+ an `InputGuardrailTripwireTriggered` exception will be raised
83
84
"""
84
85
85
86
guardrail_function : Callable [
@@ -132,7 +133,7 @@ class OutputGuardrail(Generic[TContext]):
132
133
You can use the `@output_guardrail()` decorator to turn a function into an `OutputGuardrail`,
133
134
or create an `OutputGuardrail` manually.
134
135
135
- Guardrails return a `GuardrailResult`. If `result.tripwire_triggered` is `True`, a
136
+ Guardrails return a `GuardrailResult`. If `result.tripwire_triggered` is `True`, an
136
137
`OutputGuardrailTripwireTriggered` exception will be raised.
137
138
"""
138
139
@@ -316,7 +317,7 @@ def decorator(
316
317
) -> OutputGuardrail [TContext_co ]:
317
318
return OutputGuardrail (
318
319
guardrail_function = f ,
319
- # Guardrail name defaults to function name when not specified (None).
320
+ # Guardrail name defaults to function's name when not specified (None).
320
321
name = name if name else f .__name__ ,
321
322
)
322
323
0 commit comments