#[non_exhaustive]pub struct DataStoreConnectionSignals {
pub rewriter_model_call_signals: Option<RewriterModelCallSignals>,
pub rewritten_query: String,
pub search_snippets: Vec<SearchSnippet>,
pub answer_generation_model_call_signals: Option<AnswerGenerationModelCallSignals>,
pub answer: String,
pub answer_parts: Vec<AnswerPart>,
pub cited_snippets: Vec<CitedSnippet>,
pub grounding_signals: Option<GroundingSignals>,
pub safety_signals: Option<SafetySignals>,
/* private fields */
}sessions only.Expand description
Data store connection feature output signals. Might be only partially field if processing stop before the final answer. Reasons for this can be, but are not limited to: empty UCS search results, positive RAI check outcome, grounding failure, …
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.rewriter_model_call_signals: Option<RewriterModelCallSignals>Optional. Diagnostic info related to the rewriter model call.
rewritten_query: StringOptional. Rewritten string query used for search.
search_snippets: Vec<SearchSnippet>Optional. Search snippets included in the answer generation prompt.
answer_generation_model_call_signals: Option<AnswerGenerationModelCallSignals>Optional. Diagnostic info related to the answer generation model call.
answer: StringOptional. The final compiled answer.
answer_parts: Vec<AnswerPart>Optional. Answer parts with relevant citations.
Concatenation of texts should add up the answer (not counting
whitespaces).
cited_snippets: Vec<CitedSnippet>Optional. Snippets cited by the answer generation model from the most to least relevant.
grounding_signals: Option<GroundingSignals>Optional. Grounding signals.
safety_signals: Option<SafetySignals>Optional. Safety check result.
Implementations§
Source§impl DataStoreConnectionSignals
impl DataStoreConnectionSignals
Sourcepub fn set_rewriter_model_call_signals<T>(self, v: T) -> Selfwhere
T: Into<RewriterModelCallSignals>,
pub fn set_rewriter_model_call_signals<T>(self, v: T) -> Selfwhere
T: Into<RewriterModelCallSignals>,
Sets the value of rewriter_model_call_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::RewriterModelCallSignals;
let x = DataStoreConnectionSignals::new().set_rewriter_model_call_signals(RewriterModelCallSignals::default()/* use setters */);Sourcepub fn set_or_clear_rewriter_model_call_signals<T>(self, v: Option<T>) -> Selfwhere
T: Into<RewriterModelCallSignals>,
pub fn set_or_clear_rewriter_model_call_signals<T>(self, v: Option<T>) -> Selfwhere
T: Into<RewriterModelCallSignals>,
Sets or clears the value of rewriter_model_call_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::RewriterModelCallSignals;
let x = DataStoreConnectionSignals::new().set_or_clear_rewriter_model_call_signals(Some(RewriterModelCallSignals::default()/* use setters */));
let x = DataStoreConnectionSignals::new().set_or_clear_rewriter_model_call_signals(None::<RewriterModelCallSignals>);Sourcepub fn set_rewritten_query<T: Into<String>>(self, v: T) -> Self
pub fn set_rewritten_query<T: Into<String>>(self, v: T) -> Self
Sets the value of rewritten_query.
§Example
let x = DataStoreConnectionSignals::new().set_rewritten_query("example");Sourcepub fn set_search_snippets<T, V>(self, v: T) -> Self
pub fn set_search_snippets<T, V>(self, v: T) -> Self
Sets the value of search_snippets.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::SearchSnippet;
let x = DataStoreConnectionSignals::new()
.set_search_snippets([
SearchSnippet::default()/* use setters */,
SearchSnippet::default()/* use (different) setters */,
]);Sourcepub fn set_answer_generation_model_call_signals<T>(self, v: T) -> Selfwhere
T: Into<AnswerGenerationModelCallSignals>,
pub fn set_answer_generation_model_call_signals<T>(self, v: T) -> Selfwhere
T: Into<AnswerGenerationModelCallSignals>,
Sets the value of answer_generation_model_call_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::AnswerGenerationModelCallSignals;
let x = DataStoreConnectionSignals::new().set_answer_generation_model_call_signals(AnswerGenerationModelCallSignals::default()/* use setters */);Sourcepub fn set_or_clear_answer_generation_model_call_signals<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<AnswerGenerationModelCallSignals>,
pub fn set_or_clear_answer_generation_model_call_signals<T>(
self,
v: Option<T>,
) -> Selfwhere
T: Into<AnswerGenerationModelCallSignals>,
Sets or clears the value of answer_generation_model_call_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::AnswerGenerationModelCallSignals;
let x = DataStoreConnectionSignals::new().set_or_clear_answer_generation_model_call_signals(Some(AnswerGenerationModelCallSignals::default()/* use setters */));
let x = DataStoreConnectionSignals::new().set_or_clear_answer_generation_model_call_signals(None::<AnswerGenerationModelCallSignals>);Sourcepub fn set_answer<T: Into<String>>(self, v: T) -> Self
pub fn set_answer<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_answer_parts<T, V>(self, v: T) -> Self
pub fn set_answer_parts<T, V>(self, v: T) -> Self
Sets the value of answer_parts.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::AnswerPart;
let x = DataStoreConnectionSignals::new()
.set_answer_parts([
AnswerPart::default()/* use setters */,
AnswerPart::default()/* use (different) setters */,
]);Sourcepub fn set_cited_snippets<T, V>(self, v: T) -> Self
pub fn set_cited_snippets<T, V>(self, v: T) -> Self
Sets the value of cited_snippets.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::CitedSnippet;
let x = DataStoreConnectionSignals::new()
.set_cited_snippets([
CitedSnippet::default()/* use setters */,
CitedSnippet::default()/* use (different) setters */,
]);Sourcepub fn set_grounding_signals<T>(self, v: T) -> Selfwhere
T: Into<GroundingSignals>,
pub fn set_grounding_signals<T>(self, v: T) -> Selfwhere
T: Into<GroundingSignals>,
Sets the value of grounding_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::GroundingSignals;
let x = DataStoreConnectionSignals::new().set_grounding_signals(GroundingSignals::default()/* use setters */);Sourcepub fn set_or_clear_grounding_signals<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingSignals>,
pub fn set_or_clear_grounding_signals<T>(self, v: Option<T>) -> Selfwhere
T: Into<GroundingSignals>,
Sets or clears the value of grounding_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::GroundingSignals;
let x = DataStoreConnectionSignals::new().set_or_clear_grounding_signals(Some(GroundingSignals::default()/* use setters */));
let x = DataStoreConnectionSignals::new().set_or_clear_grounding_signals(None::<GroundingSignals>);Sourcepub fn set_safety_signals<T>(self, v: T) -> Selfwhere
T: Into<SafetySignals>,
pub fn set_safety_signals<T>(self, v: T) -> Selfwhere
T: Into<SafetySignals>,
Sets the value of safety_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::SafetySignals;
let x = DataStoreConnectionSignals::new().set_safety_signals(SafetySignals::default()/* use setters */);Sourcepub fn set_or_clear_safety_signals<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySignals>,
pub fn set_or_clear_safety_signals<T>(self, v: Option<T>) -> Selfwhere
T: Into<SafetySignals>,
Sets or clears the value of safety_signals.
§Example
use google_cloud_dialogflow_cx_v3::model::data_store_connection_signals::SafetySignals;
let x = DataStoreConnectionSignals::new().set_or_clear_safety_signals(Some(SafetySignals::default()/* use setters */));
let x = DataStoreConnectionSignals::new().set_or_clear_safety_signals(None::<SafetySignals>);Trait Implementations§
Source§impl Clone for DataStoreConnectionSignals
impl Clone for DataStoreConnectionSignals
Source§fn clone(&self) -> DataStoreConnectionSignals
fn clone(&self) -> DataStoreConnectionSignals
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataStoreConnectionSignals
impl Debug for DataStoreConnectionSignals
Source§impl Default for DataStoreConnectionSignals
impl Default for DataStoreConnectionSignals
Source§fn default() -> DataStoreConnectionSignals
fn default() -> DataStoreConnectionSignals
Source§impl Message for DataStoreConnectionSignals
impl Message for DataStoreConnectionSignals
Source§impl PartialEq for DataStoreConnectionSignals
impl PartialEq for DataStoreConnectionSignals
Source§fn eq(&self, other: &DataStoreConnectionSignals) -> bool
fn eq(&self, other: &DataStoreConnectionSignals) -> bool
self and other values to be equal, and is used by ==.