#[non_exhaustive]pub struct Generator {
pub name: String,
pub description: String,
pub inference_parameter: Option<InferenceParameter>,
pub trigger_event: TriggerEvent,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub tools: Vec<String>,
pub suggestion_deduping_config: Option<SuggestionDedupingConfig>,
pub context: Option<Context>,
pub foundation_model: Option<FoundationModel>,
/* private fields */
}conversations or generator-evaluations or generators only.Expand description
LLM generator.
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.name: StringOutput only. Identifier. The resource name of the generator. Format:
projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>
description: StringOptional. Human readable description of the generator.
inference_parameter: Option<InferenceParameter>Optional. Inference parameters for this generator.
trigger_event: TriggerEventOptional. The trigger event of the generator. It defines when the generator is triggered in a conversation.
create_time: Option<Timestamp>Output only. Creation time of this generator.
update_time: Option<Timestamp>Output only. Update time of this generator.
tools: Vec<String>Optional. Resource names of the tools that the generator can choose from.
Format: projects/<Project ID>/locations/<Location ID>/tools/<tool ID>.
suggestion_deduping_config: Option<SuggestionDedupingConfig>Optional. Configuration for suggestion deduping. This is only applicable to AI Coach feature.
context: Option<Context>Required. Input context of the generator.
foundation_model: Option<FoundationModel>The foundation model to use for generating suggestions. If a foundation model isn’t specified here, a model specifically tuned for the feature type (and version when applicable) will be used.
Implementations§
Source§impl Generator
impl Generator
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_inference_parameter<T>(self, v: T) -> Selfwhere
T: Into<InferenceParameter>,
pub fn set_inference_parameter<T>(self, v: T) -> Selfwhere
T: Into<InferenceParameter>,
Sets the value of inference_parameter.
§Example
use google_cloud_dialogflow_v2::model::InferenceParameter;
let x = Generator::new().set_inference_parameter(InferenceParameter::default()/* use setters */);Sourcepub fn set_or_clear_inference_parameter<T>(self, v: Option<T>) -> Selfwhere
T: Into<InferenceParameter>,
pub fn set_or_clear_inference_parameter<T>(self, v: Option<T>) -> Selfwhere
T: Into<InferenceParameter>,
Sets or clears the value of inference_parameter.
§Example
use google_cloud_dialogflow_v2::model::InferenceParameter;
let x = Generator::new().set_or_clear_inference_parameter(Some(InferenceParameter::default()/* use setters */));
let x = Generator::new().set_or_clear_inference_parameter(None::<InferenceParameter>);Sourcepub fn set_trigger_event<T: Into<TriggerEvent>>(self, v: T) -> Self
pub fn set_trigger_event<T: Into<TriggerEvent>>(self, v: T) -> Self
Sets the value of trigger_event.
§Example
use google_cloud_dialogflow_v2::model::TriggerEvent;
let x0 = Generator::new().set_trigger_event(TriggerEvent::EndOfUtterance);
let x1 = Generator::new().set_trigger_event(TriggerEvent::ManualCall);
let x2 = Generator::new().set_trigger_event(TriggerEvent::CustomerMessage);Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
use wkt::Timestamp;
let x = Generator::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
use wkt::Timestamp;
let x = Generator::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Generator::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Generator::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Generator::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Generator::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_suggestion_deduping_config<T>(self, v: T) -> Selfwhere
T: Into<SuggestionDedupingConfig>,
pub fn set_suggestion_deduping_config<T>(self, v: T) -> Selfwhere
T: Into<SuggestionDedupingConfig>,
Sets the value of suggestion_deduping_config.
§Example
use google_cloud_dialogflow_v2::model::SuggestionDedupingConfig;
let x = Generator::new().set_suggestion_deduping_config(SuggestionDedupingConfig::default()/* use setters */);Sourcepub fn set_or_clear_suggestion_deduping_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SuggestionDedupingConfig>,
pub fn set_or_clear_suggestion_deduping_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SuggestionDedupingConfig>,
Sets or clears the value of suggestion_deduping_config.
§Example
use google_cloud_dialogflow_v2::model::SuggestionDedupingConfig;
let x = Generator::new().set_or_clear_suggestion_deduping_config(Some(SuggestionDedupingConfig::default()/* use setters */));
let x = Generator::new().set_or_clear_suggestion_deduping_config(None::<SuggestionDedupingConfig>);Sourcepub fn set_context<T: Into<Option<Context>>>(self, v: T) -> Self
pub fn set_context<T: Into<Option<Context>>>(self, v: T) -> Self
Sets the value of context.
Note that all the setters affecting context are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::FreeFormContext;
let x = Generator::new().set_context(Some(
google_cloud_dialogflow_v2::model::generator::Context::FreeFormContext(FreeFormContext::default().into())));Sourcepub fn free_form_context(&self) -> Option<&Box<FreeFormContext>>
pub fn free_form_context(&self) -> Option<&Box<FreeFormContext>>
The value of context
if it holds a FreeFormContext, None if the field is not set or
holds a different branch.
Sourcepub fn set_free_form_context<T: Into<Box<FreeFormContext>>>(self, v: T) -> Self
pub fn set_free_form_context<T: Into<Box<FreeFormContext>>>(self, v: T) -> Self
Sets the value of context
to hold a FreeFormContext.
Note that all the setters affecting context are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::FreeFormContext;
let x = Generator::new().set_free_form_context(FreeFormContext::default()/* use setters */);
assert!(x.free_form_context().is_some());
assert!(x.agent_coaching_context().is_none());
assert!(x.summarization_context().is_none());Sourcepub fn agent_coaching_context(&self) -> Option<&Box<AgentCoachingContext>>
pub fn agent_coaching_context(&self) -> Option<&Box<AgentCoachingContext>>
The value of context
if it holds a AgentCoachingContext, None if the field is not set or
holds a different branch.
Sourcepub fn set_agent_coaching_context<T: Into<Box<AgentCoachingContext>>>(
self,
v: T,
) -> Self
pub fn set_agent_coaching_context<T: Into<Box<AgentCoachingContext>>>( self, v: T, ) -> Self
Sets the value of context
to hold a AgentCoachingContext.
Note that all the setters affecting context are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::AgentCoachingContext;
let x = Generator::new().set_agent_coaching_context(AgentCoachingContext::default()/* use setters */);
assert!(x.agent_coaching_context().is_some());
assert!(x.free_form_context().is_none());
assert!(x.summarization_context().is_none());Sourcepub fn summarization_context(&self) -> Option<&Box<SummarizationContext>>
pub fn summarization_context(&self) -> Option<&Box<SummarizationContext>>
The value of context
if it holds a SummarizationContext, None if the field is not set or
holds a different branch.
Sourcepub fn set_summarization_context<T: Into<Box<SummarizationContext>>>(
self,
v: T,
) -> Self
pub fn set_summarization_context<T: Into<Box<SummarizationContext>>>( self, v: T, ) -> Self
Sets the value of context
to hold a SummarizationContext.
Note that all the setters affecting context are
mutually exclusive.
§Example
use google_cloud_dialogflow_v2::model::SummarizationContext;
let x = Generator::new().set_summarization_context(SummarizationContext::default()/* use setters */);
assert!(x.summarization_context().is_some());
assert!(x.free_form_context().is_none());
assert!(x.agent_coaching_context().is_none());Sourcepub fn set_foundation_model<T: Into<Option<FoundationModel>>>(
self,
v: T,
) -> Self
pub fn set_foundation_model<T: Into<Option<FoundationModel>>>( self, v: T, ) -> Self
Sets the value of foundation_model.
Note that all the setters affecting foundation_model are mutually
exclusive.
§Example
use google_cloud_dialogflow_v2::model::generator::FoundationModel;
let x = Generator::new().set_foundation_model(Some(FoundationModel::PublishedModel("example".to_string())));Sourcepub fn published_model(&self) -> Option<&String>
pub fn published_model(&self) -> Option<&String>
The value of foundation_model
if it holds a PublishedModel, None if the field is not set or
holds a different branch.
Sourcepub fn set_published_model<T: Into<String>>(self, v: T) -> Self
pub fn set_published_model<T: Into<String>>(self, v: T) -> Self
Sets the value of foundation_model
to hold a PublishedModel.
Note that all the setters affecting foundation_model are
mutually exclusive.
§Example
let x = Generator::new().set_published_model("example");
assert!(x.published_model().is_some());