Class: OpenAI::Models::VectorStore

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/vector_store.rb,
sig/openai/models/vector_store.rbs

Overview

See Also:

  • OpenAI::Resources::VectorStores#create

Defined Under Namespace

Modules: Status Classes: ExpiresAfter, FileCounts

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Class Method Summary collapse

Instance Method Summary collapse

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_with_error, dump, #dump, #inspect, inspect, meta_info, new_coerce_state, 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(cancelled:, completed:, failed:, in_progress:, total:) ⇒ Object

Parameters:

  • id —

    The identifier, which can be referenced in API endpoints.

  • created_at —

    The Unix timestamp (in seconds) for when the vector store was created.

  • last_active_at —

    The Unix timestamp (in seconds) for when the vector store was last active.

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

  • name —

    The name of the vector store.

  • status —

    The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use.

  • usage_bytes —

    The total number of bytes used by the files in the vector store.

  • expires_after —

    The expiration policy for a vector store.

  • expires_at —

    The Unix timestamp (in seconds) for when the vector store will expire.

  • object —

    The object type, which is always vector_store.



# File 'lib/openai/models/vector_store.rb', line 79

Instance Attribute Details

#created_at ⇒ Integer

The Unix timestamp (in seconds) for when the vector store was created.

Returns:

  • (Integer)


17
# File 'lib/openai/models/vector_store.rb', line 17

required :created_at, Integer

#expires_after ⇒ OpenAI::VectorStore::ExpiresAfter?

The expiration policy for a vector store.

Returns:

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


71
# File 'lib/openai/models/vector_store.rb', line 71

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

#expires_at ⇒ Integer?

The Unix timestamp (in seconds) for when the vector store will expire.

Returns:

  • (Integer, nil)


77
# File 'lib/openai/models/vector_store.rb', line 77

optional :expires_at, Integer, nil?: true

#file_counts ⇒ OpenAI::Models::VectorStore::FileCounts

Parameters:

  • value (OpenAI::VectorStore::FileCounts)

Returns:



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

required :file_counts, -> { OpenAI::VectorStore::FileCounts }

#id ⇒ String

The identifier, which can be referenced in API endpoints.

Returns:

  • (String)


11
# File 'lib/openai/models/vector_store.rb', line 11

required :id, String

#last_active_at ⇒ Integer?

The Unix timestamp (in seconds) for when the vector store was last active.

Returns:

  • (Integer, nil)


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

required :last_active_at, Integer, nil?: true

#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, 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.

Returns:

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


39
# File 'lib/openai/models/vector_store.rb', line 39

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

#name ⇒ String

The name of the vector store.

Returns:

  • (String)


45
# File 'lib/openai/models/vector_store.rb', line 45

required :name, String

#object ⇒ :vector_store

The object type, which is always vector_store.

Returns:

  • (:vector_store)


51
# File 'lib/openai/models/vector_store.rb', line 51

required :object, const: :vector_store

#status ⇒ OpenAI::Models::VectorStore::status

The status of the vector store, which can be either expired, in_progress, or completed. A status of completed indicates that the vector store is ready for use.

Returns:

  • (OpenAI::Models::VectorStore::status)


59
# File 'lib/openai/models/vector_store.rb', line 59

required :status, enum: -> { OpenAI::VectorStore::Status }

#usage_bytes ⇒ Integer

The total number of bytes used by the files in the vector store.

Returns:

  • (Integer)


65
# File 'lib/openai/models/vector_store.rb', line 65

required :usage_bytes, Integer

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/vector_store.rb', line 183

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


104
# File 'sig/openai/models/vector_store.rbs', line 104

def to_hash: -> {