Struct google_api_proto::google::cloud::dialogflow::v2beta1::knowledge_answers::Answer
source · pub struct Answer {
pub source: String,
pub faq_question: String,
pub answer: String,
pub match_confidence_level: i32,
pub match_confidence: f32,
}
Expand description
An answer from Knowledge Connector.
Fields§
§source: String
Indicates which Knowledge Document this answer was extracted from.
Format: projects/<Project ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>
.
faq_question: String
The corresponding FAQ question if the answer was extracted from a FAQ Document, empty otherwise.
answer: String
The piece of text from the source
knowledge base document that answers
this conversational query.
match_confidence_level: i32
The system’s confidence level that this knowledge answer is a good match
for this conversational query.
NOTE: The confidence level for a given <query, answer>
pair may change
without notice, as it depends on models that are constantly being
improved. However, it will change less frequently than the confidence
score below, and should be preferred for referencing the quality of an
answer.
match_confidence: f32
The system’s confidence score that this Knowledge answer is a good match
for this conversational query.
The range is from 0.0 (completely uncertain) to 1.0 (completely certain).
Note: The confidence score is likely to vary somewhat (possibly even for
identical requests), as the underlying model is under constant
improvement. It may be deprecated in the future. We recommend using
match_confidence_level
which should be generally more stable.
Implementations§
source§impl Answer
impl Answer
sourcepub fn match_confidence_level(&self) -> MatchConfidenceLevel
pub fn match_confidence_level(&self) -> MatchConfidenceLevel
Returns the enum value of match_confidence_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_match_confidence_level(&mut self, value: MatchConfidenceLevel)
pub fn set_match_confidence_level(&mut self, value: MatchConfidenceLevel)
Sets match_confidence_level
to the provided enum value.
Trait Implementations§
source§impl Message for Answer
impl Message for Answer
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 Answer
impl PartialEq for Answer
impl StructuralPartialEq for Answer
Auto Trait Implementations§
impl Freeze for Answer
impl RefUnwindSafe for Answer
impl Send for Answer
impl Sync for Answer
impl Unpin for Answer
impl UnwindSafe for Answer
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