pub struct ContextPackBuilder { /* private fields */ }Expand description
Builder for context packs.
Implementations§
Source§impl ContextPackBuilder
impl ContextPackBuilder
Sourcepub fn new(task: impl Into<String>, max_tokens: usize) -> Self
pub fn new(task: impl Into<String>, max_tokens: usize) -> Self
Create a builder with default external redacted/abstracted policy.
Sourcepub fn pack_mode(self, pack_mode: PackMode) -> Self
pub fn pack_mode(self, pack_mode: PackMode) -> Self
Set pack mode. External remains the default.
Sourcepub fn include_raw_event_payloads_in_operator_mode(self) -> Self
pub fn include_raw_event_payloads_in_operator_mode(self) -> Self
Explicitly opt into raw payloads for operator mode.
Sourcepub fn select_ref(self, candidate: ContextRefCandidate) -> Self
pub fn select_ref(self, candidate: ContextRefCandidate) -> Self
Add a candidate selected by upstream retrieval/memory logic.
Sourcepub fn active_doctrine(self, doctrine_id: DoctrineId) -> Self
pub fn active_doctrine(self, doctrine_id: DoctrineId) -> Self
Add an active doctrine id.
Sourcepub fn conflict(self, conflict: PackConflict) -> Self
pub fn conflict(self, conflict: PackConflict) -> Self
Add a surfaced conflict.
Sourcepub fn exclude_ref(
self,
ref_id: ContextRefId,
reason: ExclusionReason,
rationale: impl Into<String>,
sensitivity: Sensitivity,
) -> Self
pub fn exclude_ref( self, ref_id: ContextRefId, reason: ExclusionReason, rationale: impl Into<String>, sensitivity: Sensitivity, ) -> Self
Record an explicitly excluded candidate ref.
Sourcepub fn build(self) -> CoreResult<ContextPack>
pub fn build(self) -> CoreResult<ContextPack>
Build the context pack without model calls or runtime execution.
Trait Implementations§
Source§impl Clone for ContextPackBuilder
impl Clone for ContextPackBuilder
Source§fn clone(&self) -> ContextPackBuilder
fn clone(&self) -> ContextPackBuilder
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 moreAuto Trait Implementations§
impl Freeze for ContextPackBuilder
impl RefUnwindSafe for ContextPackBuilder
impl Send for ContextPackBuilder
impl Sync for ContextPackBuilder
impl Unpin for ContextPackBuilder
impl UnsafeUnpin for ContextPackBuilder
impl UnwindSafe for ContextPackBuilder
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