Module: OpenAI::Models::Responses::ResponseInputItem

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/responses/response_input_item.rb

Overview

A message input to the model with a role indicating instruction following hierarchy. Instructions given with the ‘developer` or `system` role take precedence over instructions given with the `user` role. Messages with the `assistant` role are presumed to have been generated by the model in previous interactions.

Defined Under Namespace

Classes: ComputerCallOutput, FunctionCallOutput, ImageGenerationCall, ItemReference, LocalShellCall, LocalShellCallOutput, McpApprovalRequest, McpApprovalResponse, McpCall, McpListTools, Message

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, type_info

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/responses/response_input_item.rb', line 169

.variantsArray(OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference)



# File 'lib/openai/models/responses/response_input_item.rb', line 871

Instance Method Details

#initialize(id: , arguments: , name: , server_label: , error: nil, output: nil, type: :mcp_call) ⇒ Object

Some parameter documentations has been truncated, see McpCall for more details.

An invocation of a tool on an MCP server.

Parameters:

  • id (String) (defaults to: )

    The unique ID of the tool call.

  • arguments (String) (defaults to: )

    A JSON string of the arguments passed to the tool.

  • name (String) (defaults to: )

    The name of the tool that was run.

  • server_label (String) (defaults to: )

    The label of the MCP server running the tool.

  • error (String, nil) (defaults to: nil)

    The error from the tool call, if any.

  • output (String, nil) (defaults to: nil)

    The output from the tool call.

  • type (Symbol, :mcp_call) (defaults to: :mcp_call)

    The type of the item. Always ‘mcp_call`.



# File 'lib/openai/models/responses/response_input_item.rb', line 659