#[non_exhaustive]pub struct SummarizationContext {
pub summarization_sections: Vec<SummarizationSection>,
pub few_shot_examples: Vec<FewShotExample>,
pub version: String,
pub output_language_code: String,
/* private fields */
}Available on crate features
conversations or generators only.Expand description
Summarization context that customer can configure.
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.summarization_sections: Vec<SummarizationSection>Optional. List of sections. Note it contains both predefined section sand customer defined sections.
few_shot_examples: Vec<FewShotExample>Optional. List of few shot examples.
version: StringOptional. Version of the feature. If not set, default to latest version. Current candidates are [“1.0”].
output_language_code: StringOptional. The target language of the generated summary. The language code for conversation will be used if this field is empty. Supported 2.0 and later versions.
Implementations§
Source§impl SummarizationContext
impl SummarizationContext
pub fn new() -> Self
Sourcepub fn set_summarization_sections<T, V>(self, v: T) -> Self
pub fn set_summarization_sections<T, V>(self, v: T) -> Self
Sets the value of summarization_sections.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::SummarizationSection;
let x = SummarizationContext::new()
.set_summarization_sections([
SummarizationSection::default()/* use setters */,
SummarizationSection::default()/* use (different) setters */,
]);Sourcepub fn set_few_shot_examples<T, V>(self, v: T) -> Self
pub fn set_few_shot_examples<T, V>(self, v: T) -> Self
Sets the value of few_shot_examples.
§Example
ⓘ
use google_cloud_dialogflow_v2::model::FewShotExample;
let x = SummarizationContext::new()
.set_few_shot_examples([
FewShotExample::default()/* use setters */,
FewShotExample::default()/* use (different) setters */,
]);Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_output_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_output_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of output_language_code.
§Example
ⓘ
let x = SummarizationContext::new().set_output_language_code("example");Trait Implementations§
Source§impl Clone for SummarizationContext
impl Clone for SummarizationContext
Source§fn clone(&self) -> SummarizationContext
fn clone(&self) -> SummarizationContext
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 SummarizationContext
impl Debug for SummarizationContext
Source§impl Default for SummarizationContext
impl Default for SummarizationContext
Source§fn default() -> SummarizationContext
fn default() -> SummarizationContext
Returns the “default value” for a type. Read more
Source§impl Message for SummarizationContext
impl Message for SummarizationContext
Source§impl PartialEq for SummarizationContext
impl PartialEq for SummarizationContext
impl StructuralPartialEq for SummarizationContext
Auto Trait Implementations§
impl Freeze for SummarizationContext
impl RefUnwindSafe for SummarizationContext
impl Send for SummarizationContext
impl Sync for SummarizationContext
impl Unpin for SummarizationContext
impl UnwindSafe for SummarizationContext
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