pub enum AgentOutput {
Action(AgentAction),
Actions(Vec<AgentAction>),
Finish(AgentFinish),
}Expand description
Agent output
The plan method of the Agent may return an action or a final answer.
Variants§
Action(AgentAction)
Execute a single action
Actions(Vec<AgentAction>)
Execute multiple actions in parallel
Finish(AgentFinish)
Finish (return final answer)
Implementations§
Source§impl AgentOutput
impl AgentOutput
Sourcepub fn action(&self) -> Option<&AgentAction>
pub fn action(&self) -> Option<&AgentAction>
Get a single action (if any)
Sourcepub fn actions(&self) -> Vec<&AgentAction>
pub fn actions(&self) -> Vec<&AgentAction>
Get all actions (single or multiple)
Sourcepub fn finish(&self) -> Option<&AgentFinish>
pub fn finish(&self) -> Option<&AgentFinish>
Get the finish state (if any)
Trait Implementations§
Source§impl Clone for AgentOutput
impl Clone for AgentOutput
Source§fn clone(&self) -> AgentOutput
fn clone(&self) -> AgentOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentOutput
impl RefUnwindSafe for AgentOutput
impl Send for AgentOutput
impl Sync for AgentOutput
impl Unpin for AgentOutput
impl UnsafeUnpin for AgentOutput
impl UnwindSafe for AgentOutput
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