#[non_exhaustive]pub struct ToolsSpec {
pub vertex_ai_search_spec: Option<VertexAiSearchSpec>,
pub web_grounding_spec: Option<WebGroundingSpec>,
pub image_generation_spec: Option<ImageGenerationSpec>,
pub video_generation_spec: Option<VideoGenerationSpec>,
/* private fields */
}assistant-service only.Expand description
Specification of tools that are used to serve the request.
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.vertex_ai_search_spec: Option<VertexAiSearchSpec>Optional. Specification of the Vertex AI Search tool.
web_grounding_spec: Option<WebGroundingSpec>Optional. Specification of the web grounding tool. If field is present, enables grounding with web search. Works only if [Assistant.web_grounding_type][google.cloud.discoveryengine.v1.Assistant.web_grounding_type] is [WEB_GROUNDING_TYPE_GOOGLE_SEARCH][] or [WEB_GROUNDING_TYPE_ENTERPRISE_WEB_SEARCH][].
image_generation_spec: Option<ImageGenerationSpec>Optional. Specification of the image generation tool.
video_generation_spec: Option<VideoGenerationSpec>Optional. Specification of the video generation tool.
Implementations§
Source§impl ToolsSpec
impl ToolsSpec
Sourcepub fn set_vertex_ai_search_spec<T>(self, v: T) -> Selfwhere
T: Into<VertexAiSearchSpec>,
pub fn set_vertex_ai_search_spec<T>(self, v: T) -> Selfwhere
T: Into<VertexAiSearchSpec>,
Sets the value of vertex_ai_search_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::VertexAiSearchSpec;
let x = ToolsSpec::new().set_vertex_ai_search_spec(VertexAiSearchSpec::default()/* use setters */);Sourcepub fn set_or_clear_vertex_ai_search_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<VertexAiSearchSpec>,
pub fn set_or_clear_vertex_ai_search_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<VertexAiSearchSpec>,
Sets or clears the value of vertex_ai_search_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::VertexAiSearchSpec;
let x = ToolsSpec::new().set_or_clear_vertex_ai_search_spec(Some(VertexAiSearchSpec::default()/* use setters */));
let x = ToolsSpec::new().set_or_clear_vertex_ai_search_spec(None::<VertexAiSearchSpec>);Sourcepub fn set_web_grounding_spec<T>(self, v: T) -> Selfwhere
T: Into<WebGroundingSpec>,
pub fn set_web_grounding_spec<T>(self, v: T) -> Selfwhere
T: Into<WebGroundingSpec>,
Sets the value of web_grounding_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::WebGroundingSpec;
let x = ToolsSpec::new().set_web_grounding_spec(WebGroundingSpec::default()/* use setters */);Sourcepub fn set_or_clear_web_grounding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<WebGroundingSpec>,
pub fn set_or_clear_web_grounding_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<WebGroundingSpec>,
Sets or clears the value of web_grounding_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::WebGroundingSpec;
let x = ToolsSpec::new().set_or_clear_web_grounding_spec(Some(WebGroundingSpec::default()/* use setters */));
let x = ToolsSpec::new().set_or_clear_web_grounding_spec(None::<WebGroundingSpec>);Sourcepub fn set_image_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<ImageGenerationSpec>,
pub fn set_image_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<ImageGenerationSpec>,
Sets the value of image_generation_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::ImageGenerationSpec;
let x = ToolsSpec::new().set_image_generation_spec(ImageGenerationSpec::default()/* use setters */);Sourcepub fn set_or_clear_image_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImageGenerationSpec>,
pub fn set_or_clear_image_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<ImageGenerationSpec>,
Sets or clears the value of image_generation_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::ImageGenerationSpec;
let x = ToolsSpec::new().set_or_clear_image_generation_spec(Some(ImageGenerationSpec::default()/* use setters */));
let x = ToolsSpec::new().set_or_clear_image_generation_spec(None::<ImageGenerationSpec>);Sourcepub fn set_video_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<VideoGenerationSpec>,
pub fn set_video_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<VideoGenerationSpec>,
Sets the value of video_generation_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::VideoGenerationSpec;
let x = ToolsSpec::new().set_video_generation_spec(VideoGenerationSpec::default()/* use setters */);Sourcepub fn set_or_clear_video_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<VideoGenerationSpec>,
pub fn set_or_clear_video_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<VideoGenerationSpec>,
Sets or clears the value of video_generation_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::tools_spec::VideoGenerationSpec;
let x = ToolsSpec::new().set_or_clear_video_generation_spec(Some(VideoGenerationSpec::default()/* use setters */));
let x = ToolsSpec::new().set_or_clear_video_generation_spec(None::<VideoGenerationSpec>);Trait Implementations§
impl StructuralPartialEq for ToolsSpec
Auto Trait Implementations§
impl Freeze for ToolsSpec
impl RefUnwindSafe for ToolsSpec
impl Send for ToolsSpec
impl Sync for ToolsSpec
impl Unpin for ToolsSpec
impl UnsafeUnpin for ToolsSpec
impl UnwindSafe for ToolsSpec
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