pub struct CompactorNode {
pub name: String,
pub compactor: Arc<dyn ContextCompactor>,
pub budget: ContextBudget,
}Expand description
上下文压缩节点 — 独立 FlowNode,职责单一。
Fields§
§name: String§compactor: Arc<dyn ContextCompactor>§budget: ContextBudgetImplementations§
Source§impl CompactorNode
impl CompactorNode
pub fn new( name: impl Into<String>, compactor: Arc<dyn ContextCompactor>, budget: ContextBudget, ) -> Self
Trait Implementations§
Source§impl Clone for CompactorNode
impl Clone for CompactorNode
Source§fn clone(&self) -> CompactorNode
fn clone(&self) -> CompactorNode
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 LeafNode<AgentState> for CompactorNode
impl LeafNode<AgentState> for CompactorNode
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 CompactorNode
impl !UnwindSafe for CompactorNode
impl Freeze for CompactorNode
impl Send for CompactorNode
impl Sync for CompactorNode
impl Unpin for CompactorNode
impl UnsafeUnpin for CompactorNode
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