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 moreSource§impl Debug for AgentOutput
impl Debug for AgentOutput
Source§impl<'de> Deserialize<'de> for AgentOutput
impl<'de> Deserialize<'de> for AgentOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto 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