Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexRagStore

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firebaseml_v2beta/classes.rb,
lib/google/apis/firebaseml_v2beta/representations.rb,
lib/google/apis/firebaseml_v2beta/representations.rb

Overview

Retrieve from Vertex RAG Store for grounding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1VertexRagStore

Returns a new instance of GoogleCloudAiplatformV1beta1VertexRagStore.



4213
4214
4215
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4213

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#rag_corporaArray<String>

Optional. Deprecated. Please use rag_resources instead. Corresponds to the JSON property ragCorpora

Returns:

  • (Array<String>)


4179
4180
4181
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4179

def rag_corpora
  @rag_corpora
end

#rag_resourcesArray<Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1VertexRagStoreRagResource>

Optional. The representation of the rag source. It can be used to specify corpus only or ragfiles. Currently only support one corpus or multiple files from one corpus. In the future we may open up multiple corpora support. Corresponds to the JSON property ragResources



4186
4187
4188
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4186

def rag_resources
  @rag_resources
end

#rag_retrieval_configGoogle::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1RagRetrievalConfig

Specifies the context retrieval config. Corresponds to the JSON property ragRetrievalConfig



4191
4192
4193
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4191

def rag_retrieval_config
  @rag_retrieval_config
end

#similarity_top_kFixnum

Optional. Number of top k results to return from the selected corpora. Corresponds to the JSON property similarityTopK

Returns:

  • (Fixnum)


4196
4197
4198
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4196

def similarity_top_k
  @similarity_top_k
end

#store_contextBoolean Also known as: store_context?

Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if store_context bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions. Corresponds to the JSON property storeContext

Returns:

  • (Boolean)


4205
4206
4207
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4205

def store_context
  @store_context
end

#vector_distance_thresholdFloat

Optional. Only return results with vector distance smaller than the threshold. Corresponds to the JSON property vectorDistanceThreshold

Returns:

  • (Float)


4211
4212
4213
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4211

def vector_distance_threshold
  @vector_distance_threshold
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4218
4219
4220
4221
4222
4223
4224
4225
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 4218

def update!(**args)
  @rag_corpora = args[:rag_corpora] if args.key?(:rag_corpora)
  @rag_resources = args[:rag_resources] if args.key?(:rag_resources)
  @rag_retrieval_config = args[:rag_retrieval_config] if args.key?(:rag_retrieval_config)
  @similarity_top_k = args[:similarity_top_k] if args.key?(:similarity_top_k)
  @store_context = args[:store_context] if args.key?(:store_context)
  @vector_distance_threshold = args[:vector_distance_threshold] if args.key?(:vector_distance_threshold)
end