nemoguardrails.guardrails.rails_manager
nemoguardrails.guardrails.rails_manager
Rails manager for IORails engine.
Orchestrates input/output safety checks by delegating to RailAction instances. Rails run sequentially by default; the first failing rail short-circuits. When parallel mode is enabled, all rails run concurrently and the first unsafe result cancels remaining rails immediately.
Module Contents
Classes
Data
API
Orchestrates input and output safety checks for IORails.
Reads the rails configuration to determine which checks are enabled, instantiates the corresponding RailAction for each flow, then runs them sequentially or in parallel.
Instantiate the RailAction for a given flow base name.
Dispatch a single rail flow to its RailAction instance.
Run rail coroutines concurrently, cancelling remaining on first unsafe result.
Run rail coroutines sequentially, short-circuiting on first unsafe result.
Run all enabled input rails, short-circuiting on the first failure.
When parallel mode is enabled, all rails run concurrently and the first unsafe result cancels remaining rails.
Run all enabled output rails, short-circuiting on the first failure.
When parallel mode is enabled, all rails run concurrently and the first unsafe result cancels remaining rails.