#[non_exhaustive]pub enum ModelPurpose {
Show 15 variants
OfflineEvaluate,
Segment,
Coverage,
Route,
Locate,
Extract,
Verify,
QuestionFrame,
CrossCheck,
Respects,
Investigate,
Acknowledge,
Answer,
Review,
Progress,
}Expand description
Why the runtime is calling a model (spec §20.2).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OfflineEvaluate
Offline evaluation of a corpus (spec §27.6); never on the request path.
Segment
Split a message into units: requests, questions, constraints and the rest.
Coverage
Find a request or question the units do not cover.
Route
Choose the operation a unit asks for.
Locate
Choose the record an act aims at.
Extract
Fill an act’s arguments.
Verify
Check an act against the words it came from.
QuestionFrame
Choose the record and subjects a question is about.
CrossCheck
Check the whole understanding of a message against the message.
Respects
Judge whether an act changes what a keep-unchanged constraint keeps.
Investigate
Ask for read-only context before a unit is understood.
Acknowledge
Write what a turn did and what it needs next.
Answer
Answer one question.
Review
Check a written block against its facts.
Progress
Say, as it happens, what the assistant is doing to understand a message.
Implementations§
Source§impl ModelPurpose
impl ModelPurpose
Sourcepub const fn is_understanding(self) -> bool
pub const fn is_understanding(self) -> bool
The tasks that understand a message, before any effect.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Stable snake-case label, used in replay records and metrics.
Sourcepub const fn is_critical(self) -> bool
pub const fn is_critical(self) -> bool
Returns true for the purposes whose output can lead to commands or
reads being executed (spec §20.4 “critical stage”).
Sourcepub fn requirements(self) -> CapabilityRequirements
pub fn requirements(self) -> CapabilityRequirements
Capability requirements under SafetyMode::Default (spec §20.4).
Sourcepub fn requirements_in(self, mode: SafetyMode) -> CapabilityRequirements
pub fn requirements_in(self, mode: SafetyMode) -> CapabilityRequirements
Capability requirements under an explicit safety mode.
- The understanding tasks: one of
MUTATION_SAFE_STRUCTURED_OUTPUT, exceptInvestigate, whose output can only trigger reads. Investigateand the narration tasks: one ofREAD_ONLY_STRUCTURED_OUTPUT; their documents only become text.OfflineEvaluate: none; evaluation deliberately measures every transport.SafetyMode::UnsafeExperimentalremoves the structured-output requirement for every purpose, and nothing else.
Sourcepub const fn logging_policy(self) -> LoggingPolicy
pub const fn logging_policy(self) -> LoggingPolicy
Logging policy of the purpose.
Request-path purposes never log prompts beyond metadata because prompts
carry user text and case state; outputs are logged redacted where they
are useful for debugging the understanding. OfflineEvaluate may log in
full because evaluation corpora are curated. No purpose retains raw
provider bodies (spec §25.2).
Trait Implementations§
Source§impl Clone for ModelPurpose
impl Clone for ModelPurpose
impl Copy for ModelPurpose
Source§impl Debug for ModelPurpose
impl Debug for ModelPurpose
Source§impl<'de> Deserialize<'de> for ModelPurpose
impl<'de> Deserialize<'de> for ModelPurpose
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>,
Source§impl Display for ModelPurpose
impl Display for ModelPurpose
impl Eq for ModelPurpose
Source§impl Hash for ModelPurpose
impl Hash for ModelPurpose
Source§impl Ord for ModelPurpose
impl Ord for ModelPurpose
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ModelPurpose
impl PartialEq for ModelPurpose
Source§impl PartialOrd for ModelPurpose
impl PartialOrd for ModelPurpose
Source§impl Serialize for ModelPurpose
impl Serialize for ModelPurpose
impl StructuralPartialEq for ModelPurpose
Auto Trait Implementations§
impl Freeze for ModelPurpose
impl RefUnwindSafe for ModelPurpose
impl Send for ModelPurpose
impl Sync for ModelPurpose
impl Unpin for ModelPurpose
impl UnsafeUnpin for ModelPurpose
impl UnwindSafe for ModelPurpose
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.