#[non_exhaustive]pub struct NarrationConfig {
pub enabled: bool,
pub budget: Budget,
pub tone: ToneProfile,
pub max_answer_chars: Option<usize>,
pub default_source_policy: SourcePolicy,
pub allow_retry_after_commit: bool,
pub steps: bool,
}Expand description
How the assistant is allowed to talk (spec §18, §19).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enabled: boolWhether a model writes the answer and transition blocks at all. With narration off the turn is receipts, notices and cards only.
budget: BudgetWhat the narration tasks of one turn may spend.
tone: ToneProfileVoice the narrator should use.
max_answer_chars: Option<usize>Cap on one written block, in characters; None, the default, is no cap. A
longer block is refused whole and reported, never cut mid-sentence.
default_source_policy: SourcePolicySource requirement for answers resting on general domain knowledge.
Answers resting on case state are always AuthoritativeOnly.
allow_retry_after_commit: boolWhether narration may be regenerated after commands committed. This is the only retry I17 permits once effects may exist.
steps: boolWhether each understanding step is also said in the turn’s language, as a
TurnEvent::StepSaid: one small model call per step. Off by default.
Implementations§
Source§impl NarrationConfig
impl NarrationConfig
Sourcepub const fn conservative() -> Self
pub const fn conservative() -> Self
Narration on, neutral tone, no cap on answer length, any source, post-commit narration retries allowed.
Sourcepub const fn with_enabled(self, enabled: bool) -> Self
pub const fn with_enabled(self, enabled: bool) -> Self
Returns a copy with narration switched on or off.
With narration off the turn is receipts, notices and cards only, and every question still gets a block — an explicitly unsupported one (spec §19.4). Silence is never how a question disappears.
Sourcepub const fn with_budget(self, budget: Budget) -> Self
pub const fn with_budget(self, budget: Budget) -> Self
Returns a copy with another budget for the narration tasks.
Sourcepub const fn with_steps(self, steps: bool) -> Self
pub const fn with_steps(self, steps: bool) -> Self
Returns a copy that says, or stops saying, each understanding step.
Sourcepub const fn with_tone(self, tone: ToneProfile) -> Self
pub const fn with_tone(self, tone: ToneProfile) -> Self
Returns a copy with another tone.
Sourcepub const fn with_default_source_policy(self, policy: SourcePolicy) -> Self
pub const fn with_default_source_policy(self, policy: SourcePolicy) -> Self
Returns a copy with another source policy for general-knowledge answers.
Sourcepub const fn with_max_answer_chars(
self,
max_answer_chars: Option<usize>,
) -> Self
pub const fn with_max_answer_chars( self, max_answer_chars: Option<usize>, ) -> Self
Returns a copy with a cap on one generated answer, or with none.
Trait Implementations§
Source§impl Clone for NarrationConfig
impl Clone for NarrationConfig
impl Copy for NarrationConfig
Source§impl Debug for NarrationConfig
impl Debug for NarrationConfig
Source§impl Default for NarrationConfig
impl Default for NarrationConfig
Source§impl<'de> Deserialize<'de> for NarrationConfig
impl<'de> Deserialize<'de> for NarrationConfig
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>,
impl Eq for NarrationConfig
Source§impl PartialEq for NarrationConfig
impl PartialEq for NarrationConfig
Source§impl Serialize for NarrationConfig
impl Serialize for NarrationConfig
impl StructuralPartialEq for NarrationConfig
Auto Trait Implementations§
impl Freeze for NarrationConfig
impl RefUnwindSafe for NarrationConfig
impl Send for NarrationConfig
impl Sync for NarrationConfig
impl Unpin for NarrationConfig
impl UnsafeUnpin for NarrationConfig
impl UnwindSafe for NarrationConfig
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.