#[non_exhaustive]pub struct RagVectorDbConfig {
pub api_auth: Option<ApiAuth>,
pub rag_embedding_model_config: Option<RagEmbeddingModelConfig>,
pub vector_db: Option<VectorDb>,
/* private fields */
}vertex-rag-data-service only.Expand description
Config for the Vector DB to use for RAG.
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.api_auth: Option<ApiAuth>Authentication config for the chosen Vector DB.
rag_embedding_model_config: Option<RagEmbeddingModelConfig>Optional. Immutable. The embedding model config of the Vector DB.
vector_db: Option<VectorDb>The config for the Vector DB.
Implementations§
Source§impl RagVectorDbConfig
impl RagVectorDbConfig
pub fn new() -> Self
Sourcepub fn set_api_auth<T>(self, v: T) -> Self
pub fn set_api_auth<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_api_auth<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_api_auth<T>(self, v: Option<T>) -> Self
Sourcepub fn set_rag_embedding_model_config<T>(self, v: T) -> Selfwhere
T: Into<RagEmbeddingModelConfig>,
pub fn set_rag_embedding_model_config<T>(self, v: T) -> Selfwhere
T: Into<RagEmbeddingModelConfig>,
Sets the value of rag_embedding_model_config.
§Example
use google_cloud_aiplatform_v1::model::RagEmbeddingModelConfig;
let x = RagVectorDbConfig::new().set_rag_embedding_model_config(RagEmbeddingModelConfig::default()/* use setters */);Sourcepub fn set_or_clear_rag_embedding_model_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RagEmbeddingModelConfig>,
pub fn set_or_clear_rag_embedding_model_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<RagEmbeddingModelConfig>,
Sets or clears the value of rag_embedding_model_config.
§Example
use google_cloud_aiplatform_v1::model::RagEmbeddingModelConfig;
let x = RagVectorDbConfig::new().set_or_clear_rag_embedding_model_config(Some(RagEmbeddingModelConfig::default()/* use setters */));
let x = RagVectorDbConfig::new().set_or_clear_rag_embedding_model_config(None::<RagEmbeddingModelConfig>);Sourcepub fn set_vector_db<T: Into<Option<VectorDb>>>(self, v: T) -> Self
pub fn set_vector_db<T: Into<Option<VectorDb>>>(self, v: T) -> Self
Sets the value of vector_db.
Note that all the setters affecting vector_db are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::rag_vector_db_config::RagManagedDb;
let x = RagVectorDbConfig::new().set_vector_db(Some(
google_cloud_aiplatform_v1::model::rag_vector_db_config::VectorDb::RagManagedDb(RagManagedDb::default().into())));Sourcepub fn rag_managed_db(&self) -> Option<&Box<RagManagedDb>>
pub fn rag_managed_db(&self) -> Option<&Box<RagManagedDb>>
The value of vector_db
if it holds a RagManagedDb, None if the field is not set or
holds a different branch.
Sourcepub fn set_rag_managed_db<T: Into<Box<RagManagedDb>>>(self, v: T) -> Self
pub fn set_rag_managed_db<T: Into<Box<RagManagedDb>>>(self, v: T) -> Self
Sets the value of vector_db
to hold a RagManagedDb.
Note that all the setters affecting vector_db are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::rag_vector_db_config::RagManagedDb;
let x = RagVectorDbConfig::new().set_rag_managed_db(RagManagedDb::default()/* use setters */);
assert!(x.rag_managed_db().is_some());
assert!(x.pinecone().is_none());
assert!(x.vertex_vector_search().is_none());Sourcepub fn pinecone(&self) -> Option<&Box<Pinecone>>
pub fn pinecone(&self) -> Option<&Box<Pinecone>>
The value of vector_db
if it holds a Pinecone, None if the field is not set or
holds a different branch.
Sourcepub fn set_pinecone<T: Into<Box<Pinecone>>>(self, v: T) -> Self
pub fn set_pinecone<T: Into<Box<Pinecone>>>(self, v: T) -> Self
Sets the value of vector_db
to hold a Pinecone.
Note that all the setters affecting vector_db are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::rag_vector_db_config::Pinecone;
let x = RagVectorDbConfig::new().set_pinecone(Pinecone::default()/* use setters */);
assert!(x.pinecone().is_some());
assert!(x.rag_managed_db().is_none());
assert!(x.vertex_vector_search().is_none());Sourcepub fn vertex_vector_search(&self) -> Option<&Box<VertexVectorSearch>>
pub fn vertex_vector_search(&self) -> Option<&Box<VertexVectorSearch>>
The value of vector_db
if it holds a VertexVectorSearch, None if the field is not set or
holds a different branch.
Sourcepub fn set_vertex_vector_search<T: Into<Box<VertexVectorSearch>>>(
self,
v: T,
) -> Self
pub fn set_vertex_vector_search<T: Into<Box<VertexVectorSearch>>>( self, v: T, ) -> Self
Sets the value of vector_db
to hold a VertexVectorSearch.
Note that all the setters affecting vector_db are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::rag_vector_db_config::VertexVectorSearch;
let x = RagVectorDbConfig::new().set_vertex_vector_search(VertexVectorSearch::default()/* use setters */);
assert!(x.vertex_vector_search().is_some());
assert!(x.rag_managed_db().is_none());
assert!(x.pinecone().is_none());Trait Implementations§
Source§impl Clone for RagVectorDbConfig
impl Clone for RagVectorDbConfig
Source§fn clone(&self) -> RagVectorDbConfig
fn clone(&self) -> RagVectorDbConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more