Struct google_api_proto::google::cloud::discoveryengine::v1beta::answer_query_request::AnswerGenerationSpec
source · pub struct AnswerGenerationSpec {
pub model_spec: Option<ModelSpec>,
pub prompt_spec: Option<PromptSpec>,
pub include_citations: bool,
pub answer_language_code: String,
pub ignore_adversarial_query: bool,
pub ignore_non_answer_seeking_query: bool,
pub ignore_low_relevant_content: Option<bool>,
}
Expand description
Answer generation specification.
Fields§
§model_spec: Option<ModelSpec>
Answer generation model specification.
prompt_spec: Option<PromptSpec>
Answer generation prompt specification.
include_citations: bool
Specifies whether to include citation metadata in the answer. The default
value is false
.
answer_language_code: String
Language code for Answer. Use language tags defined by BCP47. Note: This is an experimental feature.
ignore_adversarial_query: bool
Specifies whether to filter out adversarial queries. The default value
is false
.
Google employs search-query classification to detect adversarial
queries. No answer is returned if the search query is classified as an
adversarial query. For example, a user might ask a question regarding
negative comments about the company or submit a query designed to
generate unsafe, policy-violating output. If this field is set to
true
, we skip generating answers for adversarial queries and return
fallback messages instead.
ignore_non_answer_seeking_query: bool
Specifies whether to filter out queries that are not answer-seeking.
The default value is false
.
Google employs search-query classification to detect answer-seeking
queries. No answer is returned if the search query is classified as a
non-answer seeking query. If this field is set to true
, we skip
generating answers for non-answer seeking queries and return
fallback messages instead.
ignore_low_relevant_content: Option<bool>
Specifies whether to filter out queries that have low relevance.
If this field is set to false
, all search results are used regardless
of relevance to generate answers. If set to true
or unset, the behavior
will be determined automatically by the service.
Implementations§
source§impl AnswerGenerationSpec
impl AnswerGenerationSpec
sourcepub fn ignore_low_relevant_content(&self) -> bool
pub fn ignore_low_relevant_content(&self) -> bool
Returns the value of ignore_low_relevant_content
, or the default value if ignore_low_relevant_content
is unset.
Trait Implementations§
source§impl Clone for AnswerGenerationSpec
impl Clone for AnswerGenerationSpec
source§fn clone(&self) -> AnswerGenerationSpec
fn clone(&self) -> AnswerGenerationSpec
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AnswerGenerationSpec
impl Debug for AnswerGenerationSpec
source§impl Default for AnswerGenerationSpec
impl Default for AnswerGenerationSpec
source§impl Message for AnswerGenerationSpec
impl Message for AnswerGenerationSpec
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 AnswerGenerationSpec
impl PartialEq for AnswerGenerationSpec
source§fn eq(&self, other: &AnswerGenerationSpec) -> bool
fn eq(&self, other: &AnswerGenerationSpec) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AnswerGenerationSpec
Auto Trait Implementations§
impl Freeze for AnswerGenerationSpec
impl RefUnwindSafe for AnswerGenerationSpec
impl Send for AnswerGenerationSpec
impl Sync for AnswerGenerationSpec
impl Unpin for AnswerGenerationSpec
impl UnwindSafe for AnswerGenerationSpec
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