Module: OpenAI::Models::VectorStores::FileCreateParams::Attribute

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variant_for_dump

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_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, type_info

Class Method Details

.variants ⇒ Array(String, Float, Boolean)

Returns:



# File 'lib/openai/models/vector_stores/file_create_params.rb', line 81

Instance Method Details

#initialize(vector_store_id:, file_id:, attributes: nil, chunking_strategy: nil, request_options: {}) ⇒ Object

Parameters:

  • vector_store_id (String)
  • file_id (String) —

    A File ID that the vector store should use. Useful for tools like file_search that can access files. For multi-file ingestion, we recommend file_batches to minimize per-vector-store write requests.

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

  • chunking_strategy (OpenAI::Models::AutoFileChunkingStrategyParam, OpenAI::Models::StaticFileChunkingStrategyObjectParam) (defaults to: nil) —

    The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty.

  • request_options (OpenAI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/openai/models/vector_stores/file_create_params.rb', line 72

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