#[non_exhaustive]pub struct SearchSource {
pub serving_config: String,
pub max_result_count: i32,
pub filter: String,
pub safe_search: bool,
/* private fields */
}Available on crate feature
grounded-generation-service only.Expand description
Message to be used for grounding with Vertex AI Search.
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.serving_config: StringThe resource name of the Engine to use.
Format:
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}
max_result_count: i32Number of search results to return.
The default value is 10. The maximumm allowed value is 10.
filter: StringFilter expression to be applied to the search.
The syntax is the same as SearchRequest.filter.
safe_search: boolIf set, safe search is enabled in Vertex AI Search requests.
Implementations§
Source§impl SearchSource
impl SearchSource
pub fn new() -> Self
Sourcepub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
pub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
Sets the value of serving_config.
§Example
ⓘ
let x = SearchSource::new().set_serving_config("example");Sourcepub fn set_max_result_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_result_count<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_filter<T: Into<String>>(self, v: T) -> Self
pub fn set_filter<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_safe_search<T: Into<bool>>(self, v: T) -> Self
pub fn set_safe_search<T: Into<bool>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for SearchSource
impl Clone for SearchSource
Source§fn clone(&self) -> SearchSource
fn clone(&self) -> SearchSource
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 SearchSource
impl Debug for SearchSource
Source§impl Default for SearchSource
impl Default for SearchSource
Source§fn default() -> SearchSource
fn default() -> SearchSource
Returns the “default value” for a type. Read more
Source§impl Message for SearchSource
impl Message for SearchSource
Source§impl PartialEq for SearchSource
impl PartialEq for SearchSource
impl StructuralPartialEq for SearchSource
Auto Trait Implementations§
impl Freeze for SearchSource
impl RefUnwindSafe for SearchSource
impl Send for SearchSource
impl Sync for SearchSource
impl Unpin for SearchSource
impl UnwindSafe for SearchSource
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