#[non_exhaustive]pub struct Generator {Show 13 fields
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 toolset_tools: Vec<ToolsetTool>,
pub ces_tool_specs: Vec<CesToolSpec>,
pub ces_app_specs: Vec<CesAppSpec>,
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.
toolset_tools: Vec<ToolsetTool>Optional. List of CES toolset specs that the generator can choose from.
ces_tool_specs: Vec<CesToolSpec>Optional. List of CES tool specs that the generator can choose from.
ces_app_specs: Vec<CesAppSpec>Optional. List of CES app specs that the generator can choose from.
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
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_toolset_tools<T, V>(self, v: T) -> Self
pub fn set_toolset_tools<T, V>(self, v: T) -> Self
Sets the value of toolset_tools.
§Example
use google_cloud_dialogflow_v2::model::ToolsetTool;
let x = Generator::new()
.set_toolset_tools([
ToolsetTool::default()/* use setters */,
ToolsetTool::default()/* use (different) setters */,
]);Sourcepub fn set_ces_tool_specs<T, V>(self, v: T) -> Self
pub fn set_ces_tool_specs<T, V>(self, v: T) -> Self
Sets the value of ces_tool_specs.
§Example
use google_cloud_dialogflow_v2::model::CesToolSpec;
let x = Generator::new()
.set_ces_tool_specs([
CesToolSpec::default()/* use setters */,
CesToolSpec::default()/* use (different) setters */,
]);Sourcepub fn set_ces_app_specs<T, V>(self, v: T) -> Self
pub fn set_ces_app_specs<T, V>(self, v: T) -> Self
Sets the value of ces_app_specs.
§Example
use google_cloud_dialogflow_v2::model::CesAppSpec;
let x = Generator::new()
.set_ces_app_specs([
CesAppSpec::default()/* use setters */,
CesAppSpec::default()/* use (different) setters */,
]);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());Trait Implementations§
impl StructuralPartialEq for Generator
Auto Trait Implementations§
impl Freeze for Generator
impl RefUnwindSafe for Generator
impl Send for Generator
impl Sync for Generator
impl Unpin for Generator
impl UnsafeUnpin for Generator
impl UnwindSafe for Generator
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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