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.
LLMGuardrail
Defined in the extras module.
Rust AI Agent SDK
LLM-based guardrail for content validation
Fields
| Name | Type | Description |
|---|
name | String | Name of the guardrail |
description | String | Description of what the guardrail checks |
prompt_template | String | The prompt template for the LLM check |
model | String | Model to use for the guardrail check |
block_on_failure | bool | Whether to block on failure |
Methods
new
fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new LLM guardrail
Parameters:
| Name | Type |
|---|
name | impl Into<String> |
description | impl Into<String> |
with_prompt
fn with_prompt(mut self, prompt: impl Into<String>) -> Self
Set the prompt template
Parameters:
| Name | Type |
|---|
prompt | impl Into<String> |
with_model
fn with_model(mut self, model: impl Into<String>) -> Self
Set the model
Parameters:
| Name | Type |
|---|
model | impl Into<String> |
block_on_failure
fn block_on_failure(mut self, block: bool) -> Self
Set whether to block on failure
Parameters:
Source
View on GitHub
praisonai/src/parity/extras.rs at line 260