pub struct PromptProfile { /* private fields */ }Expand description
Stable prompt material and its runtime placement contract.
Implementations§
Source§impl PromptProfile
impl PromptProfile
Sourcepub fn for_subagent(allowed_tools: &[ToolName]) -> Self
pub fn for_subagent(allowed_tools: &[ToolName]) -> Self
Creates a subagent prompt profile tailored to the child’s admitted tools.
Sourcepub fn new(
base_instructions: impl Into<String>,
progress_commentary_instructions: impl Into<String>,
) -> Result<Self, PromptError>
pub fn new( base_instructions: impl Into<String>, progress_commentary_instructions: impl Into<String>, ) -> Result<Self, PromptError>
Creates a prompt profile with runtime instructions and commentary text.
Sourcepub fn with_base_instructions(
self,
base_instructions: impl Into<String>,
) -> Result<Self, PromptError>
pub fn with_base_instructions( self, base_instructions: impl Into<String>, ) -> Result<Self, PromptError>
Replaces the runtime base instructions while preserving existing blocks.
Sourcepub fn with_progress_commentary_instructions(
self,
progress_commentary_instructions: impl Into<String>,
) -> Result<Self, PromptError>
pub fn with_progress_commentary_instructions( self, progress_commentary_instructions: impl Into<String>, ) -> Result<Self, PromptError>
Replaces the progress-commentary instructions while preserving existing blocks.
Sourcepub fn with_stable_block(self, block: PromptBlock) -> Result<Self, PromptError>
pub fn with_stable_block(self, block: PromptBlock) -> Result<Self, PromptError>
Adds one stable block after runtime instructions and before dynamic context.
Sourcepub fn base_instructions(&self) -> &str
pub fn base_instructions(&self) -> &str
Returns the exact runtime base instructions.
Sourcepub fn progress_commentary_instructions(&self) -> &str
pub fn progress_commentary_instructions(&self) -> &str
Returns the exact progress-commentary instructions.
Sourcepub fn stable_blocks(&self) -> &[PromptBlock]
pub fn stable_blocks(&self) -> &[PromptBlock]
Returns stable higher-level prompt blocks in provider-visible order.
Trait Implementations§
Source§impl Clone for PromptProfile
impl Clone for PromptProfile
Source§impl Debug for PromptProfile
impl Debug for PromptProfile
Source§impl Default for PromptProfile
impl Default for PromptProfile
impl Eq for PromptProfile
Source§impl PartialEq for PromptProfile
impl PartialEq for PromptProfile
impl StructuralPartialEq for PromptProfile
Auto Trait Implementations§
impl Forget for PromptProfile
impl Freeze for PromptProfile
impl Move for PromptProfile
impl RefUnwindSafe for PromptProfile
impl Send for PromptProfilewhere
RawVecInner: Send,
impl Sync for PromptProfilewhere
RawVecInner: Sync,
impl Unpin for PromptProfile
impl UnsafeUnpin for PromptProfilewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<PromptBlock>: UnsafeUnpin,
impl UnwindSafe for PromptProfilewhere
RawVecInner: 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
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.