#[non_exhaustive]pub struct RagEmbeddingModelConfig {
pub model_config: Option<ModelConfig>,
/* private fields */
}Available on crate feature
vertex-rag-data-service only.Expand description
Config for the embedding model to use for RAG.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model_config: Option<ModelConfig>The model config to use.
Implementations§
Source§impl RagEmbeddingModelConfig
impl RagEmbeddingModelConfig
pub fn new() -> Self
Sourcepub fn set_model_config<T: Into<Option<ModelConfig>>>(self, v: T) -> Self
pub fn set_model_config<T: Into<Option<ModelConfig>>>(self, v: T) -> Self
Sets the value of model_config.
Note that all the setters affecting model_config are mutually
exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::rag_embedding_model_config::VertexPredictionEndpoint;
let x = RagEmbeddingModelConfig::new().set_model_config(Some(
google_cloud_aiplatform_v1::model::rag_embedding_model_config::ModelConfig::VertexPredictionEndpoint(VertexPredictionEndpoint::default().into())));Sourcepub fn vertex_prediction_endpoint(
&self,
) -> Option<&Box<VertexPredictionEndpoint>>
pub fn vertex_prediction_endpoint( &self, ) -> Option<&Box<VertexPredictionEndpoint>>
The value of model_config
if it holds a VertexPredictionEndpoint, None if the field is not set or
holds a different branch.
Sourcepub fn set_vertex_prediction_endpoint<T: Into<Box<VertexPredictionEndpoint>>>(
self,
v: T,
) -> Self
pub fn set_vertex_prediction_endpoint<T: Into<Box<VertexPredictionEndpoint>>>( self, v: T, ) -> Self
Sets the value of model_config
to hold a VertexPredictionEndpoint.
Note that all the setters affecting model_config are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::rag_embedding_model_config::VertexPredictionEndpoint;
let x = RagEmbeddingModelConfig::new().set_vertex_prediction_endpoint(VertexPredictionEndpoint::default()/* use setters */);
assert!(x.vertex_prediction_endpoint().is_some());Trait Implementations§
Source§impl Clone for RagEmbeddingModelConfig
impl Clone for RagEmbeddingModelConfig
Source§fn clone(&self) -> RagEmbeddingModelConfig
fn clone(&self) -> RagEmbeddingModelConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RagEmbeddingModelConfig
impl Debug for RagEmbeddingModelConfig
Source§impl Default for RagEmbeddingModelConfig
impl Default for RagEmbeddingModelConfig
Source§fn default() -> RagEmbeddingModelConfig
fn default() -> RagEmbeddingModelConfig
Returns the “default value” for a type. Read more
Source§impl Message for RagEmbeddingModelConfig
impl Message for RagEmbeddingModelConfig
Source§impl PartialEq for RagEmbeddingModelConfig
impl PartialEq for RagEmbeddingModelConfig
impl StructuralPartialEq for RagEmbeddingModelConfig
Auto Trait Implementations§
impl Freeze for RagEmbeddingModelConfig
impl RefUnwindSafe for RagEmbeddingModelConfig
impl Send for RagEmbeddingModelConfig
impl Sync for RagEmbeddingModelConfig
impl Unpin for RagEmbeddingModelConfig
impl UnwindSafe for RagEmbeddingModelConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more