#[non_exhaustive]pub struct ConverseConversationRequest {
pub name: String,
pub query: Option<TextInput>,
pub serving_config: String,
pub conversation: Option<Conversation>,
pub safe_search: bool,
pub user_labels: HashMap<String, String>,
pub summary_spec: Option<SummarySpec>,
pub filter: String,
pub boost_spec: Option<BoostSpec>,
/* private fields */
}conversational-search-service only.Expand description
Request message for ConversationalSearchService.ConverseConversation 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 Conversation to get. Format:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}.
Use
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/conversations/-
to activate auto session mode, which automatically creates a new
conversation inside a ConverseConversation session.
query: Option<TextInput>Required. Current user input.
serving_config: StringThe resource name of the Serving Config to use. Format:
projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}
If this is not set, the default serving config will be used.
conversation: Option<Conversation>The conversation to be used by auto session only. The name field will be ignored as we automatically assign new name for the conversation in auto session.
safe_search: boolWhether to turn on safe search.
user_labels: HashMap<String, String>The user labels applied to a resource must meet the following requirements:
- Each resource can have multiple labels, up to a maximum of 64.
- Each label must be a key-value pair.
- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.
- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.
- The key portion of a label must be unique. However, you can use the same key with multiple resources.
- Keys must start with a lowercase letter or international character.
See Google Cloud Document for more details.
summary_spec: Option<SummarySpec>A specification for configuring the summary returned in the response.
filter: StringThe filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the summary response.
If this field is unrecognizable, an INVALID_ARGUMENT is returned.
Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend – this mapping is defined by the customer in their schema. For example a media customer might have a field ‘name’ in their schema. In this case the filter would look like this: filter –> name:‘ANY(“king kong”)’
For more information about filtering including syntax and filter operators, see Filter
boost_spec: Option<BoostSpec>Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see Boosting
Implementations§
Source§impl ConverseConversationRequest
impl ConverseConversationRequest
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_serving_config<T: Into<String>>(self, v: T) -> Self
pub fn set_serving_config<T: Into<String>>(self, v: T) -> Self
Sets the value of serving_config.
§Example
let x = ConverseConversationRequest::new().set_serving_config(format!("projects/{project_id}/locations/{location_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}"));Sourcepub fn set_conversation<T>(self, v: T) -> Selfwhere
T: Into<Conversation>,
pub fn set_conversation<T>(self, v: T) -> Selfwhere
T: Into<Conversation>,
Sets the value of conversation.
§Example
use google_cloud_discoveryengine_v1::model::Conversation;
let x = ConverseConversationRequest::new().set_conversation(Conversation::default()/* use setters */);Sourcepub fn set_or_clear_conversation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Conversation>,
pub fn set_or_clear_conversation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Conversation>,
Sets or clears the value of conversation.
§Example
use google_cloud_discoveryengine_v1::model::Conversation;
let x = ConverseConversationRequest::new().set_or_clear_conversation(Some(Conversation::default()/* use setters */));
let x = ConverseConversationRequest::new().set_or_clear_conversation(None::<Conversation>);Sourcepub fn set_safe_search<T: Into<bool>>(self, v: T) -> Self
pub fn set_safe_search<T: Into<bool>>(self, v: T) -> Self
Sets the value of safe_search.
§Example
let x = ConverseConversationRequest::new().set_safe_search(true);Sourcepub fn set_user_labels<T, K, V>(self, v: T) -> Self
pub fn set_user_labels<T, K, V>(self, v: T) -> Self
Sets the value of user_labels.
§Example
let x = ConverseConversationRequest::new().set_user_labels([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_summary_spec<T>(self, v: T) -> Selfwhere
T: Into<SummarySpec>,
pub fn set_summary_spec<T>(self, v: T) -> Selfwhere
T: Into<SummarySpec>,
Sets the value of summary_spec.
§Example
use google_cloud_discoveryengine_v1::model::search_request::content_search_spec::SummarySpec;
let x = ConverseConversationRequest::new().set_summary_spec(SummarySpec::default()/* use setters */);Sourcepub fn set_or_clear_summary_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SummarySpec>,
pub fn set_or_clear_summary_spec<T>(self, v: Option<T>) -> Selfwhere
T: Into<SummarySpec>,
Sets or clears the value of summary_spec.
§Example
use google_cloud_discoveryengine_v1::model::search_request::content_search_spec::SummarySpec;
let x = ConverseConversationRequest::new().set_or_clear_summary_spec(Some(SummarySpec::default()/* use setters */));
let x = ConverseConversationRequest::new().set_or_clear_summary_spec(None::<SummarySpec>);Sourcepub fn set_filter<T: Into<String>>(self, v: T) -> Self
pub fn set_filter<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_boost_spec<T>(self, v: T) -> Self
pub fn set_boost_spec<T>(self, v: T) -> Self
Sets the value of boost_spec.
§Example
use google_cloud_discoveryengine_v1::model::search_request::BoostSpec;
let x = ConverseConversationRequest::new().set_boost_spec(BoostSpec::default()/* use setters */);Sourcepub fn set_or_clear_boost_spec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_boost_spec<T>(self, v: Option<T>) -> Self
Sets or clears the value of boost_spec.
§Example
use google_cloud_discoveryengine_v1::model::search_request::BoostSpec;
let x = ConverseConversationRequest::new().set_or_clear_boost_spec(Some(BoostSpec::default()/* use setters */));
let x = ConverseConversationRequest::new().set_or_clear_boost_spec(None::<BoostSpec>);Trait Implementations§
Source§impl Clone for ConverseConversationRequest
impl Clone for ConverseConversationRequest
Source§fn clone(&self) -> ConverseConversationRequest
fn clone(&self) -> ConverseConversationRequest
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 ConverseConversationRequest
impl Debug for ConverseConversationRequest
Source§impl Default for ConverseConversationRequest
impl Default for ConverseConversationRequest
Source§fn default() -> ConverseConversationRequest
fn default() -> ConverseConversationRequest
impl StructuralPartialEq for ConverseConversationRequest
Auto Trait Implementations§
impl Freeze for ConverseConversationRequest
impl RefUnwindSafe for ConverseConversationRequest
impl Send for ConverseConversationRequest
impl Sync for ConverseConversationRequest
impl Unpin for ConverseConversationRequest
impl UnsafeUnpin for ConverseConversationRequest
impl UnwindSafe for ConverseConversationRequest
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