GuardPipeline.run()
Run all applicable guards against the text.
Usage
GuardPipeline.run(
text,
phase,
*,
current_state=None,
)Parameters
text: str-
The message text to validate.
phase: GuardPhase-
Current phase (
INPUTorOUTPUT). Guards with matching phase orBOTHwill run. current_state: str | None = None-
The current pathway state name. Guards with a
statesrestriction are skipped when the state doesn’t match.
Returns
GuardPipelineResult- The final text (possibly rewritten) and activation log.