Class: OpenAI::Models::Responses::ResponseTextDoneEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/responses/response_text_done_event.rb,
sig/openai/models/responses/response_text_done_event.rbs

Defined Under Namespace

Classes: Logprob

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, fields, hash, #hash, inherited, #inspect, inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, coerce_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

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

Constructor Details

#initialize ⇒ Object

Parameters:

  • content_index —

    The index of the content part that the text content is finalized.

  • item_id —

    The ID of the output item that the text content is finalized.

  • logprobs —

    The log probabilities of the tokens in the delta.

  • output_index —

    The index of the output item that the text content is finalized.

  • sequence_number —

    The sequence number for this event.

  • text —

    The text content that is finalized.

  • type —

    The type of the event. Always response.output_text.done.



51
# File 'sig/openai/models/responses/response_text_done_event.rbs', line 51

def initialize: (

Instance Attribute Details

#content_index ⇒ Integer

The index of the content part that the text content is finalized.

Returns:

  • (Integer)


11
# File 'lib/openai/models/responses/response_text_done_event.rb', line 11

required :content_index, Integer

#item_id ⇒ String

The ID of the output item that the text content is finalized.

Returns:

  • (String)


17
# File 'lib/openai/models/responses/response_text_done_event.rb', line 17

required :item_id, String

#logprobs ⇒ ::Array[OpenAI::Responses::ResponseTextDoneEvent::Logprob]

The log probabilities of the tokens in the delta.

Returns:

  • (::Array[OpenAI::Responses::ResponseTextDoneEvent::Logprob])


23
24
25
26
# File 'lib/openai/models/responses/response_text_done_event.rb', line 23

required(
  :logprobs,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseTextDoneEvent::Logprob] }
)

#output_index ⇒ Integer

The index of the output item that the text content is finalized.

Returns:

  • (Integer)


32
# File 'lib/openai/models/responses/response_text_done_event.rb', line 32

required :output_index, Integer

#sequence_number ⇒ Integer

The sequence number for this event.

Returns:

  • (Integer)


38
# File 'lib/openai/models/responses/response_text_done_event.rb', line 38

required :sequence_number, Integer

#text ⇒ String

The text content that is finalized.

Returns:

  • (String)


44
# File 'lib/openai/models/responses/response_text_done_event.rb', line 44

required :text, String

#type ⇒ :"response.output_text.done"

The type of the event. Always response.output_text.done.

Returns:

  • (:"response.output_text.done")


50
# File 'lib/openai/models/responses/response_text_done_event.rb', line 50

required :type, const: :"response.output_text.done"

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


61
# File 'sig/openai/models/responses/response_text_done_event.rbs', line 61

def to_hash: -> {