pub struct LLMNode {
pub name: String,
pub invoker: Arc<LlmInvoker>,
pub executor: ToolExecutor,
pub config: ToolUseConfig,
}Expand description
Fields§
§name: String§invoker: Arc<LlmInvoker>LLM 调用器 — 封装 retry/fallback/stream state machine
executor: ToolExecutor工具执行器 — 用于获取工具定义
config: ToolUseConfig配置 — 用于构建请求
Implementations§
Source§impl LLMNode
impl LLMNode
pub fn new( name: impl Into<String>, invoker: Arc<LlmInvoker>, executor: ToolExecutor, config: ToolUseConfig, ) -> Self
Trait Implementations§
Source§impl LeafNode<AgentState> for LLMNode
impl LeafNode<AgentState> for LLMNode
Source§fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut LeafContext<'life2, AgentState>,
) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn execute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 mut LeafContext<'life2, AgentState>,
) -> Pin<Box<dyn Future<Output = Result<(), GraphError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
执行节点逻辑。
Auto Trait Implementations§
impl !RefUnwindSafe for LLMNode
impl !UnwindSafe for LLMNode
impl Freeze for LLMNode
impl Send for LLMNode
impl Sync for LLMNode
impl Unpin for LLMNode
impl UnsafeUnpin for LLMNode
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