pub enum ContextSegmentType {
System,
History,
WorkingMemory,
ToolResults,
RagContext,
UserInput,
AgentScratchpad,
ChildSummary,
Guidance,
}Expand description
Types of segments in the context window
Matches contextSegmentTypeSchema in @enact/schemas
Variants§
System
System prompt (typically not compressible)
History
Conversation history (compressible)
WorkingMemory
Current working context (partially compressible)
ToolResults
Tool execution results (compressible)
RagContext
Retrieved RAG content (compressible)
UserInput
Current user input (not compressible)
AgentScratchpad
Agent’s thinking/scratchpad (compressible)
ChildSummary
Summary from child execution (not compressible)
Guidance
Mid-execution guidance from inbox (not compressible)
Implementations§
Source§impl ContextSegmentType
impl ContextSegmentType
Sourcepub fn is_compressible(&self) -> bool
pub fn is_compressible(&self) -> bool
Whether this segment type is compressible by default
Sourcepub fn default_priority(&self) -> ContextPriority
pub fn default_priority(&self) -> ContextPriority
Default priority for this segment type
Trait Implementations§
Source§impl Clone for ContextSegmentType
impl Clone for ContextSegmentType
Source§fn clone(&self) -> ContextSegmentType
fn clone(&self) -> ContextSegmentType
Returns a duplicate of the value. Read more
1.0.0 · 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 ContextSegmentType
impl Debug for ContextSegmentType
Source§impl<'de> Deserialize<'de> for ContextSegmentType
impl<'de> Deserialize<'de> for ContextSegmentType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ContextSegmentType
impl Hash for ContextSegmentType
Source§impl PartialEq for ContextSegmentType
impl PartialEq for ContextSegmentType
Source§impl Serialize for ContextSegmentType
impl Serialize for ContextSegmentType
impl Copy for ContextSegmentType
impl Eq for ContextSegmentType
impl StructuralPartialEq for ContextSegmentType
Auto Trait Implementations§
impl Freeze for ContextSegmentType
impl RefUnwindSafe for ContextSegmentType
impl Send for ContextSegmentType
impl Sync for ContextSegmentType
impl Unpin for ContextSegmentType
impl UnsafeUnpin for ContextSegmentType
impl UnwindSafe for ContextSegmentType
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.