Module: OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Result::Attribute

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/beta/beta_response_file_search_tool_call.rb,
sig/openai/models/beta/beta_response_file_search_tool_call.rbs

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

Instance Method Details

#initialize(attributes: nil, file_id: nil, filename: nil, score: nil, text: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Result for more details.

Parameters:

  • attributes (Hash{Symbol=>String, Float, Boolean}, nil) (defaults to: nil)

    Set of 16 key-value pairs that can be attached to an object. This can be

  • file_id (String) (defaults to: nil)

    The unique ID of the file.

  • filename (String) (defaults to: nil)

    The name of the file.

  • score (Float) (defaults to: nil)

    The relevance score of the file - a value between 0 and 1.

  • text (String) (defaults to: nil)

    The text that was retrieved from the file.



150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 150

module Attribute
  extend OpenAI::Internal::Type::Union

  variant String

  variant Float

  variant OpenAI::Internal::Type::Boolean

  # @!method self.variants
  #   @return [Array(String, Float, Boolean)]
end

#self?.variants::Array[OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Result::attribute]

Returns:

  • (::Array[OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Result::attribute])


121
# File 'sig/openai/models/beta/beta_response_file_search_tool_call.rbs', line 121

def self?.variants: -> ::Array[OpenAI::Models::Beta::BetaResponseFileSearchToolCall::Result::attribute]