#[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
pub fn new() -> Self
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>);