Reflection Config • Rust AI Agent SDK
ReflectionConfig: Configuration for self-reflection
ReflectionConfig
Defined in the config module.
Rust AI Agent SDK
Configuration for self-reflection
Fields
| Name | Type | Description |
|---|---|---|
enabled | bool | Enable reflection |
min_iterations | usize | Minimum iterations |
max_iterations | usize | Maximum iterations |
llm | Option<String> | Reflection LLM (if different from main) |
prompt | Option<String> | Custom reflection prompt |
Methods
new
fn new() -> SelfCreate a new reflection config
enabled
fn enabled(mut self) -> SelfEnable reflection
min_iterations
fn min_iterations(mut self, min: usize) -> SelfSet min iterations
Parameters:
| Name | Type |
|---|---|
min | usize |
max_iterations
fn max_iterations(mut self, max: usize) -> SelfSet max iterations
Parameters:
| Name | Type |
|---|---|
max | usize |
llm
fn llm(mut self, llm: impl Into<String>) -> SelfSet reflection LLM
Parameters:
| Name | Type |
|---|---|
llm | impl Into<String> |
prompt
fn prompt(mut self, prompt: impl Into<String>) -> SelfSet custom prompt
Parameters:
| Name | Type |
|---|---|
prompt | impl Into<String> |
Source
View on GitHubpraisonai/src/config.rs at line 554