Class: OpenAI::Models::VectorStoreSearchResponse

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

Overview

See Also:

  • OpenAI::Resources::VectorStores#search

Defined Under Namespace

Modules: Attribute Classes: Content

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

#initializeObject

Parameters:

  • attributes

    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.

  • content

    Content chunks from the file.

  • file_id

    The ID of the vector store file.

  • filename

    The name of the vector store file.

  • score

    The similarity score for the result.



46
# File 'sig/openai/models/vector_store_search_response.rbs', line 46

def initialize: (

Instance Attribute Details

#attributes::Hash[Symbol, OpenAI::Models::VectorStoreSearchResponse::attribute]?

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.

Returns:

  • (::Hash[Symbol, OpenAI::Models::VectorStoreSearchResponse::attribute], nil)


15
16
17
18
19
# File 'lib/openai/models/vector_store_search_response.rb', line 15

required(
  :attributes,
  -> { OpenAI::Internal::Type::HashOf[union: OpenAI::Models::VectorStoreSearchResponse::Attribute] },
  nil?: true
)

#content::Array[OpenAI::Models::VectorStoreSearchResponse::Content]

Content chunks from the file.



25
26
27
28
# File 'lib/openai/models/vector_store_search_response.rb', line 25

required(
  :content,
  -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Models::VectorStoreSearchResponse::Content] }
)

#file_idString

The ID of the vector store file.

Returns:

  • (String)


34
# File 'lib/openai/models/vector_store_search_response.rb', line 34

required :file_id, String

#filenameString

The name of the vector store file.

Returns:

  • (String)


40
# File 'lib/openai/models/vector_store_search_response.rb', line 40

required :filename, String

#scoreFloat

The similarity score for the result.

Returns:

  • (Float)


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

required :score, Float

Class Method Details

.variantsArray(String, Float, Boolean)

Returns:



# File 'lib/openai/models/vector_store_search_response.rb', line 76

Instance Method Details

#to_hash{

Returns:

  • ({)


54
# File 'sig/openai/models/vector_store_search_response.rbs', line 54

def to_hash: -> {