Module: OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool

Extended by:
Internal::Type::Union
Defined in:
lib/openai/models/beta/thread_create_and_run_params.rb

Defined Under Namespace

Classes: FileSearch

Instance Method Summary collapse

Methods included from Internal::Type::Union

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

Instance Method Details

#initialize(file_id: nil, tools: nil) ⇒ Object

Parameters:



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/openai/models/beta/thread_create_and_run_params.rb', line 378

module Tool
  extend OpenAI::Internal::Type::Union

  discriminator :type

  variant :code_interpreter, -> { OpenAI::Beta::CodeInterpreterTool }

  variant :file_search,
          -> {
            OpenAI::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool::FileSearch
          }

  class FileSearch < OpenAI::Internal::Type::BaseModel
    # @!attribute type
    #   The type of tool being defined: `file_search`
    #
    #   @return [Symbol, :file_search]
    required :type, const: :file_search

    # @!method initialize(type: :file_search)
    #   @param type [Symbol, :file_search] The type of tool being defined: `file_search`
  end

  # @!method self.variants
  #   @return [Array(OpenAI::Models::Beta::CodeInterpreterTool, OpenAI::Models::Beta::ThreadCreateAndRunParams::Thread::Message::Attachment::Tool::FileSearch)]
end