#[non_exhaustive]pub struct StreamAssistRequest {
pub name: String,
pub query: Option<Query>,
pub session: String,
pub user_metadata: Option<AssistUserMetadata>,
pub tools_spec: Option<ToolsSpec>,
pub generation_spec: Option<GenerationSpec>,
/* private fields */
}assistant-service only.Expand description
Request for the [AssistantService.StreamAssist][google.cloud.discoveryengine.v1.AssistantService.StreamAssist] method.
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: StringRequired. The resource name of the
Assistant. Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}
query: Option<Query>Optional. Current user query.
Empty query is only supported if file_ids are provided. In this case, the
answer will be generated based on those context files.
session: StringOptional. The session to use for the request. If specified, the assistant has access to the session history, and the query and the answer are stored there.
If - is specified as the session ID, or it is left empty, then a new
session is created with an automatically generated ID.
Format:
projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}
user_metadata: Option<AssistUserMetadata>Optional. Information about the user initiating the query.
tools_spec: Option<ToolsSpec>Optional. Specification of tools that are used to serve the request.
generation_spec: Option<GenerationSpec>Optional. Specification of the generation configuration for the request.
Implementations§
Source§impl StreamAssistRequest
impl StreamAssistRequest
pub fn new() -> Self
Sourcepub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_query<T>(self, v: Option<T>) -> Self
Sourcepub fn set_session<T: Into<String>>(self, v: T) -> Self
pub fn set_session<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_user_metadata<T>(self, v: T) -> Selfwhere
T: Into<AssistUserMetadata>,
pub fn set_user_metadata<T>(self, v: T) -> Selfwhere
T: Into<AssistUserMetadata>,
Sets the value of user_metadata.
§Example
use google_cloud_discoveryengine_v1::model::AssistUserMetadata;
let x = StreamAssistRequest::new().set_user_metadata(AssistUserMetadata::default()/* use setters */);Sourcepub fn set_or_clear_user_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<AssistUserMetadata>,
pub fn set_or_clear_user_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<AssistUserMetadata>,
Sets or clears the value of user_metadata.
§Example
use google_cloud_discoveryengine_v1::model::AssistUserMetadata;
let x = StreamAssistRequest::new().set_or_clear_user_metadata(Some(AssistUserMetadata::default()/* use setters */));
let x = StreamAssistRequest::new().set_or_clear_user_metadata(None::<AssistUserMetadata>);Sourcepub fn set_tools_spec<T>(self, v: T) -> Self
pub fn set_tools_spec<T>(self, v: T) -> Self
Sets the value of tools_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::ToolsSpec;
let x = StreamAssistRequest::new().set_tools_spec(ToolsSpec::default()/* use setters */);Sourcepub fn set_or_clear_tools_spec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_tools_spec<T>(self, v: Option<T>) -> Self
Sets or clears the value of tools_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::ToolsSpec;
let x = StreamAssistRequest::new().set_or_clear_tools_spec(Some(ToolsSpec::default()/* use setters */));
let x = StreamAssistRequest::new().set_or_clear_tools_spec(None::<ToolsSpec>);Sourcepub fn set_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<GenerationSpec>,
pub fn set_generation_spec<T>(self, v: T) -> Selfwhere
T: Into<GenerationSpec>,
Sets the value of generation_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::GenerationSpec;
let x = StreamAssistRequest::new().set_generation_spec(GenerationSpec::default()/* use setters */);Sourcepub fn set_or_clear_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenerationSpec>,
pub fn set_or_clear_generation_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<GenerationSpec>,
Sets or clears the value of generation_spec.
§Example
use google_cloud_discoveryengine_v1::model::stream_assist_request::GenerationSpec;
let x = StreamAssistRequest::new().set_or_clear_generation_spec(Some(GenerationSpec::default()/* use setters */));
let x = StreamAssistRequest::new().set_or_clear_generation_spec(None::<GenerationSpec>);Trait Implementations§
Source§impl Clone for StreamAssistRequest
impl Clone for StreamAssistRequest
Source§fn clone(&self) -> StreamAssistRequest
fn clone(&self) -> StreamAssistRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more