pub struct PlanReActPlanner { /* private fields */ }Expand description
Plan-ReAct planner that constrains the model to plan before acting.
The model is instructed to use specific tags to separate planning, reasoning, action, and final answer sections. The planner then filters the response to preserve only relevant sections.
Implementations§
Source§impl PlanReActPlanner
impl PlanReActPlanner
Sourcepub fn with_tool_instructions(self, include: bool) -> Self
pub fn with_tool_instructions(self, include: bool) -> Self
Set whether to include tool use instructions in the planning prompt.
Trait Implementations§
Source§impl Clone for PlanReActPlanner
impl Clone for PlanReActPlanner
Source§fn clone(&self) -> PlanReActPlanner
fn clone(&self) -> PlanReActPlanner
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlanReActPlanner
impl Debug for PlanReActPlanner
Source§impl Default for PlanReActPlanner
impl Default for PlanReActPlanner
Source§impl Planner for PlanReActPlanner
impl Planner for PlanReActPlanner
Source§fn build_planning_instruction(
&self,
_request: &LlmRequest,
) -> Result<Option<String>, PlannerError>
fn build_planning_instruction( &self, _request: &LlmRequest, ) -> Result<Option<String>, PlannerError>
Build planning instructions to inject into the LLM request. Read more
Source§fn process_planning_response(
&self,
response_text: &str,
) -> Result<Option<String>, PlannerError>
fn process_planning_response( &self, response_text: &str, ) -> Result<Option<String>, PlannerError>
Process the LLM response from a planning-augmented request. Read more
Auto Trait Implementations§
impl Freeze for PlanReActPlanner
impl RefUnwindSafe for PlanReActPlanner
impl Send for PlanReActPlanner
impl Sync for PlanReActPlanner
impl Unpin for PlanReActPlanner
impl UnwindSafe for PlanReActPlanner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more