pub enum NodeKind {
Task(TaskNode),
Agent(Box<AgentNode>),
Tool(ToolNode),
Condition(ConditionNode),
Loop(Box<LoopNode>),
Barrier(BarrierNode),
}Expand description
节点类型枚举。
Variants§
Task(TaskNode)
自定义逻辑
Agent(Box<AgentNode>)
Agent(包装 ToolUseLoop)
Tool(ToolNode)
工具调用
Condition(ConditionNode)
条件分支
Loop(Box<LoopNode>)
循环容器
Barrier(BarrierNode)
Human-in-the-loop 审批屏障(仅流式模式)
Trait Implementations§
Source§impl GraphNode for NodeKind
impl GraphNode for NodeKind
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
) -> Pin<Box<dyn Future<Output = Result<NextStep, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
) -> Pin<Box<dyn Future<Output = Result<NextStep, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
执行节点逻辑(阻塞模式)。
Source§fn execute_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
sink: &'life2 Sender<GraphEvent>,
span_id: SpanId,
) -> Pin<Box<dyn Future<Output = Result<StreamNodeResult, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute_stream<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
sink: &'life2 Sender<GraphEvent>,
span_id: SpanId,
) -> Pin<Box<dyn Future<Output = Result<StreamNodeResult, GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
执行节点逻辑(流式模式),将内部事件转发到 channel。 Read more
Auto Trait Implementations§
impl !RefUnwindSafe for NodeKind
impl !UnwindSafe for NodeKind
impl Freeze for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnsafeUnpin for NodeKind
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