#[non_exhaustive]pub struct NativeCompaction {
pub provider: &'static str,
pub keeps_thinking: bool,
}Expand description
The conversation compaction a model’s provider performs itself, as
Llm::native_compaction reports it.
§Example
use adk_core::NativeCompaction;
let compaction = NativeCompaction::new("anthropic").keeping_thinking();
assert_eq!(compaction.provider, "anthropic");
assert!(compaction.keeps_thinking);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.provider: &'static strProvider that writes the summary, such as "anthropic".
keeps_thinking: boolWhether the turns kept after the summary keep their thinking: the provider accepts thinking that was produced before the summary replaced the turns it followed.
Implementations§
Source§impl NativeCompaction
impl NativeCompaction
Sourcepub fn new(provider: &'static str) -> Self
pub fn new(provider: &'static str) -> Self
The compaction provider performs; the kept turns lose their thinking.
Sourcepub fn keeping_thinking(self) -> Self
pub fn keeping_thinking(self) -> Self
The kept turns keep their thinking after the summary.
Trait Implementations§
Source§impl Clone for NativeCompaction
impl Clone for NativeCompaction
impl Copy for NativeCompaction
Source§impl Debug for NativeCompaction
impl Debug for NativeCompaction
impl Eq for NativeCompaction
Source§impl Hash for NativeCompaction
impl Hash for NativeCompaction
Source§impl PartialEq for NativeCompaction
impl PartialEq for NativeCompaction
Source§impl Serialize for NativeCompaction
impl Serialize for NativeCompaction
impl StructuralPartialEq for NativeCompaction
Auto Trait Implementations§
impl Forget for NativeCompaction
impl Freeze for NativeCompaction
impl Move for NativeCompaction
impl RefUnwindSafe for NativeCompaction
impl Send for NativeCompaction
impl Sync for NativeCompaction
impl Unpin for NativeCompaction
impl UnsafeUnpin for NativeCompactionwhere
&'static str: UnsafeUnpin,
impl UnwindSafe for NativeCompactionwhere
&'static str: UnwindSafe,
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