Processes a natural language query and returns structured, actionable data as a result. This method is not idempotent, because it may cause contexts and session entity types to be updated, which in turn might affect results of future queries.
If you might use Agent Assist or other CCAI products now or in the future, consider using AnalyzeContent
instead of sessions.detectIntent
. AnalyzeContent
has additional functionality for Agent Assist and other CCAI products.
Note: Always use agent versions for production traffic. See Versions and environments.
HTTP request
POST https://{endpoint}/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent
Where {endpoint}
is one of the supported service endpoints.
The URLs use gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
session |
Required. The name of the session this query is sent to. Supported formats: - If Note: Always use agent versions for production traffic. See Versions and environments. Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ "queryParams": { object ( |
Fields | |
---|---|
query |
The parameters of this query. |
query |
Required. The input specification. It can be set to:
|
output |
Instructs the speech synthesizer how to generate the output audio. If this field is not set and agent-level speech synthesizer is not configured, no output audio is generated. |
output |
Mask for If unspecified or empty, This is a comma-separated list of fully qualified names of fields. Example: |
input |
The natural language speech audio to be processed. This field should be populated iff A base64-encoded string. |
Response body
If successful, the response body contains an instance of DetectIntentResponse
.
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.