Method: projects.locations.collections.engines.conversations.converse
Stay organized with collections
Save and categorize content based on your preferences.
Converses a conversation.
HTTP request
POST https://discoveryengine.googleapis.com/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
Required. The resource name of the Conversation to get. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStoreId}/conversations/{conversationId} . Use projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStoreId}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a conversations.converse session.
|
Request body
The request body contains data with the following structure:
JSON representation |
{
"query": {
object (TextInput )
},
"servingConfig": string,
"conversation": {
object (Conversation )
},
"safeSearch": boolean,
"userLabels": {
string: string,
...
},
"summarySpec": {
object (SummarySpec )
},
"filter": string,
"boostSpec": {
object (BoostSpec )
}
} |
Fields |
query |
object (TextInput )
Required. Current user input.
|
servingConfig |
string
The resource name of the Serving Config to use. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStoreId}/servingConfigs/{servingConfigId} If this is not set, the default serving config will be used.
|
conversation |
object (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.
|
safeSearch |
boolean
Whether to turn on safe search.
|
userLabels |
map (key: string, value: 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.
|
summarySpec |
object (SummarySpec )
A specification for configuring the summary returned in the response.
|
filter |
string
The 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
|
boostSpec |
object (BoostSpec )
Boost specification to boost certain documents in search results which may affect the converse response. For more information on boosting, see Boosting
|
Response body
If successful, the response body contains an instance of ConverseConversationResponse
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
discoveryengine.conversations.converse
For more information, see the IAM documentation.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-03 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-03 UTC."],[[["This endpoint utilizes a `POST` request to `https://discoveryengine.googleapis.com/v1beta/{name=projects/*/locations/*/collections/*/engines/*/conversations/*}:converse` for conversation interactions, using gRPC Transcoding syntax."],["The `name` parameter in the URL is required and specifies the Conversation resource path, with the option to use auto session mode by providing `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStoreId}/conversations/-`."],["The request body, in JSON format, requires a `query` object representing the user's input and allows for configurations like `servingConfig`, `conversation`, `safeSearch`, `userLabels`, `summarySpec`, `filter`, and `boostSpec`."],["Successful responses will return an instance of `ConverseConversationResponse`."],["Authorization for this endpoint requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope, and the `discoveryengine.conversations.converse` IAM permission on the `name` resource."]]],[]]