pub enum OutputItem {
Show 23 variants
Message(OutputMessage),
FileSearchCall(FileSearchToolCall),
FunctionCall(FunctionToolCall),
FunctionCallOutput(FunctionToolCallOutputResource),
WebSearchCall(WebSearchToolCall),
ComputerCall(ComputerToolCall),
ComputerCallOutput(ComputerToolCallOutputResource),
Reasoning(ReasoningItem),
Compaction(CompactionBody),
ImageGenerationCall(ImageGenToolCall),
CodeInterpreterCall(CodeInterpreterToolCall),
LocalShellCall(LocalShellToolCall),
ShellCall(FunctionShellCall),
ShellCallOutput(FunctionShellCallOutput),
ApplyPatchCall(ApplyPatchToolCall),
ApplyPatchCallOutput(ApplyPatchToolCallOutput),
McpCall(MCPToolCall),
McpListTools(MCPListTools),
McpApprovalRequest(MCPApprovalRequest),
CustomToolCall(CustomToolCall),
CustomToolCallOutput(CustomToolCallOutputResource),
ToolSearchCall(ToolSearchCall),
ToolSearchOutput(ToolSearchOutput),
}response-types only.Expand description
Output item
Variants§
Message(OutputMessage)
An output message from the model.
FileSearchCall(FileSearchToolCall)
The results of a file search tool call. See the file search guide for more information.
FunctionCall(FunctionToolCall)
A tool call to run a function. See the function calling guide for more information.
FunctionCallOutput(FunctionToolCallOutputResource)
The output of a function tool call.
WebSearchCall(WebSearchToolCall)
The results of a web search tool call. See the web search guide for more information.
ComputerCall(ComputerToolCall)
A tool call to a computer use tool. See the computer use guide for more information.
ComputerCallOutput(ComputerToolCallOutputResource)
The output of a computer tool call.
Reasoning(ReasoningItem)
A description of the chain of thought used by a reasoning model while generating
a response. Be sure to include these items in your input to the Responses API for
subsequent turns of a conversation if you are manually
managing context.
Compaction(CompactionBody)
A compaction item generated by the v1/responses/compact API.
ImageGenerationCall(ImageGenToolCall)
An image generation request made by the model.
CodeInterpreterCall(CodeInterpreterToolCall)
A tool call to run code.
LocalShellCall(LocalShellToolCall)
A tool call to run a command on the local shell.
ShellCall(FunctionShellCall)
A tool call that executes one or more shell commands in a managed environment.
ShellCallOutput(FunctionShellCallOutput)
The output of a shell tool call.
ApplyPatchCall(ApplyPatchToolCall)
A tool call that applies file diffs by creating, deleting, or updating files.
ApplyPatchCallOutput(ApplyPatchToolCallOutput)
The output emitted by an apply patch tool call.
McpCall(MCPToolCall)
An invocation of a tool on an MCP server.
McpListTools(MCPListTools)
A list of tools available on an MCP server.
McpApprovalRequest(MCPApprovalRequest)
A request for human approval of a tool invocation.
CustomToolCall(CustomToolCall)
A call to a custom tool created by the model.
CustomToolCallOutput(CustomToolCallOutputResource)
The output of a custom tool call.
ToolSearchCall(ToolSearchCall)
A tool search call.
ToolSearchOutput(ToolSearchOutput)
A tool search output.
Trait Implementations§
Source§impl Clone for OutputItem
impl Clone for OutputItem
Source§fn clone(&self) -> OutputItem
fn clone(&self) -> OutputItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutputItem
impl Debug for OutputItem
Source§impl<'de> Deserialize<'de> for OutputItem
impl<'de> Deserialize<'de> for OutputItem
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 From<OutputItem> for InputItem
impl From<OutputItem> for InputItem
Source§fn from(item: OutputItem) -> Self
fn from(item: OutputItem) -> Self
Source§impl From<OutputItem> for Item
impl From<OutputItem> for Item
Source§fn from(item: OutputItem) -> Self
fn from(item: OutputItem) -> Self
Source§impl PartialEq for OutputItem
impl PartialEq for OutputItem
Source§fn eq(&self, other: &OutputItem) -> bool
fn eq(&self, other: &OutputItem) -> bool
self and other values to be equal, and is used by ==.