#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamAssistRequest
impl Debug for StreamAssistRequest
Source§impl Default for StreamAssistRequest
impl Default for StreamAssistRequest
Source§fn default() -> StreamAssistRequest
fn default() -> StreamAssistRequest
Source§impl Message for StreamAssistRequest
impl Message for StreamAssistRequest
Source§impl PartialEq for StreamAssistRequest
impl PartialEq for StreamAssistRequest
impl StructuralPartialEq for StreamAssistRequest
Auto Trait Implementations§
impl Freeze for StreamAssistRequest
impl RefUnwindSafe for StreamAssistRequest
impl Send for StreamAssistRequest
impl Sync for StreamAssistRequest
impl Unpin for StreamAssistRequest
impl UnsafeUnpin for StreamAssistRequest
impl UnwindSafe for StreamAssistRequest
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