Skip to main content

ReflectionConfig

Defined in the config module.
Rust AI Agent SDK Configuration for self-reflection

Fields

NameTypeDescription
enabledboolEnable reflection
min_iterationsusizeMinimum iterations
max_iterationsusizeMaximum iterations
llmOption<String>Reflection LLM (if different from main)
promptOption<String>Custom reflection prompt

Methods

new

fn new() -> Self
Create a new reflection config

enabled

fn enabled(mut self) -> Self
Enable reflection

min_iterations

fn min_iterations(mut self, min: usize) -> Self
Set min iterations Parameters:
NameType
minusize

max_iterations

fn max_iterations(mut self, max: usize) -> Self
Set max iterations Parameters:
NameType
maxusize

llm

fn llm(mut self, llm: impl Into<String>) -> Self
Set reflection LLM Parameters:
NameType
llmimpl Into&lt;String&gt;

prompt

fn prompt(mut self, prompt: impl Into<String>) -> Self
Set custom prompt Parameters:
NameType
promptimpl Into&lt;String&gt;

Source

View on GitHub

praisonai/src/config.rs at line 554