Actions
Apply a triggered guardrail’s action to the payload.
Each action returns an ActionOutcome: the payload, possibly changed; the pipeline
disposition; the disposition to record in the GuardrailEvent;
and, for block, the user-facing message.
A guardrail in monitor mode never changes the payload nor the disposition. Its event
records monitored, i.e. what it would have done.
- class smarter.apps.guardrail.services.actions.ActionOutcome(payload, disposition, event_disposition, message=None, halt_pipeline=False)[source]
Bases:
objectThe result of applying one guardrail’s action to one finding.
- Variables:
payload – The payload, changed by redact and transform.
disposition – The pipeline disposition this action resolves to.
event_disposition – What to record in the guardrail’s event.
message – The user-facing message, for block.
halt_pipeline – True for block: no further guardrails run.
- __init__(payload, disposition, event_disposition, message=None, halt_pipeline=False)
- disposition: PipelineDisposition