pub enum Output {
Message(OutputMessage),
FunctionCall(OutputFunctionCall),
Reasoning {
id: String,
summary: Vec<ReasoningSummary>,
content: Vec<String>,
encrypted_content: Option<String>,
signature: Option<String>,
status: Option<ToolStatus>,
},
Compaction(Map<String, Value>),
Unknown(Value),
}Expand description
A Responses output item. Unrecognized types, including hosted tools, decode
to Output::Unknown with their JSON value preserved. Malformed known
types fail deserialization.
Variants§
Message(OutputMessage)
FunctionCall(OutputFunctionCall)
Reasoning
Fields
§
summary: Vec<ReasoningSummary>§
signature: Option<String>The upstream’s signature over the reasoning text, when a gateway relays one (OpenRouter for Claude).
§
status: Option<ToolStatus>Compaction(Map<String, Value>)
An opaque compaction item ("type": "compaction"), preserved verbatim
so it can be sent back as an input item on the next request. Kept
distinct from Output::Unknown because OpenAI documents it as a
must-replay item, and InputContent::Compaction is its input twin.
Unknown(Value)
Catch-all for output item types this version does not model. Holds the
raw item object exactly as it appeared in the provider’s output[]
array, so hosted-tool payloads survive the typed decode.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Output
impl<'de> Deserialize<'de> for Output
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
impl StructuralPartialEq for Output
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
impl UnwindSafe for Output
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.