pub struct PruneOptions {
pub reasoning: ReasoningPrune,
pub tool_calls: Vec<ToolCallPrune>,
pub empty_messages: EmptyMessages,
}Expand description
Options for prune.
Fields§
§reasoning: ReasoningPruneReasoning removal.
tool_calls: Vec<ToolCallPrune>Tool-call rules, applied in order.
empty_messages: EmptyMessagesEmpty message handling.
Implementations§
Source§impl PruneOptions
impl PruneOptions
Sourcepub fn reasoning(self, reasoning: ReasoningPrune) -> Self
pub fn reasoning(self, reasoning: ReasoningPrune) -> Self
Sets reasoning removal.
Sourcepub fn tool_calls(self, scope: PruneScope) -> Self
pub fn tool_calls(self, scope: PruneScope) -> Self
Adds a rule pruning every tool within scope.
Sourcepub fn tool_calls_for(
self,
scope: PruneScope,
tools: impl IntoIterator<Item = impl Into<ToolName>>,
) -> Self
pub fn tool_calls_for( self, scope: PruneScope, tools: impl IntoIterator<Item = impl Into<ToolName>>, ) -> Self
Adds a rule pruning only tools within scope.
Sourcepub fn keep_empty_messages(self) -> Self
pub fn keep_empty_messages(self) -> Self
Keeps messages that end up empty.
Trait Implementations§
Source§impl Clone for PruneOptions
impl Clone for PruneOptions
Source§fn clone(&self) -> PruneOptions
fn clone(&self) -> PruneOptions
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 PruneOptions
impl Debug for PruneOptions
Source§impl Default for PruneOptions
impl Default for PruneOptions
Source§fn default() -> PruneOptions
fn default() -> PruneOptions
Returns the “default value” for a type. Read more
impl Eq for PruneOptions
Source§impl PartialEq for PruneOptions
impl PartialEq for PruneOptions
impl StructuralPartialEq for PruneOptions
Auto Trait Implementations§
impl Freeze for PruneOptions
impl RefUnwindSafe for PruneOptions
impl Send for PruneOptions
impl Sync for PruneOptions
impl Unpin for PruneOptions
impl UnsafeUnpin for PruneOptions
impl UnwindSafe for PruneOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.