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.
DictCondition
Defined in the conditions module.
Rust AI Agent SDK
Dictionary-based condition for routing. Maps values to target tasks/steps.
Fields
| Name | Type | Description |
|---|
variable | String | Variable name to check |
routes | HashMap<String | Mapping of values to target tasks |
default | Vec<String> | Default targets if no match |
Methods
new
fn new(variable: impl Into<String>) -> Self
Create a new dict condition.
Parameters:
| Name | Type |
|---|
variable | impl Into<String> |
when
fn when(mut self, value: impl Into<String>, targets: Vec<String>) -> Self
Add a route for a value.
Parameters:
| Name | Type |
|---|
value | impl Into<String> |
targets | Vec<String> |
default_targets
fn default_targets(mut self, targets: Vec<String>) -> Self
Set default targets.
Parameters:
| Name | Type |
|---|
targets | Vec<String> |
Source
View on GitHub
praisonai/src/conditions/mod.rs at line 191