#[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
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_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("example");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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more