pub struct Reasoning {
pub id: Option<String>,
pub content: Vec<ReasoningContent>,
}Expand description
Assistant reasoning payload with an optional provider-supplied identifier.
A message carries it Sealed to the service that issued it:
signatures, encrypted and redacted payloads and reasoning ids only mean
something there.
Fields§
§id: Option<String>Provider reasoning identifier, when supplied by the upstream API.
content: Vec<ReasoningContent>Ordered reasoning content blocks.
Implementations§
Source§impl Reasoning
impl Reasoning
Sourcepub fn new_with_signature(input: &str, signature: Option<String>) -> Reasoning
pub fn new_with_signature(input: &str, signature: Option<String>) -> Reasoning
Create a new reasoning item from a single text item and optional signature.
Sourcepub fn sealed(self, issuer: impl Into<Issuer>) -> Sealed<Reasoning>
pub fn sealed(self, issuer: impl Into<Issuer>) -> Sealed<Reasoning>
This reasoning, readable only by issuer.
Sourcepub fn multi(input: Vec<String>) -> Reasoning
pub fn multi(input: Vec<String>) -> Reasoning
Create reasoning content from multiple text blocks.
Sourcepub fn summaries(input: Vec<String>) -> Reasoning
pub fn summaries(input: Vec<String>) -> Reasoning
Create one reasoning block containing summary items.
Sourcepub fn display_text(&self) -> String
pub fn display_text(&self) -> String
Render reasoning as displayable text by joining text-like blocks with newlines.
Sourcepub fn first_text(&self) -> Option<&str>
pub fn first_text(&self) -> Option<&str>
Return the first text reasoning block, if present.
Sourcepub fn first_signature(&self) -> Option<&str>
pub fn first_signature(&self) -> Option<&str>
Return the first signature from text reasoning, if present.
Sourcepub fn encrypted_content(&self) -> Option<&str>
pub fn encrypted_content(&self) -> Option<&str>
Return the first encrypted reasoning payload, if present.