Module: OpenAI::Models::Conversations::ConversationItem

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/conversations/conversation_item.rb

Overview

A single item within a conversation. The set of possible types are the same as the output type of a Response object.

See Also:

  • OpenAI::Resources::Conversations::Items#retrieve

Defined Under Namespace

Classes: AdditionalTools, ImageGenerationCall, LocalShellCall, LocalShellCallOutput, McpApprovalRequest, McpApprovalResponse, McpCall, McpListTools, Program, ProgramOutput

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants, 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, meta_info, new_coerce_state, type_info

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/conversations/conversation_item.rb', line 151

Instance Method Details

#initialize(id:, approval_request_id:, approve:, reason: nil, type: :mcp_approval_response) ⇒ Object

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

A response to an MCP approval request.

Parameters:

  • id (String)

    The unique ID of the approval response

  • approval_request_id (String)

    The ID of the approval request being answered.

  • approve (Boolean)

    Whether the request was approved.

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

    Optional reason for the decision.

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

    The type of the item. Always mcp_approval_response.



# File 'lib/openai/models/conversations/conversation_item.rb', line 241