Class: OpenAI::Models::Responses::ResponseOutputText

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

Defined Under Namespace

Modules: Annotation Classes: Logprob

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

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(file_id:, index:, type: :file_path) ⇒ Object

Parameters:

  • annotations

    The annotations of the text output.

  • text

    The text output from the model.

  • type (defaults to: :file_path)

    The type of the output text. Always output_text.



# File 'lib/openai/models/responses/response_output_text.rb', line 41

Instance Attribute Details

#annotations::Array[OpenAI::Models::Responses::ResponseOutputText::annotation]

The annotations of the text output.

Returns:

  • (::Array[OpenAI::Models::Responses::ResponseOutputText::annotation])


11
12
13
14
# File 'lib/openai/models/responses/response_output_text.rb', line 11

required(
  :annotations,
  -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseOutputText::Annotation] }
)

#logprobsArray<OpenAI::Models::Responses::ResponseOutputText::Logprob>?



39
# File 'lib/openai/models/responses/response_output_text.rb', line 39

optional :logprobs, -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::ResponseOutputText::Logprob] }

#textString

The text output from the model.

Returns:

  • (String)


20
# File 'lib/openai/models/responses/response_output_text.rb', line 20

required :text, String

#type:output_text

The type of the output text. Always output_text.

Returns:

  • (:output_text)


34
# File 'lib/openai/models/responses/response_output_text.rb', line 34

required :type, const: :output_text

Instance Method Details

#to_hash{

Returns:

  • ({)


41
# File 'sig/openai/models/responses/response_output_text.rbs', line 41

def to_hash: -> {