Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
PatternGuardrail
Defined in the guardrails module.
Rust AI Agent SDK
Regex pattern guardrail.
Fields
| Name | Type | Description |
|---|
must_match | Option<String> | Pattern to match (must match for success) |
must_not_match | Option<String> | Pattern to not match (must not match for success) |
Methods
new
Create a new pattern guardrail
must_match
fn must_match(mut self, pattern: impl Into<String>) -> Self
Set must match pattern
Parameters:
| Name | Type |
|---|
pattern | impl Into<String> |
must_not_match
fn must_not_match(mut self, pattern: impl Into<String>) -> Self
Set must not match pattern
Parameters:
| Name | Type |
|---|
pattern | impl Into<String> |
Source
View on GitHub
praisonai/src/guardrails/mod.rs at line 404