#[non_exhaustive]pub struct GroundingSpec {
pub include_grounding_supports: bool,
pub filtering_level: FilteringLevel,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
Grounding specification.
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.include_grounding_supports: boolOptional. Specifies whether to include grounding_supports in the answer.
The default value is false.
When this field is set to true, returned answer will have
grounding_score and will contain GroundingSupports for each claim.
filtering_level: FilteringLevelOptional. Specifies whether to enable the filtering based on grounding score and at what level.
Implementations§
Source§impl GroundingSpec
impl GroundingSpec
pub fn new() -> Self
Sourcepub fn set_include_grounding_supports<T: Into<bool>>(self, v: T) -> Self
pub fn set_include_grounding_supports<T: Into<bool>>(self, v: T) -> Self
Sets the value of include_grounding_supports.
§Example
ⓘ
let x = GroundingSpec::new().set_include_grounding_supports(true);Sourcepub fn set_filtering_level<T: Into<FilteringLevel>>(self, v: T) -> Self
pub fn set_filtering_level<T: Into<FilteringLevel>>(self, v: T) -> Self
Sets the value of filtering_level.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::answer_query_request::grounding_spec::FilteringLevel;
let x0 = GroundingSpec::new().set_filtering_level(FilteringLevel::Low);
let x1 = GroundingSpec::new().set_filtering_level(FilteringLevel::High);Trait Implementations§
Source§impl Clone for GroundingSpec
impl Clone for GroundingSpec
Source§fn clone(&self) -> GroundingSpec
fn clone(&self) -> GroundingSpec
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 GroundingSpec
impl Debug for GroundingSpec
Source§impl Default for GroundingSpec
impl Default for GroundingSpec
Source§fn default() -> GroundingSpec
fn default() -> GroundingSpec
Returns the “default value” for a type. Read more
Source§impl Message for GroundingSpec
impl Message for GroundingSpec
Source§impl PartialEq for GroundingSpec
impl PartialEq for GroundingSpec
impl StructuralPartialEq for GroundingSpec
Auto Trait Implementations§
impl Freeze for GroundingSpec
impl RefUnwindSafe for GroundingSpec
impl Send for GroundingSpec
impl Sync for GroundingSpec
impl Unpin for GroundingSpec
impl UnwindSafe for GroundingSpec
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