#[non_exhaustive]pub struct Retrieval {
pub disable_attribution: bool,
pub source: Option<Source>,
/* private fields */
}Available on crate features
gen-ai-cache-service or llm-utility-service or prediction-service only.Expand description
Defines a retrieval tool that model can call to access external knowledge.
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.disable_attribution: bool👎Deprecated
Optional. Deprecated. This option is no longer supported.
source: Option<Source>The source of the retrieval.
Implementations§
Source§impl Retrieval
impl Retrieval
pub fn new() -> Self
Sourcepub fn set_disable_attribution<T: Into<bool>>(self, v: T) -> Self
👎Deprecated
pub fn set_disable_attribution<T: Into<bool>>(self, v: T) -> Self
Sets the value of disable_attribution.
§Example
ⓘ
let x = Retrieval::new().set_disable_attribution(true);Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VertexAISearch;
let x = Retrieval::new().set_source(Some(
google_cloud_aiplatform_v1::model::retrieval::Source::VertexAiSearch(VertexAISearch::default().into())));Sourcepub fn vertex_ai_search(&self) -> Option<&Box<VertexAISearch>>
pub fn vertex_ai_search(&self) -> Option<&Box<VertexAISearch>>
The value of source
if it holds a VertexAiSearch, None if the field is not set or
holds a different branch.
Sourcepub fn set_vertex_ai_search<T: Into<Box<VertexAISearch>>>(self, v: T) -> Self
pub fn set_vertex_ai_search<T: Into<Box<VertexAISearch>>>(self, v: T) -> Self
Sets the value of source
to hold a VertexAiSearch.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VertexAISearch;
let x = Retrieval::new().set_vertex_ai_search(VertexAISearch::default()/* use setters */);
assert!(x.vertex_ai_search().is_some());
assert!(x.vertex_rag_store().is_none());Sourcepub fn vertex_rag_store(&self) -> Option<&Box<VertexRagStore>>
pub fn vertex_rag_store(&self) -> Option<&Box<VertexRagStore>>
The value of source
if it holds a VertexRagStore, None if the field is not set or
holds a different branch.
Sourcepub fn set_vertex_rag_store<T: Into<Box<VertexRagStore>>>(self, v: T) -> Self
pub fn set_vertex_rag_store<T: Into<Box<VertexRagStore>>>(self, v: T) -> Self
Sets the value of source
to hold a VertexRagStore.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VertexRagStore;
let x = Retrieval::new().set_vertex_rag_store(VertexRagStore::default()/* use setters */);
assert!(x.vertex_rag_store().is_some());
assert!(x.vertex_ai_search().is_none());Trait Implementations§
impl StructuralPartialEq for Retrieval
Auto Trait Implementations§
impl Freeze for Retrieval
impl RefUnwindSafe for Retrieval
impl Send for Retrieval
impl Sync for Retrieval
impl Unpin for Retrieval
impl UnwindSafe for Retrieval
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