pub struct ConversationContextPolicy {
pub window: ConversationWindow,
pub summary_batch: ConversationSummaryBatch,
pub semantic_memory_limit: Option<NonZeroU16>,
}Expand description
Bounded conversation and cross-session memory context policy.
Fields§
§window: ConversationWindowRecent transcript suffix.
summary_batch: ConversationSummaryBatchMaximum older entries loaded for one summary operation.
semantic_memory_limit: Option<NonZeroU16>Optional maximum semantic memories retrieved from the namespace.
Implementations§
Source§impl ConversationContextPolicy
impl ConversationContextPolicy
Sourcepub const fn new(window: ConversationWindow) -> Self
pub const fn new(window: ConversationWindow) -> Self
Creates a transcript-only context policy.
Sourcepub const fn with_summary_batch(
self,
summary_batch: ConversationSummaryBatch,
) -> Self
pub const fn with_summary_batch( self, summary_batch: ConversationSummaryBatch, ) -> Self
Replaces the maximum number of entries loaded for one summary pass.
Sourcepub fn with_semantic_memory(
self,
limit: u16,
) -> Result<Self, ConversationStoreError>
pub fn with_semantic_memory( self, limit: u16, ) -> Result<Self, ConversationStoreError>
Enables bounded cross-conversation semantic-memory lookup.
§Errors
Rejects zero and values above 256.
Trait Implementations§
Source§impl Clone for ConversationContextPolicy
impl Clone for ConversationContextPolicy
Source§fn clone(&self) -> ConversationContextPolicy
fn clone(&self) -> ConversationContextPolicy
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 moreimpl Copy for ConversationContextPolicy
Source§impl Debug for ConversationContextPolicy
impl Debug for ConversationContextPolicy
impl Eq for ConversationContextPolicy
impl StructuralPartialEq for ConversationContextPolicy
Auto Trait Implementations§
impl Freeze for ConversationContextPolicy
impl RefUnwindSafe for ConversationContextPolicy
impl Send for ConversationContextPolicy
impl Sync for ConversationContextPolicy
impl Unpin for ConversationContextPolicy
impl UnsafeUnpin for ConversationContextPolicy
impl UnwindSafe for ConversationContextPolicy
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.