Class: OpenAI::Models::VectorStoreCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/vector_store_create_params.rb,
sig/openai/models/vector_store_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::VectorStores#create

Defined Under Namespace

Classes: ExpiresAfter

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

Returns a new instance of VectorStoreCreateParams.

Parameters:

  • chunking_strategy —

    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.

  • description —

    A description for the vector store. Can be used to describe the vector store's purpose.

  • expires_after —

    The expiration policy for a vector store.

  • file_ids —

    A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.

  • metadata —

    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.

    Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

  • name —

    The name of the vector store.

  • chunking_strategy: (OpenAI::Models::file_chunking_strategy_param)
  • description: (String)
  • expires_after: (OpenAI::VectorStoreCreateParams::ExpiresAfter)
  • file_ids: (::Array[String])
  • metadata: (OpenAI::Models::metadata, nil)
  • name: (String)
  • request_options: (OpenAI::request_opts)


87
88
89
90
91
92
93
94
95
# File 'sig/openai/models/vector_store_create_params.rbs', line 87

def initialize: (
  ?chunking_strategy: OpenAI::Models::file_chunking_strategy_param,
  ?description: String,
  ?expires_after: OpenAI::VectorStoreCreateParams::ExpiresAfter,
  ?file_ids: ::Array[String],
  ?metadata: OpenAI::Models::metadata?,
  ?name: String,
  ?request_options: OpenAI::request_opts
) -> void

Instance Attribute Details

#chunking_strategy ⇒ OpenAI::Models::file_chunking_strategy_param?

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.

Returns:

  • (OpenAI::Models::file_chunking_strategy_param, nil)


15
# File 'lib/openai/models/vector_store_create_params.rb', line 15

optional :chunking_strategy, union: -> { OpenAI::FileChunkingStrategyParam }

#description ⇒ String?

A description for the vector store. Can be used to describe the vector store's purpose.

Returns:

  • (String, nil)


22
# File 'lib/openai/models/vector_store_create_params.rb', line 22

optional :description, String

#expires_after ⇒ OpenAI::VectorStoreCreateParams::ExpiresAfter?

The expiration policy for a vector store.

Returns:

  • (OpenAI::VectorStoreCreateParams::ExpiresAfter, nil)


28
# File 'lib/openai/models/vector_store_create_params.rb', line 28

optional :expires_after, -> { OpenAI::VectorStoreCreateParams::ExpiresAfter }

#file_ids ⇒ ::Array[String]?

A list of File IDs that the vector store should use. Useful for tools like file_search that can access files.

Returns:

  • (::Array[String], nil)


36
# File 'lib/openai/models/vector_store_create_params.rb', line 36

optional :file_ids, OpenAI::Internal::Type::ArrayOf[String]

#metadata ⇒ OpenAI::Models::metadata?

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.

Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

Returns:

  • (OpenAI::Models::metadata, nil)


46
# File 'lib/openai/models/vector_store_create_params.rb', line 46

optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true

#name ⇒ String?

The name of the vector store.

Returns:

  • (String, nil)


52
# File 'lib/openai/models/vector_store_create_params.rb', line 52

optional :name, String

Instance Method Details

#to_hash ⇒ { ?chunking_strategy: OpenAI::Models::file_chunking_strategy_param, ?description: String, ?expires_after: OpenAI::VectorStoreCreateParams::ExpiresAfter, ?file_ids: ::Array[String], ?metadata: OpenAI::Models::metadata?, ?name: String, ?request_options: OpenAI::RequestOptions }

Returns:

  • ({ ?chunking_strategy: OpenAI::Models::file_chunking_strategy_param, ?description: String, ?expires_after: OpenAI::VectorStoreCreateParams::ExpiresAfter, ?file_ids: ::Array[String], ?metadata: OpenAI::Models::metadata?, ?name: String, ?request_options: OpenAI::RequestOptions })


97
98
99
100
101
102
103
104
105
# File 'sig/openai/models/vector_store_create_params.rbs', line 97

def to_hash: -> {
  ?chunking_strategy: OpenAI::Models::file_chunking_strategy_param,
  ?description: String,
  ?expires_after: OpenAI::VectorStoreCreateParams::ExpiresAfter,
  ?file_ids: ::Array[String],
  ?metadata: OpenAI::Models::metadata?,
  ?name: String,
  ?request_options: OpenAI::RequestOptions
}