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, coerce_with_error, 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

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 useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.

  • 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.



164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/openai/models/beta/beta_response_file_search_tool_call.rb', line 164

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]