pub enum AgentDecision {
Chat {
request: Box<ChatRequest>,
},
ToolCall {
name: String,
input: Value,
},
Return(Value),
ThinkAgain,
Stop,
}Expand description
Agent 决策结果。
Agent 通过 think() 方法返回决策,Runtime 或其他执行器负责执行。
Variants§
Chat
调用 LLM 进行对话。
Fields
§
request: Box<ChatRequest>对话请求。
ToolCall
调用工具。
Return(Value)
直接返回结果。
ThinkAgain
需要更多思考(继续循环)。
Stop
停止执行。
Trait Implementations§
Source§impl Clone for AgentDecision
impl Clone for AgentDecision
Source§fn clone(&self) -> AgentDecision
fn clone(&self) -> AgentDecision
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 AgentDecision
impl RefUnwindSafe for AgentDecision
impl Send for AgentDecision
impl Sync for AgentDecision
impl Unpin for AgentDecision
impl UnsafeUnpin for AgentDecision
impl UnwindSafe for AgentDecision
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