Struct google_api_proto::google::cloud::discoveryengine::v1::check_grounding_response::Claim
source · pub struct Claim {
pub start_pos: Option<i32>,
pub end_pos: Option<i32>,
pub claim_text: String,
pub citation_indices: Vec<i32>,
pub grounding_check_required: Option<bool>,
}
Expand description
Text and citation info for a claim in the answer candidate.
Fields§
§start_pos: Option<i32>
Position indicating the start of the claim in the answer candidate, measured in bytes.
end_pos: Option<i32>
Position indicating the end of the claim in the answer candidate, exclusive.
claim_text: String
Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.
citation_indices: Vec<i32>
A list of indices (into ‘cited_chunks’) specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.
grounding_check_required: Option<bool>
Indicates that this claim required grounding check. When the system decided this claim doesn’t require attribution/grounding check, this field will be set to false. In that case, no grounding check was done for the claim and therefore [citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.citation_indices], [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices], and [score][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.score] should not be returned.
Implementations§
source§impl Claim
impl Claim
sourcepub fn start_pos(&self) -> i32
pub fn start_pos(&self) -> i32
Returns the value of start_pos
, or the default value if start_pos
is unset.
sourcepub fn end_pos(&self) -> i32
pub fn end_pos(&self) -> i32
Returns the value of end_pos
, or the default value if end_pos
is unset.
sourcepub fn grounding_check_required(&self) -> bool
pub fn grounding_check_required(&self) -> bool
Returns the value of grounding_check_required
, or the default value if grounding_check_required
is unset.
Trait Implementations§
source§impl Message for Claim
impl Message for Claim
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Claim
impl PartialEq for Claim
impl StructuralPartialEq for Claim
Auto Trait Implementations§
impl Freeze for Claim
impl RefUnwindSafe for Claim
impl Send for Claim
impl Sync for Claim
impl Unpin for Claim
impl UnwindSafe for Claim
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request