#[non_exhaustive]pub struct GoogleSearch {
pub exclude_domains: Vec<String>,
pub blocking_confidence: Option<PhishBlockThreshold>,
/* private fields */
}Available on crate features
gen-ai-cache-service or llm-utility-service or prediction-service only.Expand description
GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.
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.exclude_domains: Vec<String>Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: [“amazon.com”, “facebook.com”].
blocking_confidence: Option<PhishBlockThreshold>Optional. Sites with confidence level chosen & above this value will be blocked from the search results.
Implementations§
Source§impl GoogleSearch
impl GoogleSearch
pub fn new() -> Self
Sourcepub fn set_exclude_domains<T, V>(self, v: T) -> Self
pub fn set_exclude_domains<T, V>(self, v: T) -> Self
Sets the value of exclude_domains.
§Example
ⓘ
let x = GoogleSearch::new().set_exclude_domains(["a", "b", "c"]);Sourcepub fn set_blocking_confidence<T>(self, v: T) -> Selfwhere
T: Into<PhishBlockThreshold>,
pub fn set_blocking_confidence<T>(self, v: T) -> Selfwhere
T: Into<PhishBlockThreshold>,
Sets the value of blocking_confidence.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::tool::PhishBlockThreshold;
let x0 = GoogleSearch::new().set_blocking_confidence(PhishBlockThreshold::BlockLowAndAbove);
let x1 = GoogleSearch::new().set_blocking_confidence(PhishBlockThreshold::BlockMediumAndAbove);
let x2 = GoogleSearch::new().set_blocking_confidence(PhishBlockThreshold::BlockHighAndAbove);Sourcepub fn set_or_clear_blocking_confidence<T>(self, v: Option<T>) -> Selfwhere
T: Into<PhishBlockThreshold>,
pub fn set_or_clear_blocking_confidence<T>(self, v: Option<T>) -> Selfwhere
T: Into<PhishBlockThreshold>,
Sets or clears the value of blocking_confidence.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::tool::PhishBlockThreshold;
let x0 = GoogleSearch::new().set_or_clear_blocking_confidence(Some(PhishBlockThreshold::BlockLowAndAbove));
let x1 = GoogleSearch::new().set_or_clear_blocking_confidence(Some(PhishBlockThreshold::BlockMediumAndAbove));
let x2 = GoogleSearch::new().set_or_clear_blocking_confidence(Some(PhishBlockThreshold::BlockHighAndAbove));
let x_none = GoogleSearch::new().set_or_clear_blocking_confidence(None::<PhishBlockThreshold>);Trait Implementations§
Source§impl Clone for GoogleSearch
impl Clone for GoogleSearch
Source§fn clone(&self) -> GoogleSearch
fn clone(&self) -> GoogleSearch
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 GoogleSearch
impl Debug for GoogleSearch
Source§impl Default for GoogleSearch
impl Default for GoogleSearch
Source§fn default() -> GoogleSearch
fn default() -> GoogleSearch
Returns the “default value” for a type. Read more
Source§impl Message for GoogleSearch
impl Message for GoogleSearch
Source§impl PartialEq for GoogleSearch
impl PartialEq for GoogleSearch
impl StructuralPartialEq for GoogleSearch
Auto Trait Implementations§
impl Freeze for GoogleSearch
impl RefUnwindSafe for GoogleSearch
impl Send for GoogleSearch
impl Sync for GoogleSearch
impl Unpin for GoogleSearch
impl UnwindSafe for GoogleSearch
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