#[non_exhaustive]pub struct Retrieval {
pub disable_attribution: bool,
pub source: Option<Source>,
/* private fields */
}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.
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.
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.
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Retrieval
impl<'de> Deserialize<'de> for Retrieval
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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