pub enum MessagePhase {
Commentary,
FinalAnswer,
}Expand description
Classifies an assistant message as interim commentary or final answer text.
Providers do not emit this consistently, so callers must treat None as “phase unknown” and keep compatibility behavior for legacy models.
JSON schema
{
"description": "Classifies an assistant message as interim commentary or final answer text.\n\nProviders do not emit this consistently, so callers must treat `None` as \"phase unknown\" and keep compatibility behavior for legacy models.",
"oneOf": [
{
"description": "Mid-turn assistant text (for example preamble/progress narration).\n\nAdditional tool calls or assistant output may follow before turn completion.",
"type": "string",
"enum": [
"commentary"
]
},
{
"description": "The assistant's terminal answer text for the current turn.",
"type": "string",
"enum": [
"final_answer"
]
}
]
}Variants§
Commentary
Mid-turn assistant text (for example preamble/progress narration).
Additional tool calls or assistant output may follow before turn completion.
FinalAnswer
The assistant’s terminal answer text for the current turn.
Trait Implementations§
Source§impl Clone for MessagePhase
impl Clone for MessagePhase
Source§fn clone(&self) -> MessagePhase
fn clone(&self) -> MessagePhase
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 moreSource§impl Debug for MessagePhase
impl Debug for MessagePhase
Source§impl<'de> Deserialize<'de> for MessagePhase
impl<'de> Deserialize<'de> for MessagePhase
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 Display for MessagePhase
impl Display for MessagePhase
Source§impl FromStr for MessagePhase
impl FromStr for MessagePhase
Source§impl Hash for MessagePhase
impl Hash for MessagePhase
Source§impl Ord for MessagePhase
impl Ord for MessagePhase
Source§fn cmp(&self, other: &MessagePhase) -> Ordering
fn cmp(&self, other: &MessagePhase) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MessagePhase
impl PartialEq for MessagePhase
Source§fn eq(&self, other: &MessagePhase) -> bool
fn eq(&self, other: &MessagePhase) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MessagePhase
impl PartialOrd for MessagePhase
Source§impl Serialize for MessagePhase
impl Serialize for MessagePhase
Source§impl TryFrom<&String> for MessagePhase
impl TryFrom<&String> for MessagePhase
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for MessagePhase
impl TryFrom<&str> for MessagePhase
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for MessagePhase
impl TryFrom<String> for MessagePhase
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for MessagePhase
impl Eq for MessagePhase
impl StructuralPartialEq for MessagePhase
Auto Trait Implementations§
impl Freeze for MessagePhase
impl RefUnwindSafe for MessagePhase
impl Send for MessagePhase
impl Sync for MessagePhase
impl Unpin for MessagePhase
impl UnsafeUnpin for MessagePhase
impl UnwindSafe for MessagePhase
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.