Class: OpenAI::Models::VectorStoreSearchResponse::Content

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

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

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_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(text:, type:) ⇒ Content

Returns a new instance of Content.

Parameters:

  • text —

    The text content returned from search.

  • type —

    The type of content.

  • text: (String)
  • type: (OpenAI::Models::VectorStoreSearchResponse::Content::type_)


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

Instance Attribute Details

#text ⇒ String

The text content returned from search.

Returns:

  • (String)


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

required :text, String

#type ⇒ OpenAI::Models::VectorStoreSearchResponse::Content::type_

The type of content.

Returns:

  • (OpenAI::Models::VectorStoreSearchResponse::Content::type_)


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

required :type, enum: -> { OpenAI::Models::VectorStoreSearchResponse::Content::Type }

Instance Method Details

#to_hash ⇒ { text: String, type: OpenAI::Models::VectorStoreSearchResponse::Content::type_ }

Returns:

  • ({ text: String, type: OpenAI::Models::VectorStoreSearchResponse::Content::type_ })


92
93
94
95
# File 'sig/openai/models/vector_store_search_response.rbs', line 92

def to_hash: -> {
  text: String,
  type: OpenAI::Models::VectorStoreSearchResponse::Content::type_
}