Method: locations.widgetConverseConversation

Converse a conversation with Widget.

HTTP request

POST https://discoveryengine.googleapis.com/v1alpha/{location=locations/*}/widgetConverseConversation

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
location

string

Required. The location resource where widget converse conversation will be performed. Format: locations/{location}

Request body

The request body contains data with the following structure:

JSON representation
{
  "configId": string,
  "converseConversationRequest": {
    object (ConverseConversationRequest)
  },
  "conversationId": string,
  "additionalParams": {
    object (AdditionalParams)
  }
}
Fields
configId

string

Required. The UUID of the WidgetConfig. This field is used to identify the widget configuration, set of models used to make the user event collection.

converseConversationRequest

object (ConverseConversationRequest)

Required. The ConverseConversationRequest request to perform converse a conversation. The ServingConfig id will be default_search by default.

conversationId

string

The id of the Conversation to get. Use "-" to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

additionalParams

object (AdditionalParams)

Additional params for security and privacy enhancement.

Response body

Response message for WidgetService.WidgetConverseConversation method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "converseConversationResponse": {
    object (ConverseConversationResponse)
  },
  "uToken": string,
  "conversationId": string
}
Fields
converseConversationResponse

object (ConverseConversationResponse)

ConverseConversationResponse returned from ConversationalSearchService.ConverseConversation.

uToken

string

The token in response.

conversationId

string

The id of the Conversation returned.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

ConverseConversationRequest

Request message for ConversationalSearchService.ConverseConversation method.

JSON representation
{
  "name": string,
  "query": {
    object (TextInput)
  },
  "servingConfig": string,
  "conversation": {
    object (Conversation)
  },
  "safeSearch": boolean,
  "userLabels": {
    string: string,
    ...
  },
  "summarySpec": {
    object (SummarySpec)
  }
}
Fields
name

string

Required. The resource name of the Conversation to get. Format: projects/{projectNumber}/locations/{locationId}/collections/{collection}/dataStores/{dataStoreId}/conversations/{conversationId}. Use projects/{projectNumber}/locations/{locationId}/collections/{collection}/dataStores/{dataStoreId}/conversations/- to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.

query

object (TextInput)

Required. Current user input.

servingConfig

string

The resource name of the Serving Config to use. Format: projects/{projectNumber}/locations/{locationId}/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.

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.