Method: projects.suggestions.searchKnowledge

Get answers for the given query based on knowledge documents.

HTTP request

POST https://{endpoint}/v2beta1/{parent=projects/*}/suggestions:searchKnowledge

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The parent resource contains the conversation profile Format: 'projects/' or projects/<Project ID>/locations/<Location ID>.

Request body

The request body contains data with the following structure:

JSON representation
{
  "query": {
    object (TextInput)
  },
  "conversationProfile": string,
  "sessionId": string,
  "conversation": string,
  "latestMessage": string
}
Fields
query

object (TextInput)

Required. The natural language text query for knowledge search.

conversationProfile

string

Required. The conversation profile used to configure the search. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

sessionId

string

The ID of the search session. The sessionId can be combined with Dialogflow V3 Agent ID retrieved from conversation profile or on its own to identify a search session. The search history of the same session will impact the search result. It's up to the API caller to choose an appropriate Session ID. It can be a random number or some type of session identifiers (preferably hashed). The length must not exceed 36 characters.

conversation

string

The conversation (between human agent and end user) where the search request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>.

latestMessage

string

The name of the latest conversation message when the request is triggered. Format: projects/<Project ID>/locations/<Location ID>/conversations/<Conversation ID>/messages/<Message ID>.

Response body

If successful, the response body contains an instance of SearchKnowledgeResponse.

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.