#[non_exhaustive]pub struct VertexRagStore {
pub rag_resources: Vec<RagResource>,
pub similarity_top_k: Option<i32>,
pub vector_distance_threshold: Option<f64>,
pub rag_retrieval_config: Option<RagRetrievalConfig>,
/* private fields */
}gen-ai-cache-service or llm-utility-service or prediction-service or vertex-rag-service only.Expand description
Retrieve from Vertex RAG Store for grounding.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rag_resources: Vec<RagResource>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.
similarity_top_k: Option<i32>Optional. Number of top k results to return from the selected corpora.
vector_distance_threshold: Option<f64>Optional. Only return results with vector distance smaller than the threshold.
rag_retrieval_config: Option<RagRetrievalConfig>Optional. The retrieval config for the Rag query.
Implementations§
Source§impl VertexRagStore
impl VertexRagStore
pub fn new() -> Self
Sourcepub fn set_rag_resources<T, V>(self, v: T) -> Self
pub fn set_rag_resources<T, V>(self, v: T) -> Self
Sets the value of rag_resources.
§Example
use google_cloud_aiplatform_v1::model::vertex_rag_store::RagResource;
let x = VertexRagStore::new()
.set_rag_resources([
RagResource::default()/* use setters */,
RagResource::default()/* use (different) setters */,
]);Sourcepub fn set_similarity_top_k<T>(self, v: T) -> Self
👎Deprecated
pub fn set_similarity_top_k<T>(self, v: T) -> Self
Sets the value of similarity_top_k.
§Example
let x = VertexRagStore::new().set_similarity_top_k(42);Sourcepub fn set_or_clear_similarity_top_k<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_similarity_top_k<T>(self, v: Option<T>) -> Self
Sets or clears the value of similarity_top_k.
§Example
let x = VertexRagStore::new().set_or_clear_similarity_top_k(Some(42));
let x = VertexRagStore::new().set_or_clear_similarity_top_k(None::<i32>);Sourcepub fn set_vector_distance_threshold<T>(self, v: T) -> Self
👎Deprecated
pub fn set_vector_distance_threshold<T>(self, v: T) -> Self
Sets the value of vector_distance_threshold.
§Example
let x = VertexRagStore::new().set_vector_distance_threshold(42.0);Sourcepub fn set_or_clear_vector_distance_threshold<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_vector_distance_threshold<T>(self, v: Option<T>) -> Self
Sets or clears the value of vector_distance_threshold.
§Example
let x = VertexRagStore::new().set_or_clear_vector_distance_threshold(Some(42.0));
let x = VertexRagStore::new().set_or_clear_vector_distance_threshold(None::<f32>);Sourcepub fn set_rag_retrieval_config<T>(self, v: T) -> Selfwhere
T: Into<RagRetrievalConfig>,
pub fn set_rag_retrieval_config<T>(self, v: T) -> Selfwhere
T: Into<RagRetrievalConfig>,
Sets the value of rag_retrieval_config.
§Example
use google_cloud_aiplatform_v1::model::RagRetrievalConfig;
let x = VertexRagStore::new().set_rag_retrieval_config(RagRetrievalConfig::default()/* use setters */);Sourcepub fn set_or_clear_rag_retrieval_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RagRetrievalConfig>,
pub fn set_or_clear_rag_retrieval_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RagRetrievalConfig>,
Sets or clears the value of rag_retrieval_config.
§Example
use google_cloud_aiplatform_v1::model::RagRetrievalConfig;
let x = VertexRagStore::new().set_or_clear_rag_retrieval_config(Some(RagRetrievalConfig::default()/* use setters */));
let x = VertexRagStore::new().set_or_clear_rag_retrieval_config(None::<RagRetrievalConfig>);Trait Implementations§
Source§impl Clone for VertexRagStore
impl Clone for VertexRagStore
Source§fn clone(&self) -> VertexRagStore
fn clone(&self) -> VertexRagStore
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more