mirror of
https://github.com/googleapis/googleapis.git
synced 2026-08-20 13:27:47 +02:00
Synchronize new proto/yaml changes.
PiperOrigin-RevId: 241074422
This commit is contained in:
parent
71f37c50f9
commit
15970e050e
9 changed files with 650 additions and 376 deletions
|
|
@ -12,26 +12,28 @@ apis:
|
|||
- name: google.cloud.dialogflow.v2.Sessions
|
||||
|
||||
types:
|
||||
- name: google.cloud.dialogflow.v2.ExportAgentResponse
|
||||
- name: google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse
|
||||
- name: google.cloud.dialogflow.v2.BatchUpdateIntentsResponse
|
||||
- name: google.cloud.dialogflow.v2.ExportAgentResponse
|
||||
- name: google.cloud.dialogflow.v2.OriginalDetectIntentRequest
|
||||
- name: google.cloud.dialogflow.v2.WebhookRequest
|
||||
- name: google.cloud.dialogflow.v2.WebhookResponse
|
||||
|
||||
documentation:
|
||||
summary: |-
|
||||
An end-to-end development suite for conversational interfaces (e.g.,
|
||||
chatbots, voice-powered apps and devices).
|
||||
Builds conversational interfaces (for example, chatbots, and voice-powered
|
||||
apps and devices).
|
||||
overview: |-
|
||||
[Dialogflow](http://dialogflow.com/) is a natural language understanding
|
||||
platform that makes it easy for you to design and integrate a conversational
|
||||
user interface into your mobile app, web application, device, bot, and so
|
||||
on. Using Dialogflow you can provide users new and engaging ways to interact
|
||||
with your product using both voice recognition and text input.
|
||||
[Dialogflow](http://dialogflow.com/) is a natural language
|
||||
understanding platform that makes it easy for you to design and integrate
|
||||
a conversational user interface into your mobile app, web application,
|
||||
device, bot, and so on. Using Dialogflow you can provide users new and
|
||||
engaging ways to interact with your product using both voice recognition
|
||||
and text input.
|
||||
|
||||
For information on how Dialogflow agents, intents, entities, and so on work,
|
||||
see the [Dialogflow getting started
|
||||
For information on how Dialogflow agents, intents, entities, and so on
|
||||
work, see the [Dialogflow getting
|
||||
started
|
||||
guide](https://dialogflow.com/docs/getting-started/basics) in the
|
||||
dialogflow.com documentation.
|
||||
|
||||
|
|
@ -47,26 +49,28 @@ documentation:
|
|||
incorporate the Dialogflow into your product. After you have created a
|
||||
Google Cloud project and a Dialogflow agent, you can use the API to create
|
||||
intents, entities, and so on, and then pass user input to your Dialogflow
|
||||
agent to determine user intent using the
|
||||
[detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent)
|
||||
REST API, or the
|
||||
[StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest)
|
||||
gRPC API.
|
||||
agent to determine user intent using
|
||||
the
|
||||
[detectIntent](https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2beta1/projects.agent.sessions/detectIntent) REST
|
||||
API, or the
|
||||
[StreamingDetectIntentRequest](https://cloud.google.com/dialogflow-enterprise/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest) gRPC
|
||||
API.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* For information on setting up a Google Cloud Platform project and
|
||||
creating an agent using the Dialogflow Enterprise Edition, see
|
||||
[Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart).
|
||||
|
||||
* For information on creating an agent using the Dialogflow Standard
|
||||
Edition, see [Building Your First
|
||||
creating an agent using the Dialogflow Enterprise Edition, see
|
||||
[Quickstart](https://cloud.google.com/dialogflow-enterprise/docs/quickstart). *
|
||||
For information on creating an agent using the Dialogflow Standard
|
||||
Edition, see [Building Your First
|
||||
Agent](https://dialogflow.com/docs/getting-started/building-your-first-agent)
|
||||
|
||||
backend:
|
||||
rules:
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
deadline: 60.0
|
||||
- selector: google.longrunning.Operations.WaitOperation
|
||||
deadline: 60.0
|
||||
- selector: google.cloud.dialogflow.v2.Agents.GetAgent
|
||||
deadline: 60.0
|
||||
- selector: google.cloud.dialogflow.v2.Agents.SearchAgents
|
||||
|
|
@ -140,17 +144,50 @@ backend:
|
|||
- selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent
|
||||
deadline: 230.0
|
||||
|
||||
http:
|
||||
rules:
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
get: '/v2beta1/{name=projects/*/operations/*}'
|
||||
additional_bindings:
|
||||
- get: '/v2/{name=projects/*/operations/*}'
|
||||
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: '*'
|
||||
- selector: 'google.cloud.dialogflow.v2.Agents.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: 'google.cloud.dialogflow.v2.Contexts.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: 'google.cloud.dialogflow.v2.EntityTypes.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: 'google.cloud.dialogflow.v2.Intents.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: 'google.cloud.dialogflow.v2.SessionEntityTypes.*'
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: google.cloud.dialogflow.v2.Sessions.DetectIntent
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
- selector: google.longrunning.Operations.WaitOperation
|
||||
oauth:
|
||||
canonical_scopes: |-
|
||||
https://www.googleapis.com/auth/cloud-platform,
|
||||
https://www.googleapis.com/auth/dialogflow
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,12 +11,14 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/longrunning/operations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
|
@ -35,30 +37,29 @@ option objc_class_prefix = "DF";
|
|||
// in your app, product, or service to determine user intent and respond to the
|
||||
// user in a natural way.
|
||||
//
|
||||
// After you create an agent, you can add
|
||||
// [Intents][google.cloud.dialogflow.v2.Intents],
|
||||
// [Contexts][google.cloud.dialogflow.v2.Contexts], [Entity
|
||||
// Types][google.cloud.dialogflow.v2.EntityTypes],
|
||||
// [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to manage
|
||||
// the flow of a conversation and match user input to predefined intents and
|
||||
// actions.
|
||||
// After you create an agent, you can add [Intents][google.cloud.dialogflow.v2.Intents], [Contexts][google.cloud.dialogflow.v2.Contexts],
|
||||
// [Entity Types][google.cloud.dialogflow.v2.EntityTypes], [Webhooks][google.cloud.dialogflow.v2.WebhookRequest], and so on to
|
||||
// manage the flow of a conversation and match user input to predefined intents
|
||||
// and actions.
|
||||
//
|
||||
// You can create an agent using both Dialogflow Standard Edition and
|
||||
// Dialogflow Enterprise Edition. For details, see
|
||||
// [Dialogflow Editions](/dialogflow-enterprise/docs/editions).
|
||||
// [Dialogflow
|
||||
// Editions](https://cloud.google.com/dialogflow-enterprise/docs/editions).
|
||||
//
|
||||
// You can save your agent for backup or versioning by exporting the agent by
|
||||
// using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent]
|
||||
// method. You can import a saved agent by using the
|
||||
// [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
|
||||
// using the [ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent] method. You can import a saved
|
||||
// agent by using the [ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent] method.
|
||||
//
|
||||
// Dialogflow provides several
|
||||
// [prebuilt agents](https://dialogflow.com/docs/prebuilt-agents) for common
|
||||
// conversation scenarios such as determining a date and time, converting
|
||||
// currency, and so on.
|
||||
// [prebuilt
|
||||
// agents](https://cloud.google.com/dialogflow-enterprise/docs/agents-prebuilt)
|
||||
// for common conversation scenarios such as determining a date and time,
|
||||
// converting currency, and so on.
|
||||
//
|
||||
// For more information about agents, see the
|
||||
// [Dialogflow documentation](https://dialogflow.com/docs/agents).
|
||||
// [Dialogflow
|
||||
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/agents-overview).
|
||||
service Agents {
|
||||
// Retrieves the specified agent.
|
||||
rpc GetAgent(GetAgentRequest) returns (Agent) {
|
||||
|
|
@ -82,8 +83,7 @@ service Agents {
|
|||
|
||||
// Trains the specified agent.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc TrainAgent(TrainAgentRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*}/agent:train"
|
||||
|
|
@ -93,9 +93,7 @@ service Agents {
|
|||
|
||||
// Exports the specified agent to a ZIP file.
|
||||
//
|
||||
// Operation <response:
|
||||
// [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
// Operation <response: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]>
|
||||
rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*}/agent:export"
|
||||
|
|
@ -109,8 +107,7 @@ service Agents {
|
|||
// Intents and entity types with the same name are replaced with the new
|
||||
// versions from ImportAgentRequest.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc ImportAgent(ImportAgentRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*}/agent:import"
|
||||
|
|
@ -123,8 +120,7 @@ service Agents {
|
|||
// Replaces the current agent version with a new one. All the intents and
|
||||
// entity types in the older version are deleted.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc RestoreAgent(RestoreAgentRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*}/agent:restore"
|
||||
|
|
@ -157,9 +153,10 @@ message Agent {
|
|||
string display_name = 2;
|
||||
|
||||
// Required. The default language of the agent as a language tag. See
|
||||
// [Language Support](https://dialogflow.com/docs/reference/language) for a
|
||||
// list of the currently supported language codes.
|
||||
// This field cannot be set by the `Update` method.
|
||||
// [Language
|
||||
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// for a list of the currently supported language codes. This field cannot be
|
||||
// set by the `Update` method.
|
||||
string default_language_code = 3;
|
||||
|
||||
// Optional. The list of all languages supported by this agent (except for the
|
||||
|
|
@ -177,7 +174,9 @@ message Agent {
|
|||
|
||||
// Optional. The URI of the agent's avatar.
|
||||
// Avatars are used throughout the Dialogflow console and in the self-hosted
|
||||
// [Web Demo](https://dialogflow.com/docs/integrations/web-demo) integration.
|
||||
// [Web
|
||||
// Demo](https://cloud.google.com/dialogflow-enterprise/docs/integrations/web-demo)
|
||||
// integration.
|
||||
string avatar_uri = 7;
|
||||
|
||||
// Optional. Determines whether this agent should log conversation queries.
|
||||
|
|
@ -189,23 +188,21 @@ message Agent {
|
|||
// Optional. To filter out false positive results and still get variety in
|
||||
// matched natural language inputs for your agent, you can tune the machine
|
||||
// learning classification threshold. If the returned score value is less than
|
||||
// the threshold value, then a fallback intent is be triggered or, if there
|
||||
// the threshold value, then a fallback intent will be triggered or, if there
|
||||
// are no fallback intents defined, no intent will be triggered. The score
|
||||
// values range from 0.0 (completely uncertain) to 1.0 (completely certain).
|
||||
// If set to 0.0, the default of 0.3 is used.
|
||||
float classification_threshold = 10;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
|
||||
// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
|
||||
message GetAgentRequest {
|
||||
// Required. The project that the agent to fetch is associated with.
|
||||
// Format: `projects/<Project ID>`.
|
||||
string parent = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
|
||||
// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
|
||||
message SearchAgentsRequest {
|
||||
// Required. The project to list agents from.
|
||||
// Format: `projects/<Project ID or '-'>`.
|
||||
|
|
@ -219,8 +216,7 @@ message SearchAgentsRequest {
|
|||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
|
||||
// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
|
||||
message SearchAgentsResponse {
|
||||
// The list of agents. There will be a maximum number of items returned based
|
||||
// on the page_size field in the request.
|
||||
|
|
@ -231,29 +227,28 @@ message SearchAgentsResponse {
|
|||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
|
||||
// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
|
||||
message TrainAgentRequest {
|
||||
// Required. The project that the agent to train is associated with.
|
||||
// Format: `projects/<Project ID>`.
|
||||
string parent = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
|
||||
// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
|
||||
message ExportAgentRequest {
|
||||
// Required. The project that the agent to export is associated with.
|
||||
// Format: `projects/<Project ID>`.
|
||||
string parent = 1;
|
||||
|
||||
// Optional. The Google Cloud Storage URI to export the agent to.
|
||||
// Note: The URI must start with
|
||||
// "gs://". If left unspecified, the serialized agent is returned inline.
|
||||
// Optional. The
|
||||
// [Google Cloud Storage](https://cloud.google.com/storage/docs/)
|
||||
// URI to export the agent to.
|
||||
// The format of this URI must be `gs://<bucket-name>/<object-name>`.
|
||||
// If left unspecified, the serialized agent is returned inline.
|
||||
string agent_uri = 2;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
|
||||
// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
|
||||
message ExportAgentResponse {
|
||||
// Required. The exported agent.
|
||||
oneof agent {
|
||||
|
|
@ -264,23 +259,22 @@ message ExportAgentResponse {
|
|||
// The exported agent.
|
||||
//
|
||||
// Example for how to export an agent to a zip file via a command line:
|
||||
//
|
||||
// curl \
|
||||
// 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
|
||||
// <pre>curl \
|
||||
// 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:export'\
|
||||
// -X POST \
|
||||
// -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
|
||||
// -H 'Authorization: Bearer '$(gcloud auth application-default
|
||||
// print-access-token) \
|
||||
// -H 'Accept: application/json' \
|
||||
// -H 'Content-Type: application/json' \
|
||||
// --compressed \
|
||||
// --data-binary '{}' \
|
||||
// | grep agentContent | sed -e 's/.*"agentContent": "\([^"]*\)".*/\1/' \
|
||||
// | base64 --decode > <agent zip file>
|
||||
// | base64 --decode > <agent zip file></pre>
|
||||
bytes agent_content = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
|
||||
// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
|
||||
message ImportAgentRequest {
|
||||
// Required. The project that the agent to import is associated with.
|
||||
// Format: `projects/<Project ID>`.
|
||||
|
|
@ -295,23 +289,22 @@ message ImportAgentRequest {
|
|||
// The agent to import.
|
||||
//
|
||||
// Example for how to import an agent via the command line:
|
||||
//
|
||||
// curl \
|
||||
// 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
|
||||
// <pre>curl \
|
||||
// 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:import\
|
||||
// -X POST \
|
||||
// -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
|
||||
// -H 'Authorization: Bearer '$(gcloud auth application-default
|
||||
// print-access-token) \
|
||||
// -H 'Accept: application/json' \
|
||||
// -H 'Content-Type: application/json' \
|
||||
// --compressed \
|
||||
// --data-binary "{
|
||||
// 'agentContent': '$(cat <agent zip file> | base64 -w 0)'
|
||||
// }"
|
||||
// 'agentContent': '$(cat <agent zip file> | base64 -w 0)'
|
||||
// }"</pre>
|
||||
bytes agent_content = 3;
|
||||
}
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
|
||||
// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
|
||||
message RestoreAgentRequest {
|
||||
// Required. The project that the agent to restore is associated with.
|
||||
// Format: `projects/<Project ID>`.
|
||||
|
|
@ -326,17 +319,17 @@ message RestoreAgentRequest {
|
|||
// The agent to restore.
|
||||
//
|
||||
// Example for how to restore an agent via the command line:
|
||||
//
|
||||
// curl \
|
||||
// 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
|
||||
// <pre>curl \
|
||||
// 'https://dialogflow.googleapis.com/v2/projects/<project_name>/agent:restore\
|
||||
// -X POST \
|
||||
// -H 'Authorization: Bearer '$(gcloud auth print-access-token) \
|
||||
// -H 'Authorization: Bearer '$(gcloud auth application-default
|
||||
// print-access-token) \
|
||||
// -H 'Accept: application/json' \
|
||||
// -H 'Content-Type: application/json' \
|
||||
// --compressed \
|
||||
// --data-binary "{
|
||||
// 'agentContent': '$(cat <agent zip file> | base64 -w 0)'
|
||||
// }" \
|
||||
// 'agentContent': '$(cat <agent zip file> | base64 -w 0)'
|
||||
// }"</pre>
|
||||
bytes agent_content = 3;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
126
google/cloud/dialogflow/v2/audio_config.proto
Normal file
126
google/cloud/dialogflow/v2/audio_config.proto
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
|
||||
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "AudioConfigProto";
|
||||
option java_package = "com.google.cloud.dialogflow.v2";
|
||||
option objc_class_prefix = "DF";
|
||||
|
||||
// Gender of the voice as described in
|
||||
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
|
||||
enum SsmlVoiceGender {
|
||||
// An unspecified gender, which means that the client doesn't care which
|
||||
// gender the selected voice will have.
|
||||
SSML_VOICE_GENDER_UNSPECIFIED = 0;
|
||||
|
||||
// A male voice.
|
||||
SSML_VOICE_GENDER_MALE = 1;
|
||||
|
||||
// A female voice.
|
||||
SSML_VOICE_GENDER_FEMALE = 2;
|
||||
|
||||
// A gender-neutral voice.
|
||||
SSML_VOICE_GENDER_NEUTRAL = 3;
|
||||
}
|
||||
|
||||
// Description of which voice to use for speech synthesis.
|
||||
message VoiceSelectionParams {
|
||||
// Optional. The name of the voice. If not set, the service will choose a
|
||||
// voice based on the other parameters such as language_code and gender.
|
||||
string name = 1;
|
||||
|
||||
// Optional. The preferred gender of the voice. If not set, the service will
|
||||
// choose a voice based on the other parameters such as language_code and
|
||||
// name. Note that this is only a preference, not requirement. If a
|
||||
// voice of the appropriate gender is not available, the synthesizer should
|
||||
// substitute a voice with a different gender rather than failing the request.
|
||||
SsmlVoiceGender ssml_gender = 2;
|
||||
}
|
||||
|
||||
// Configuration of how speech should be synthesized.
|
||||
message SynthesizeSpeechConfig {
|
||||
// Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
|
||||
// native speed supported by the specific voice. 2.0 is twice as fast, and
|
||||
// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
|
||||
// other values < 0.25 or > 4.0 will return an error.
|
||||
double speaking_rate = 1;
|
||||
|
||||
// Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
|
||||
// semitones from the original pitch. -20 means decrease 20 semitones from the
|
||||
// original pitch.
|
||||
double pitch = 2;
|
||||
|
||||
// Optional. Volume gain (in dB) of the normal native volume supported by the
|
||||
// specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
|
||||
// 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
|
||||
// will play at approximately half the amplitude of the normal native signal
|
||||
// amplitude. A value of +6.0 (dB) will play at approximately twice the
|
||||
// amplitude of the normal native signal amplitude. We strongly recommend not
|
||||
// to exceed +10 (dB) as there's usually no effective increase in loudness for
|
||||
// any value greater than that.
|
||||
double volume_gain_db = 3;
|
||||
|
||||
// Optional. An identifier which selects 'audio effects' profiles that are
|
||||
// applied on (post synthesized) text to speech. Effects are applied on top of
|
||||
// each other in the order they are given.
|
||||
repeated string effects_profile_id = 5;
|
||||
|
||||
// Optional. The desired voice of the synthesized audio.
|
||||
VoiceSelectionParams voice = 4;
|
||||
}
|
||||
|
||||
// Audio encoding of the output audio format in Text-To-Speech.
|
||||
enum OutputAudioEncoding {
|
||||
// Not specified.
|
||||
OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0;
|
||||
|
||||
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
|
||||
// Audio content returned as LINEAR16 also contains a WAV header.
|
||||
OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1;
|
||||
|
||||
// MP3 audio.
|
||||
OUTPUT_AUDIO_ENCODING_MP3 = 2;
|
||||
|
||||
// Opus encoded audio wrapped in an ogg container. The result will be a
|
||||
// file which can be played natively on Android, and in browsers (at least
|
||||
// Chrome and Firefox). The quality of the encoding is considerably higher
|
||||
// than MP3 while using approximately the same bitrate.
|
||||
OUTPUT_AUDIO_ENCODING_OGG_OPUS = 3;
|
||||
}
|
||||
|
||||
// Instructs the speech synthesizer how to generate the output audio content.
|
||||
message OutputAudioConfig {
|
||||
// Required. Audio encoding of the synthesized audio content.
|
||||
OutputAudioEncoding audio_encoding = 1;
|
||||
|
||||
// Optional. The synthesis sample rate (in hertz) for this audio. If not
|
||||
// provided, then the synthesizer will use the default sample rate based on
|
||||
// the audio encoding. If this is different from the voice's natural sample
|
||||
// rate, then the synthesizer will honor this request by converting to the
|
||||
// desired sample rate (which might result in worse audio quality).
|
||||
int32 sample_rate_hertz = 2;
|
||||
|
||||
// Optional. Configuration of how speech should be synthesized.
|
||||
SynthesizeSpeechConfig synthesize_speech_config = 3;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,12 +11,14 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
|
|
@ -38,14 +40,15 @@ option objc_class_prefix = "DF";
|
|||
//
|
||||
// You can include contexts as input parameters of a
|
||||
// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
|
||||
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent])
|
||||
// request, or as output contexts included in the returned intent. Contexts
|
||||
// expire when an intent is matched, after the number of `DetectIntent` requests
|
||||
// specified by the `lifespan_count` parameter, or after 10 minutes if no
|
||||
// intents are matched for a `DetectIntent` request.
|
||||
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) request,
|
||||
// or as output contexts included in the returned intent.
|
||||
// Contexts expire when an intent is matched, after the number of `DetectIntent`
|
||||
// requests specified by the `lifespan_count` parameter, or after 20 minutes
|
||||
// if no intents are matched for a `DetectIntent` request.
|
||||
//
|
||||
// For more information about contexts, see the
|
||||
// [Dialogflow documentation](https://dialogflow.com/docs/contexts).
|
||||
// [Dialogflow
|
||||
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/contexts-overview).
|
||||
service Contexts {
|
||||
// Returns the list of all contexts in the specified session.
|
||||
rpc ListContexts(ListContextsRequest) returns (ListContextsResponse) {
|
||||
|
|
@ -62,6 +65,8 @@ service Contexts {
|
|||
}
|
||||
|
||||
// Creates a context.
|
||||
//
|
||||
// If the specified context already exists, overrides the context.
|
||||
rpc CreateContext(CreateContextRequest) returns (Context) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent/sessions/*}/contexts"
|
||||
|
|
@ -85,8 +90,7 @@ service Contexts {
|
|||
}
|
||||
|
||||
// Deletes all active contexts in the specified session.
|
||||
rpc DeleteAllContexts(DeleteAllContextsRequest)
|
||||
returns (google.protobuf.Empty) {
|
||||
rpc DeleteAllContexts(DeleteAllContextsRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v2/{parent=projects/*/agent/sessions/*}/contexts"
|
||||
};
|
||||
|
|
@ -97,22 +101,25 @@ service Contexts {
|
|||
message Context {
|
||||
// Required. The unique identifier of the context. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
|
||||
//
|
||||
// The `Context ID` is always converted to lowercase, may only contain
|
||||
// characters in [a-zA-Z0-9_-%] and may be at most 250 bytes long.
|
||||
string name = 1;
|
||||
|
||||
// Optional. The number of conversational query requests after which the
|
||||
// context expires. If set to `0` (the default) the context expires
|
||||
// immediately. Contexts expire automatically after 10 minutes even if there
|
||||
// immediately. Contexts expire automatically after 20 minutes if there
|
||||
// are no matching queries.
|
||||
int32 lifespan_count = 2;
|
||||
|
||||
// Optional. The collection of parameters associated with this context.
|
||||
// Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for
|
||||
// syntax.
|
||||
// Refer to [this
|
||||
// doc](https://cloud.google.com/dialogflow-enterprise/docs/intents-actions-parameters)
|
||||
// for syntax.
|
||||
google.protobuf.Struct parameters = 3;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
|
||||
// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
|
||||
message ListContextsRequest {
|
||||
// Required. The session to list all contexts from.
|
||||
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
|
||||
|
|
@ -126,8 +133,7 @@ message ListContextsRequest {
|
|||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
|
||||
// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
|
||||
message ListContextsResponse {
|
||||
// The list of contexts. There will be a maximum number of items
|
||||
// returned based on the page_size field in the request.
|
||||
|
|
@ -138,16 +144,14 @@ message ListContextsResponse {
|
|||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
|
||||
// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
|
||||
message GetContextRequest {
|
||||
// Required. The name of the context. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext].
|
||||
// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext].
|
||||
message CreateContextRequest {
|
||||
// Required. The session to create a context for.
|
||||
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
|
||||
|
|
@ -157,8 +161,7 @@ message CreateContextRequest {
|
|||
Context context = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext].
|
||||
// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext].
|
||||
message UpdateContextRequest {
|
||||
// Required. The context to update.
|
||||
Context context = 1;
|
||||
|
|
@ -167,16 +170,14 @@ message UpdateContextRequest {
|
|||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext].
|
||||
// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext].
|
||||
message DeleteContextRequest {
|
||||
// Required. The name of the context to delete. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts].
|
||||
// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts].
|
||||
message DeleteAllContextsRequest {
|
||||
// Required. The name of the session to delete all contexts from. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,12 +11,14 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/longrunning/operations.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
|
@ -53,15 +55,14 @@ option objc_class_prefix = "DF";
|
|||
//
|
||||
// * **User** - entities that are built for an individual user such as
|
||||
// favorites, preferences, playlists, and so on. A user entity is
|
||||
// represented by the
|
||||
// [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
|
||||
// represented by the [SessionEntityType][google.cloud.dialogflow.v2.SessionEntityType] type.
|
||||
//
|
||||
// For more information about entity types, see the
|
||||
// [Dialogflow documentation](https://dialogflow.com/docs/entities).
|
||||
// [Dialogflow
|
||||
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
|
||||
service EntityTypes {
|
||||
// Returns the list of all entity types in the specified agent.
|
||||
rpc ListEntityTypes(ListEntityTypesRequest)
|
||||
returns (ListEntityTypesResponse) {
|
||||
rpc ListEntityTypes(ListEntityTypesRequest) returns (ListEntityTypesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v2/{parent=projects/*/agent}/entityTypes"
|
||||
};
|
||||
|
|
@ -91,8 +92,7 @@ service EntityTypes {
|
|||
}
|
||||
|
||||
// Deletes the specified entity type.
|
||||
rpc DeleteEntityType(DeleteEntityTypeRequest)
|
||||
returns (google.protobuf.Empty) {
|
||||
rpc DeleteEntityType(DeleteEntityTypeRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v2/{name=projects/*/agent/entityTypes/*}"
|
||||
};
|
||||
|
|
@ -100,11 +100,8 @@ service EntityTypes {
|
|||
|
||||
// Updates/Creates multiple entity types in the specified agent.
|
||||
//
|
||||
// Operation <response:
|
||||
// [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
// Operation <response: [BatchUpdateEntityTypesResponse][google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse]>
|
||||
rpc BatchUpdateEntityTypes(BatchUpdateEntityTypesRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent}/entityTypes:batchUpdate"
|
||||
body: "*"
|
||||
|
|
@ -113,35 +110,30 @@ service EntityTypes {
|
|||
|
||||
// Deletes entity types in the specified agent.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc BatchDeleteEntityTypes(BatchDeleteEntityTypesRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent}/entityTypes:batchDelete"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Creates multiple new entities in the specified entity type (extends the
|
||||
// existing collection of entries).
|
||||
// Creates multiple new entities in the specified entity type.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc BatchCreateEntities(BatchCreateEntitiesRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
rpc BatchCreateEntities(BatchCreateEntitiesRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchCreate"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
// Updates entities in the specified entity type (replaces the existing
|
||||
// collection of entries).
|
||||
// Updates or creates multiple entities in the specified entity type. This
|
||||
// method does not affect entities in the entity type that aren't explicitly
|
||||
// specified in the request.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
rpc BatchUpdateEntities(BatchUpdateEntitiesRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc BatchUpdateEntities(BatchUpdateEntitiesRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchUpdate"
|
||||
body: "*"
|
||||
|
|
@ -150,10 +142,8 @@ service EntityTypes {
|
|||
|
||||
// Deletes entities in the specified entity type.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
|
||||
// metadata: [google.protobuf.Struct][google.protobuf.Struct]>
|
||||
rpc BatchDeleteEntities(BatchDeleteEntitiesRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc BatchDeleteEntities(BatchDeleteEntitiesRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent/entityTypes/*}/entities:batchDelete"
|
||||
body: "*"
|
||||
|
|
@ -165,18 +155,29 @@ service EntityTypes {
|
|||
// Entity types serve as a tool for extracting parameter values from natural
|
||||
// language queries.
|
||||
message EntityType {
|
||||
// Optional. Represents an entity.
|
||||
// An **entity entry** for an associated entity type.
|
||||
message Entity {
|
||||
// Required.
|
||||
// Required. The primary value associated with this entity entry.
|
||||
// For example, if the entity type is *vegetable*, the value could be
|
||||
// *scallions*.
|
||||
//
|
||||
// For `KIND_MAP` entity types:
|
||||
// A canonical name to be used in place of synonyms.
|
||||
//
|
||||
// * A canonical value to be used in place of synonyms.
|
||||
//
|
||||
// For `KIND_LIST` entity types:
|
||||
// A string that can contain references to other entity types (with or
|
||||
// without aliases).
|
||||
//
|
||||
// * A string that can contain references to other entity types (with or
|
||||
// without aliases).
|
||||
string value = 1;
|
||||
|
||||
// Required. A collection of synonyms. For `KIND_LIST` entity types this
|
||||
// must contain exactly one synonym equal to `value`.
|
||||
// Required. A collection of value synonyms. For example, if the entity type
|
||||
// is *vegetable*, and `value` is *scallions*, a synonym could be *green
|
||||
// onions*.
|
||||
//
|
||||
// For `KIND_LIST` entity types:
|
||||
//
|
||||
// * This collection must contain exactly one synonym equal to `value`.
|
||||
repeated string synonyms = 2;
|
||||
}
|
||||
|
||||
|
|
@ -207,13 +208,13 @@ message EntityType {
|
|||
AUTO_EXPANSION_MODE_DEFAULT = 1;
|
||||
}
|
||||
|
||||
// Required for all methods except `create` (`create` populates the name
|
||||
// automatically.
|
||||
// The unique identifier of the entity type. Format:
|
||||
// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
|
||||
// The unique identifier of the entity type.
|
||||
// Required for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType] and
|
||||
// [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes] methods.
|
||||
// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
|
||||
string name = 1;
|
||||
|
||||
// Required. The name of the entity.
|
||||
// Required. The name of the entity type.
|
||||
string display_name = 2;
|
||||
|
||||
// Required. Indicates the kind of entity type.
|
||||
|
|
@ -223,12 +224,11 @@ message EntityType {
|
|||
// expanded.
|
||||
AutoExpansionMode auto_expansion_mode = 4;
|
||||
|
||||
// Optional. The collection of entities associated with the entity type.
|
||||
// Optional. The collection of entity entries associated with the entity type.
|
||||
repeated Entity entities = 6;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
|
||||
// The request message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
|
||||
message ListEntityTypesRequest {
|
||||
// Required. The agent to list all entity types from.
|
||||
// Format: `projects/<Project ID>/agent`.
|
||||
|
|
@ -236,9 +236,10 @@ message ListEntityTypesRequest {
|
|||
|
||||
// Optional. The language to list entity synonyms for. If not specified,
|
||||
// the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 2;
|
||||
|
||||
// Optional. The maximum number of items to return in a single page. By
|
||||
|
|
@ -249,8 +250,7 @@ message ListEntityTypesRequest {
|
|||
string page_token = 4;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
|
||||
// The response message for [EntityTypes.ListEntityTypes][google.cloud.dialogflow.v2.EntityTypes.ListEntityTypes].
|
||||
message ListEntityTypesResponse {
|
||||
// The list of agent entity types. There will be a maximum number of items
|
||||
// returned based on the page_size field in the request.
|
||||
|
|
@ -261,8 +261,7 @@ message ListEntityTypesResponse {
|
|||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType].
|
||||
// The request message for [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType].
|
||||
message GetEntityTypeRequest {
|
||||
// Required. The name of the entity type.
|
||||
// Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
|
||||
|
|
@ -270,14 +269,14 @@ message GetEntityTypeRequest {
|
|||
|
||||
// Optional. The language to retrieve entity synonyms for. If not specified,
|
||||
// the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType].
|
||||
// The request message for [EntityTypes.CreateEntityType][google.cloud.dialogflow.v2.EntityTypes.CreateEntityType].
|
||||
message CreateEntityTypeRequest {
|
||||
// Required. The agent to create a entity type for.
|
||||
// Format: `projects/<Project ID>/agent`.
|
||||
|
|
@ -288,40 +287,38 @@ message CreateEntityTypeRequest {
|
|||
|
||||
// Optional. The language of entity synonyms defined in `entity_type`. If not
|
||||
// specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 3;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType].
|
||||
// The request message for [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType].
|
||||
message UpdateEntityTypeRequest {
|
||||
// Required. The entity type to update.
|
||||
// Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
|
||||
EntityType entity_type = 1;
|
||||
|
||||
// Optional. The language of entity synonyms defined in `entity_type`. If not
|
||||
// specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 2;
|
||||
|
||||
// Optional. The mask to control which fields get updated.
|
||||
google.protobuf.FieldMask update_mask = 3;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType].
|
||||
// The request message for [EntityTypes.DeleteEntityType][google.cloud.dialogflow.v2.EntityTypes.DeleteEntityType].
|
||||
message DeleteEntityTypeRequest {
|
||||
// Required. The name of the entity type to delete.
|
||||
// Format: `projects/<Project ID>/agent/entityTypes/<EntityType ID>`.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
|
||||
// The request message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
|
||||
message BatchUpdateEntityTypesRequest {
|
||||
// Required. The name of the agent to update or create entity types in.
|
||||
// Format: `projects/<Project ID>/agent`.
|
||||
|
|
@ -330,8 +327,9 @@ message BatchUpdateEntityTypesRequest {
|
|||
// Required. The source of the entity type batch.
|
||||
//
|
||||
// For each entity type in the batch:
|
||||
// * If `name` is specified, we update an existing entity type.
|
||||
// * If `name` is not specified, we create a new entity type.
|
||||
//
|
||||
// * If `name` is specified, we update an existing entity type.
|
||||
// * If `name` is not specified, we create a new entity type.
|
||||
oneof entity_type_batch {
|
||||
// The URI to a Google Cloud Storage file containing entity types to update
|
||||
// or create. The file format can either be a serialized proto (of
|
||||
|
|
@ -339,30 +337,29 @@ message BatchUpdateEntityTypesRequest {
|
|||
// "gs://".
|
||||
string entity_type_batch_uri = 2;
|
||||
|
||||
// The collection of entity type to update or create.
|
||||
// The collection of entity types to update or create.
|
||||
EntityTypeBatch entity_type_batch_inline = 3;
|
||||
}
|
||||
|
||||
// Optional. The language of entity synonyms defined in `entity_types`. If not
|
||||
// specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 4;
|
||||
|
||||
// Optional. The mask to control which fields get updated.
|
||||
google.protobuf.FieldMask update_mask = 5;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
|
||||
// The response message for [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes].
|
||||
message BatchUpdateEntityTypesResponse {
|
||||
// The collection of updated or created entity types.
|
||||
repeated EntityType entity_types = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes].
|
||||
// The request message for [EntityTypes.BatchDeleteEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntityTypes].
|
||||
message BatchDeleteEntityTypesRequest {
|
||||
// Required. The name of the agent to delete all entities types for. Format:
|
||||
// `projects/<Project ID>/agent`.
|
||||
|
|
@ -373,47 +370,46 @@ message BatchDeleteEntityTypesRequest {
|
|||
repeated string entity_type_names = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities].
|
||||
// The request message for [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities].
|
||||
message BatchCreateEntitiesRequest {
|
||||
// Required. The name of the entity type to create entities in. Format:
|
||||
// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
|
||||
string parent = 1;
|
||||
|
||||
// Required. The collection of entities to create.
|
||||
// Required. The entities to create.
|
||||
repeated EntityType.Entity entities = 2;
|
||||
|
||||
// Optional. The language of entity synonyms defined in `entities`. If not
|
||||
// specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 3;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [EntityTypes.BatchCreateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchCreateEntities].
|
||||
// The request message for [EntityTypes.BatchUpdateEntities][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntities].
|
||||
message BatchUpdateEntitiesRequest {
|
||||
// Required. The name of the entity type to update the entities in. Format:
|
||||
// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
|
||||
// Required. The name of the entity type to update or create entities in.
|
||||
// Format: `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
|
||||
string parent = 1;
|
||||
|
||||
// Required. The collection of new entities to replace the existing entities.
|
||||
// Required. The entities to update or create.
|
||||
repeated EntityType.Entity entities = 2;
|
||||
|
||||
// Optional. The language of entity synonyms defined in `entities`. If not
|
||||
// specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 3;
|
||||
|
||||
// Optional. The mask to control which fields get updated.
|
||||
google.protobuf.FieldMask update_mask = 4;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities].
|
||||
// The request message for [EntityTypes.BatchDeleteEntities][google.cloud.dialogflow.v2.EntityTypes.BatchDeleteEntities].
|
||||
message BatchDeleteEntitiesRequest {
|
||||
// Required. The name of the entity type to delete entries for. Format:
|
||||
// `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`.
|
||||
|
|
@ -426,9 +422,10 @@ message BatchDeleteEntitiesRequest {
|
|||
|
||||
// Optional. The language of entity synonyms defined in `entities`. If not
|
||||
// specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 3;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,14 +11,17 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/cloud/dialogflow/v2/context.proto";
|
||||
import "google/longrunning/operations.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
|
|
@ -34,10 +37,10 @@ option objc_class_prefix = "DF";
|
|||
// An intent represents a mapping between input from a user and an action to
|
||||
// be taken by your application. When you pass user input to the
|
||||
// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
|
||||
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent])
|
||||
// method, the Dialogflow API analyzes the input and searches for a matching
|
||||
// intent. If no match is found, the Dialogflow API returns a fallback intent
|
||||
// (`is_fallback` = true).
|
||||
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method, the
|
||||
// Dialogflow API analyzes the input and searches
|
||||
// for a matching intent. If no match is found, the Dialogflow API returns a
|
||||
// fallback intent (`is_fallback` = true).
|
||||
//
|
||||
// You can provide additional information for the Dialogflow API to use to
|
||||
// match user input to an intent by adding the following to your intent.
|
||||
|
|
@ -45,7 +48,7 @@ option objc_class_prefix = "DF";
|
|||
// * **Contexts** - provide additional context for intent analysis. For
|
||||
// example, if an intent is related to an object in your application that
|
||||
// plays music, you can provide a context to determine when to match the
|
||||
// intent if the user input is “turn it off”. You can include a context
|
||||
// intent if the user input is "turn it off". You can include a context
|
||||
// that matches the intent when there is previous user input of
|
||||
// "play music", and not when there is previous user input of
|
||||
// "turn on the light".
|
||||
|
|
@ -61,7 +64,8 @@ option objc_class_prefix = "DF";
|
|||
// Dialogflow API agent to better match intents.
|
||||
//
|
||||
// For more information about intents, see the
|
||||
// [Dialogflow documentation](https://dialogflow.com/docs/intents).
|
||||
// [Dialogflow
|
||||
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/intents-overview).
|
||||
service Intents {
|
||||
// Returns the list of all intents in the specified agent.
|
||||
rpc ListIntents(ListIntentsRequest) returns (ListIntentsResponse) {
|
||||
|
|
@ -93,7 +97,7 @@ service Intents {
|
|||
};
|
||||
}
|
||||
|
||||
// Deletes the specified intent.
|
||||
// Deletes the specified intent and its direct or indirect followup intents.
|
||||
rpc DeleteIntent(DeleteIntentRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v2/{name=projects/*/agent/intents/*}"
|
||||
|
|
@ -102,10 +106,8 @@ service Intents {
|
|||
|
||||
// Updates/Creates multiple intents in the specified agent.
|
||||
//
|
||||
// Operation <response:
|
||||
// [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]>
|
||||
rpc BatchUpdateIntents(BatchUpdateIntentsRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
// Operation <response: [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]>
|
||||
rpc BatchUpdateIntents(BatchUpdateIntentsRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent}/intents:batchUpdate"
|
||||
body: "*"
|
||||
|
|
@ -115,8 +117,7 @@ service Intents {
|
|||
// Deletes intents in the specified agent.
|
||||
//
|
||||
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty]>
|
||||
rpc BatchDeleteIntents(BatchDeleteIntentsRequest)
|
||||
returns (google.longrunning.Operation) {
|
||||
rpc BatchDeleteIntents(BatchDeleteIntentsRequest) returns (google.longrunning.Operation) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent}/intents:batchDelete"
|
||||
body: "*"
|
||||
|
|
@ -128,26 +129,26 @@ service Intents {
|
|||
// Intents convert a number of user expressions or patterns into an action. An
|
||||
// action is an extraction of a user command or sentence semantics.
|
||||
message Intent {
|
||||
// Represents an example or template that the agent is trained on.
|
||||
// Represents an example that the agent is trained on.
|
||||
message TrainingPhrase {
|
||||
// Represents a part of a training phrase.
|
||||
message Part {
|
||||
// Required. The text corresponding to the example or template,
|
||||
// if there are no annotations. For
|
||||
// annotated examples, it is the text for one of the example's parts.
|
||||
// Required. The text for this part.
|
||||
string text = 1;
|
||||
|
||||
// Optional. The entity type name prefixed with `@`. This field is
|
||||
// required for the annotated part of the text and applies only to
|
||||
// examples.
|
||||
// Optional. The entity type name prefixed with `@`.
|
||||
// This field is required for annotated parts of the training phrase.
|
||||
string entity_type = 2;
|
||||
|
||||
// Optional. The parameter name for the value extracted from the
|
||||
// annotated part of the example.
|
||||
// This field is required for annotated parts of the training phrase.
|
||||
string alias = 3;
|
||||
|
||||
// Optional. Indicates whether the text was manually annotated by the
|
||||
// developer.
|
||||
// Optional. Indicates whether the text was manually annotated.
|
||||
// This field is set to true when the Dialogflow Console is used to
|
||||
// manually annotate the part. When creating an annotated part with the
|
||||
// API, you must set this to true.
|
||||
bool user_defined = 4;
|
||||
}
|
||||
|
||||
|
|
@ -162,21 +163,41 @@ message Intent {
|
|||
|
||||
// Templates are not annotated with entity types, but they can contain
|
||||
// @-prefixed entity type names as substrings.
|
||||
TEMPLATE = 2;
|
||||
// Template mode has been deprecated. Example mode is the only supported
|
||||
// way to create new training phrases. If you have existing training
|
||||
// phrases that you've created in template mode, those will continue to
|
||||
// work.
|
||||
TEMPLATE = 2 [deprecated = true];
|
||||
}
|
||||
|
||||
// Required. The unique identifier of this training phrase.
|
||||
// Output only. The unique identifier of this training phrase.
|
||||
string name = 1;
|
||||
|
||||
// Required. The type of the training phrase.
|
||||
Type type = 2;
|
||||
|
||||
// Required. The collection of training phrase parts (can be annotated).
|
||||
// Fields: `entity_type`, `alias` and `user_defined` should be populated
|
||||
// only for the annotated parts of the training phrase.
|
||||
// Required. The ordered list of training phrase parts.
|
||||
// The parts are concatenated in order to form the training phrase.
|
||||
//
|
||||
// Note: The API does not automatically annotate training phrases like the
|
||||
// Dialogflow Console does.
|
||||
//
|
||||
// Note: Do not forget to include whitespace at part boundaries,
|
||||
// so the training phrase is well formatted when the parts are concatenated.
|
||||
//
|
||||
// If the training phrase does not need to be annotated with parameters,
|
||||
// you just need a single part with only the [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text] field set.
|
||||
//
|
||||
// If you want to annotate the training phrase, you must create multiple
|
||||
// parts, where the fields of each part are populated in one of two ways:
|
||||
//
|
||||
// - `Part.text` is set to a part of the phrase that has no parameters.
|
||||
// - `Part.text` is set to a part of the phrase that you want to annotate,
|
||||
// and the `entity_type`, `alias`, and `user_defined` fields are all
|
||||
// set.
|
||||
repeated Part parts = 3;
|
||||
|
||||
// Optional. Indicates how many times this example or template was added to
|
||||
// Optional. Indicates how many times this example was added to
|
||||
// the intent. Each time a developer adds an existing sample by editing an
|
||||
// intent or training, this counter is increased.
|
||||
int32 times_added_count = 4;
|
||||
|
|
@ -550,7 +571,7 @@ message Intent {
|
|||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
string followup_intent_name = 1;
|
||||
|
||||
// The unique identifier of the followup intent parent.
|
||||
// The unique identifier of the followup intent's parent.
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
string parent_followup_intent_name = 2;
|
||||
}
|
||||
|
|
@ -568,20 +589,23 @@ message Intent {
|
|||
WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
|
||||
}
|
||||
|
||||
// Required for all methods except `create` (`create` populates the name
|
||||
// automatically.
|
||||
// The unique identifier of this intent.
|
||||
// Required for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent] and [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents]
|
||||
// methods.
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
string name = 1;
|
||||
|
||||
// Required. The name of this intent.
|
||||
string display_name = 2;
|
||||
|
||||
// Required. Indicates whether webhooks are enabled for the intent.
|
||||
// Optional. Indicates whether webhooks are enabled for the intent.
|
||||
WebhookState webhook_state = 6;
|
||||
|
||||
// Optional. The priority of this intent. Higher numbers represent higher
|
||||
// priorities. Zero or negative numbers mean that the intent is disabled.
|
||||
// priorities. If this is zero or unspecified, we use the default
|
||||
// priority 500000.
|
||||
//
|
||||
// Negative numbers mean that the intent is disabled.
|
||||
int32 priority = 3;
|
||||
|
||||
// Optional. Indicates whether this is a fallback intent.
|
||||
|
|
@ -603,11 +627,12 @@ message Intent {
|
|||
// be present in the active user session for an event to trigger this intent.
|
||||
repeated string events = 8;
|
||||
|
||||
// Optional. The collection of examples/templates that the agent is
|
||||
// Optional. The collection of examples that the agent is
|
||||
// trained on.
|
||||
repeated TrainingPhrase training_phrases = 9;
|
||||
|
||||
// Optional. The name of the action associated with the intent.
|
||||
// Note: The action name must not contain whitespaces.
|
||||
string action = 10;
|
||||
|
||||
// Optional. The collection of contexts that are activated when the intent
|
||||
|
|
@ -632,24 +657,28 @@ message Intent {
|
|||
// taken from among the messages assigned to the DEFAULT_PLATFORM.
|
||||
repeated Message.Platform default_response_platforms = 15;
|
||||
|
||||
// The unique identifier of the root intent in the chain of followup intents.
|
||||
// It identifies the correct followup intents chain for this intent.
|
||||
// Read-only. The unique identifier of the root intent in the chain of
|
||||
// followup intents. It identifies the correct followup intents chain for
|
||||
// this intent. We populate this field only in the output.
|
||||
//
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
string root_followup_intent_name = 16;
|
||||
|
||||
// The unique identifier of the parent intent in the chain of followup
|
||||
// intents.
|
||||
// Read-only after creation. The unique identifier of the parent intent in the
|
||||
// chain of followup intents. You can set this field when creating an intent,
|
||||
// for example with [CreateIntent][] or [BatchUpdateIntents][], in order to
|
||||
// make this intent a followup intent.
|
||||
//
|
||||
// It identifies the parent followup intent.
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
string parent_followup_intent_name = 17;
|
||||
|
||||
// Optional. Collection of information about all followup intents that have
|
||||
// name of this intent as a root_name.
|
||||
// Read-only. Information about all followup intents that have this intent as
|
||||
// a direct or indirect parent. We populate this field only in the output.
|
||||
repeated FollowupIntentInfo followup_intent_info = 18;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
|
||||
// The request message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
|
||||
message ListIntentsRequest {
|
||||
// Required. The agent to list all intents from.
|
||||
// Format: `projects/<Project ID>/agent`.
|
||||
|
|
@ -657,9 +686,10 @@ message ListIntentsRequest {
|
|||
|
||||
// Optional. The language to list training phrases, parameters and rich
|
||||
// messages for. If not specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 2;
|
||||
|
||||
// Optional. The resource view to apply to the returned intent.
|
||||
|
|
@ -673,8 +703,7 @@ message ListIntentsRequest {
|
|||
string page_token = 5;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
|
||||
// The response message for [Intents.ListIntents][google.cloud.dialogflow.v2.Intents.ListIntents].
|
||||
message ListIntentsResponse {
|
||||
// The list of agent intents. There will be a maximum number of items
|
||||
// returned based on the page_size field in the request.
|
||||
|
|
@ -685,8 +714,7 @@ message ListIntentsResponse {
|
|||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent].
|
||||
// The request message for [Intents.GetIntent][google.cloud.dialogflow.v2.Intents.GetIntent].
|
||||
message GetIntentRequest {
|
||||
// Required. The name of the intent.
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
|
|
@ -694,17 +722,17 @@ message GetIntentRequest {
|
|||
|
||||
// Optional. The language to retrieve training phrases, parameters and rich
|
||||
// messages for. If not specified, the agent's default language is used.
|
||||
// [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 2;
|
||||
|
||||
// Optional. The resource view to apply to the returned intent.
|
||||
IntentView intent_view = 3;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent].
|
||||
// The request message for [Intents.CreateIntent][google.cloud.dialogflow.v2.Intents.CreateIntent].
|
||||
message CreateIntentRequest {
|
||||
// Required. The agent to create a intent for.
|
||||
// Format: `projects/<Project ID>/agent`.
|
||||
|
|
@ -715,27 +743,27 @@ message CreateIntentRequest {
|
|||
|
||||
// Optional. The language of training phrases, parameters and rich messages
|
||||
// defined in `intent`. If not specified, the agent's default language is
|
||||
// used. [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// used. [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 3;
|
||||
|
||||
// Optional. The resource view to apply to the returned intent.
|
||||
IntentView intent_view = 4;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent].
|
||||
// The request message for [Intents.UpdateIntent][google.cloud.dialogflow.v2.Intents.UpdateIntent].
|
||||
message UpdateIntentRequest {
|
||||
// Required. The intent to update.
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
Intent intent = 1;
|
||||
|
||||
// Optional. The language of training phrases, parameters and rich messages
|
||||
// defined in `intent`. If not specified, the agent's default language is
|
||||
// used. [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// used. [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 2;
|
||||
|
||||
// Optional. The mask to control which fields get updated.
|
||||
|
|
@ -745,16 +773,15 @@ message UpdateIntentRequest {
|
|||
IntentView intent_view = 4;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent].
|
||||
// The request message for [Intents.DeleteIntent][google.cloud.dialogflow.v2.Intents.DeleteIntent].
|
||||
message DeleteIntentRequest {
|
||||
// Required. The name of the intent to delete.
|
||||
// Required. The name of the intent to delete. If this intent has direct or
|
||||
// indirect followup intents, we also delete them.
|
||||
// Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
|
||||
// The request message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
|
||||
message BatchUpdateIntentsRequest {
|
||||
// Required. The name of the agent to update or create intents in.
|
||||
// Format: `projects/<Project ID>/agent`.
|
||||
|
|
@ -773,9 +800,10 @@ message BatchUpdateIntentsRequest {
|
|||
|
||||
// Optional. The language of training phrases, parameters and rich messages
|
||||
// defined in `intents`. If not specified, the agent's default language is
|
||||
// used. [More than a dozen
|
||||
// languages](https://dialogflow.com/docs/reference/language) are supported.
|
||||
// Note: languages must be enabled in the agent, before they can be used.
|
||||
// used. [Many
|
||||
// languages](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// are supported. Note: languages must be enabled in the agent before they can
|
||||
// be used.
|
||||
string language_code = 4;
|
||||
|
||||
// Optional. The mask to control which fields get updated.
|
||||
|
|
@ -785,15 +813,13 @@ message BatchUpdateIntentsRequest {
|
|||
IntentView intent_view = 6;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
|
||||
// The response message for [Intents.BatchUpdateIntents][google.cloud.dialogflow.v2.Intents.BatchUpdateIntents].
|
||||
message BatchUpdateIntentsResponse {
|
||||
// The collection of updated or created intents.
|
||||
repeated Intent intents = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents].
|
||||
// The request message for [Intents.BatchDeleteIntents][google.cloud.dialogflow.v2.Intents.BatchDeleteIntents].
|
||||
message BatchDeleteIntentsRequest {
|
||||
// Required. The name of the agent to delete all entities types for. Format:
|
||||
// `projects/<Project ID>/agent`.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,12 +11,15 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/cloud/dialogflow/v2/audio_config.proto";
|
||||
import "google/cloud/dialogflow/v2/context.proto";
|
||||
import "google/cloud/dialogflow/v2/intent.proto";
|
||||
import "google/cloud/dialogflow/v2/session_entity_type.proto";
|
||||
|
|
@ -33,10 +36,9 @@ option java_package = "com.google.cloud.dialogflow.v2";
|
|||
option objc_class_prefix = "DF";
|
||||
|
||||
// A session represents an interaction with a user. You retrieve user input
|
||||
// and pass it to the
|
||||
// [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
|
||||
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent])
|
||||
// method to determine user intent and respond.
|
||||
// and pass it to the [DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] (or
|
||||
// [StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]) method to determine
|
||||
// user intent and respond.
|
||||
service Sessions {
|
||||
// Processes a natural language query and returns structured, actionable data
|
||||
// as a result. This method is not idempotent, because it may cause contexts
|
||||
|
|
@ -52,8 +54,8 @@ service Sessions {
|
|||
// Processes a natural language query in audio format in a streaming fashion
|
||||
// and returns structured, actionable data as a result. This method is only
|
||||
// available via the gRPC API (not REST).
|
||||
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest)
|
||||
returns (stream StreamingDetectIntentResponse);
|
||||
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
// The request to detect user's intent.
|
||||
|
|
@ -78,6 +80,11 @@ message DetectIntentRequest {
|
|||
// 3. an event that specifies which intent to trigger.
|
||||
QueryInput query_input = 3;
|
||||
|
||||
// Optional. 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.
|
||||
OutputAudioConfig output_audio_config = 4;
|
||||
|
||||
// Optional. The natural language speech audio to be processed. This field
|
||||
// should be populated iff `query_input` is set to an input audio config.
|
||||
// A single request can contain up to 1 minute of speech audio data.
|
||||
|
|
@ -90,12 +97,23 @@ message DetectIntentResponse {
|
|||
// locate a response in the training example set or for reporting issues.
|
||||
string response_id = 1;
|
||||
|
||||
// The results of the conversational query or event processing.
|
||||
// The selected results of the conversational query or event processing.
|
||||
// See `alternative_query_results` for additional potential results.
|
||||
QueryResult query_result = 2;
|
||||
|
||||
// Specifies the status of the webhook request. `webhook_status`
|
||||
// is never populated in webhook requests.
|
||||
// Specifies the status of the webhook request.
|
||||
google.rpc.Status webhook_status = 3;
|
||||
|
||||
// The audio data bytes encoded as specified in the request.
|
||||
// Note: The output audio is generated based on the values of default platform
|
||||
// text responses found in the `query_result.fulfillment_messages` field. If
|
||||
// multiple default text responses exist, they will be concatenated when
|
||||
// generating audio. If no default platform text responses exist, the
|
||||
// generated audio content will be empty.
|
||||
bytes output_audio = 4;
|
||||
|
||||
// The config used by the speech synthesizer to generate the output audio.
|
||||
OutputAudioConfig output_audio_config = 6;
|
||||
}
|
||||
|
||||
// Represents the parameters of the conversational query.
|
||||
|
|
@ -117,14 +135,18 @@ message QueryParameters {
|
|||
// before the new ones are activated.
|
||||
bool reset_contexts = 4;
|
||||
|
||||
// Optional. The collection of session entity types to replace or extend
|
||||
// developer entities with for this query only. The entity synonyms apply
|
||||
// to all languages.
|
||||
// Optional. Additional session entity types to replace or extend developer
|
||||
// entity types with. The entity synonyms apply to all languages and persist
|
||||
// for the session of this query.
|
||||
repeated SessionEntityType session_entity_types = 5;
|
||||
|
||||
// Optional. This field can be used to pass custom data into the webhook
|
||||
// associated with the agent. Arbitrary JSON objects are supported.
|
||||
google.protobuf.Struct payload = 6;
|
||||
|
||||
// Optional. Configures the type of sentiment analysis to perform. If not
|
||||
// provided, sentiment analysis is not performed.
|
||||
SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10;
|
||||
}
|
||||
|
||||
// Represents the query input. It can contain either:
|
||||
|
|
@ -161,7 +183,8 @@ message QueryResult {
|
|||
string query_text = 1;
|
||||
|
||||
// The language that was triggered during intent detection.
|
||||
// See [Language Support](https://dialogflow.com/docs/reference/language)
|
||||
// See [Language
|
||||
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// for a list of the currently supported language codes.
|
||||
string language_code = 15;
|
||||
|
||||
|
|
@ -170,10 +193,10 @@ message QueryResult {
|
|||
// correct. The default of 0.0 is a sentinel value indicating that confidence
|
||||
// was not set.
|
||||
//
|
||||
// You should not rely on this field as it isn't guaranteed to be accurate, or
|
||||
// even set. In particular this field isn't set in Webhook calls and for
|
||||
// StreamingDetectIntent since the streaming endpoint has separate confidence
|
||||
// estimates per portion of the audio in StreamingRecognitionResult.
|
||||
// This field is not guaranteed to be accurate or set. In particular this
|
||||
// field isn't set for StreamingDetectIntent since the streaming endpoint has
|
||||
// separate confidence estimates per portion of the audio in
|
||||
// StreamingRecognitionResult.
|
||||
float speech_recognition_confidence = 2;
|
||||
|
||||
// The action name from the matched intent.
|
||||
|
|
@ -190,6 +213,7 @@ message QueryResult {
|
|||
bool all_required_params_present = 5;
|
||||
|
||||
// The text to be pronounced to the user or shown on the screen.
|
||||
// Note: This is a legacy field, `fulfillment_messages` should be preferred.
|
||||
string fulfillment_text = 6;
|
||||
|
||||
// The collection of rich messages to present to the user.
|
||||
|
|
@ -216,11 +240,18 @@ message QueryResult {
|
|||
|
||||
// The intent detection confidence. Values range from 0.0
|
||||
// (completely uncertain) to 1.0 (completely certain).
|
||||
// If there are `multiple knowledge_answers` messages, this value is set to
|
||||
// the greatest `knowledgeAnswers.match_confidence` value in the list.
|
||||
float intent_detection_confidence = 12;
|
||||
|
||||
// The free-form diagnostic info. For example, this field
|
||||
// could contain webhook call latency.
|
||||
// The free-form diagnostic info. For example, this field could contain
|
||||
// webhook call latency. The string keys of the Struct's fields map can change
|
||||
// without notice.
|
||||
google.protobuf.Struct diagnostic_info = 14;
|
||||
|
||||
// The sentiment analysis result, which depends on the
|
||||
// `sentiment_analysis_request_config` specified in the request.
|
||||
SentimentAnalysisResult sentiment_analysis_result = 17;
|
||||
}
|
||||
|
||||
// The top-level message sent by the client to the
|
||||
|
|
@ -229,8 +260,7 @@ message QueryResult {
|
|||
// Multiple request messages should be sent in order:
|
||||
//
|
||||
// 1. The first message must contain `session`, `query_input` plus optionally
|
||||
// `query_params` and/or `single_utterance`. The message must not contain
|
||||
// `input_audio`.
|
||||
// `query_params` and/or `single_utterance`. The message must not contain `input_audio`.
|
||||
//
|
||||
// 2. If `query_input` was set to a streaming input audio config,
|
||||
// all subsequent messages must contain only `input_audio`.
|
||||
|
|
@ -239,7 +269,7 @@ message StreamingDetectIntentRequest {
|
|||
// Required. The name of the session the query is sent to.
|
||||
// Format of the session name:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>`. It’s up to the API
|
||||
// caller to choose an appropriate <Session ID>. It can be a random number or
|
||||
// caller to choose an appropriate `Session ID`. It can be a random number or
|
||||
// some type of user identifier (preferably hashed). The length of the session
|
||||
// ID must not exceed 36 characters.
|
||||
string session = 1;
|
||||
|
|
@ -267,6 +297,11 @@ message StreamingDetectIntentRequest {
|
|||
// This setting is ignored when `query_input` is a piece of text or an event.
|
||||
bool single_utterance = 4;
|
||||
|
||||
// Optional. 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.
|
||||
OutputAudioConfig output_audio_config = 5;
|
||||
|
||||
// Optional. The input audio content to be recognized. Must be sent if
|
||||
// `query_input` was set to a streaming input audio config. The complete audio
|
||||
// over all streaming messages must not exceed 1 minute.
|
||||
|
|
@ -298,6 +333,14 @@ message StreamingDetectIntentResponse {
|
|||
|
||||
// Specifies the status of the webhook request.
|
||||
google.rpc.Status webhook_status = 4;
|
||||
|
||||
// The audio data bytes encoded as specified in the request.
|
||||
bytes output_audio = 5;
|
||||
|
||||
// Instructs the speech synthesizer how to generate the output audio. This
|
||||
// field is populated from the agent-level speech synthesizer configuration,
|
||||
// if enabled.
|
||||
OutputAudioConfig output_audio_config = 6;
|
||||
}
|
||||
|
||||
// Contains a speech recognition result corresponding to a portion of the audio
|
||||
|
|
@ -319,7 +362,7 @@ message StreamingDetectIntentResponse {
|
|||
//
|
||||
// 6. transcript: " that is"
|
||||
//
|
||||
// 7. recognition_event_type: `RECOGNITION_EVENT_END_OF_SINGLE_UTTERANCE`
|
||||
// 7. message_type: `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`
|
||||
//
|
||||
// 8. transcript: " that is the question"
|
||||
// is_final: true
|
||||
|
|
@ -332,7 +375,7 @@ message StreamingDetectIntentResponse {
|
|||
//
|
||||
// * for `MESSAGE_TYPE_TRANSCRIPT`: `transcript` and possibly `is_final`.
|
||||
//
|
||||
// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `event_type`.
|
||||
// * for `MESSAGE_TYPE_END_OF_SINGLE_UTTERANCE`: only `message_type`.
|
||||
message StreamingRecognitionResult {
|
||||
// Type of the response message.
|
||||
enum MessageType {
|
||||
|
|
@ -356,14 +399,13 @@ message StreamingRecognitionResult {
|
|||
MessageType message_type = 1;
|
||||
|
||||
// Transcript text representing the words that the user spoke.
|
||||
// Populated if and only if `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`.
|
||||
// Populated if and only if `message_type` = `MESSAGE_TYPE_TRANSCRIPT`.
|
||||
string transcript = 2;
|
||||
|
||||
// The default of 0.0 is a sentinel value indicating `confidence` was not set.
|
||||
// If `false`, the `StreamingRecognitionResult` represents an
|
||||
// interim result that may change. If `true`, the recognizer will not return
|
||||
// any further hypotheses about this piece of the audio. May only be populated
|
||||
// for `event_type` = `RECOGNITION_EVENT_TRANSCRIPT`.
|
||||
// for `message_type` = `MESSAGE_TYPE_TRANSCRIPT`.
|
||||
bool is_final = 3;
|
||||
|
||||
// The Speech confidence between 0.0 and 1.0 for the current portion of audio.
|
||||
|
|
@ -382,20 +424,24 @@ message InputAudioConfig {
|
|||
AudioEncoding audio_encoding = 1;
|
||||
|
||||
// Required. Sample rate (in Hertz) of the audio content sent in the query.
|
||||
// Refer to [Cloud Speech API documentation](/speech/docs/basics) for more
|
||||
// details.
|
||||
// Refer to
|
||||
// [Cloud Speech API
|
||||
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for
|
||||
// more details.
|
||||
int32 sample_rate_hertz = 2;
|
||||
|
||||
// Required. The language of the supplied audio. Dialogflow does not do
|
||||
// translations. See [Language
|
||||
// Support](https://dialogflow.com/docs/languages) for a list of the
|
||||
// currently supported language codes. Note that queries in the same session
|
||||
// do not necessarily need to specify the same language.
|
||||
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// for a list of the currently supported language codes. Note that queries in
|
||||
// the same session do not necessarily need to specify the same language.
|
||||
string language_code = 3;
|
||||
|
||||
// Optional. The collection of phrase hints which are used to boost accuracy
|
||||
// of speech recognition.
|
||||
// Refer to [Cloud Speech API documentation](/speech/docs/basics#phrase-hints)
|
||||
// Refer to
|
||||
// [Cloud Speech API
|
||||
// documentation](https://cloud.google.com/speech-to-text/docs/basics#phrase-hints)
|
||||
// for more details.
|
||||
repeated string phrase_hints = 4;
|
||||
}
|
||||
|
|
@ -403,21 +449,21 @@ message InputAudioConfig {
|
|||
// Represents the natural language text to be processed.
|
||||
message TextInput {
|
||||
// Required. The UTF-8 encoded natural language text to be processed.
|
||||
// Text length must not exceed 256 bytes.
|
||||
// Text length must not exceed 256 characters.
|
||||
string text = 1;
|
||||
|
||||
// Required. The language of this conversational query. See [Language
|
||||
// Support](https://dialogflow.com/docs/languages) for a list of the
|
||||
// currently supported language codes. Note that queries in the same session
|
||||
// do not necessarily need to specify the same language.
|
||||
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// for a list of the currently supported language codes. Note that queries in
|
||||
// the same session do not necessarily need to specify the same language.
|
||||
string language_code = 2;
|
||||
}
|
||||
|
||||
// Events allow for matching intents by event name instead of the natural
|
||||
// language input. For instance, input `<event: { name: “welcome_event”,
|
||||
// parameters: { name: “Sam” } }>` can trigger a personalized welcome response.
|
||||
// language input. For instance, input `<event: { name: "welcome_event",
|
||||
// parameters: { name: "Sam" } }>` can trigger a personalized welcome response.
|
||||
// The parameter `name` may be used by the agent in the response:
|
||||
// `“Hello #welcome_event.name! What can I do for you today?”`.
|
||||
// `"Hello #welcome_event.name! What can I do for you today?"`.
|
||||
message EventInput {
|
||||
// Required. The unique identifier of the event.
|
||||
string name = 1;
|
||||
|
|
@ -426,14 +472,16 @@ message EventInput {
|
|||
google.protobuf.Struct parameters = 2;
|
||||
|
||||
// Required. The language of this query. See [Language
|
||||
// Support](https://dialogflow.com/docs/languages) for a list of the
|
||||
// currently supported language codes. Note that queries in the same session
|
||||
// do not necessarily need to specify the same language.
|
||||
// Support](https://cloud.google.com/dialogflow-enterprise/docs/reference/language)
|
||||
// for a list of the currently supported language codes. Note that queries in
|
||||
// the same session do not necessarily need to specify the same language.
|
||||
string language_code = 3;
|
||||
}
|
||||
|
||||
// Audio encoding of the audio content sent in the conversational query request.
|
||||
// Refer to the [Cloud Speech API documentation](/speech/docs/basics) for more
|
||||
// Refer to the
|
||||
// [Cloud Speech API
|
||||
// documentation](https://cloud.google.com/speech-to-text/docs/basics) for more
|
||||
// details.
|
||||
enum AudioEncoding {
|
||||
// Not specified.
|
||||
|
|
@ -478,3 +526,30 @@ enum AudioEncoding {
|
|||
// wideband is supported. `sample_rate_hertz` must be 16000.
|
||||
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
|
||||
}
|
||||
|
||||
// Configures the types of sentiment analysis to perform.
|
||||
message SentimentAnalysisRequestConfig {
|
||||
// Optional. Instructs the service to perform sentiment analysis on
|
||||
// `query_text`. If not provided, sentiment analysis is not performed on
|
||||
// `query_text`.
|
||||
bool analyze_query_text_sentiment = 1;
|
||||
}
|
||||
|
||||
// The result of sentiment analysis as configured by
|
||||
// `sentiment_analysis_request_config`.
|
||||
message SentimentAnalysisResult {
|
||||
// The sentiment analysis result for `query_text`.
|
||||
Sentiment query_text_sentiment = 1;
|
||||
}
|
||||
|
||||
// The sentiment, such as positive/negative feeling or association, for a unit
|
||||
// of analysis, such as the query text.
|
||||
message Sentiment {
|
||||
// Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
|
||||
// sentiment).
|
||||
float score = 1;
|
||||
|
||||
// A non-negative number in the [0, +inf) range, which represents the absolute
|
||||
// magnitude of sentiment, regardless of score (positive or negative).
|
||||
float magnitude = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,12 +11,14 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/resource.proto";
|
||||
import "google/cloud/dialogflow/v2/entity_type.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
|
@ -40,27 +42,28 @@ option objc_class_prefix = "DF";
|
|||
// entity type at the session level.
|
||||
//
|
||||
// For more information about entity types, see the
|
||||
// [Dialogflow documentation](https://dialogflow.com/docs/entities).
|
||||
// [Dialogflow
|
||||
// documentation](https://cloud.google.com/dialogflow-enterprise/docs/entities-overview).
|
||||
service SessionEntityTypes {
|
||||
// Returns the list of all session entity types in the specified session.
|
||||
rpc ListSessionEntityTypes(ListSessionEntityTypesRequest)
|
||||
returns (ListSessionEntityTypesResponse) {
|
||||
rpc ListSessionEntityTypes(ListSessionEntityTypesRequest) returns (ListSessionEntityTypesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes"
|
||||
};
|
||||
}
|
||||
|
||||
// Retrieves the specified session entity type.
|
||||
rpc GetSessionEntityType(GetSessionEntityTypeRequest)
|
||||
returns (SessionEntityType) {
|
||||
rpc GetSessionEntityType(GetSessionEntityTypeRequest) returns (SessionEntityType) {
|
||||
option (google.api.http) = {
|
||||
get: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}"
|
||||
};
|
||||
}
|
||||
|
||||
// Creates a session entity type.
|
||||
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest)
|
||||
returns (SessionEntityType) {
|
||||
//
|
||||
// If the specified session entity type already exists, overrides the session
|
||||
// entity type.
|
||||
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
|
||||
option (google.api.http) = {
|
||||
post: "/v2/{parent=projects/*/agent/sessions/*}/entityTypes"
|
||||
body: "session_entity_type"
|
||||
|
|
@ -68,8 +71,7 @@ service SessionEntityTypes {
|
|||
}
|
||||
|
||||
// Updates the specified session entity type.
|
||||
rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest)
|
||||
returns (SessionEntityType) {
|
||||
rpc UpdateSessionEntityType(UpdateSessionEntityTypeRequest) returns (SessionEntityType) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v2/{session_entity_type.name=projects/*/agent/sessions/*/entityTypes/*}"
|
||||
body: "session_entity_type"
|
||||
|
|
@ -77,8 +79,7 @@ service SessionEntityTypes {
|
|||
}
|
||||
|
||||
// Deletes the specified session entity type.
|
||||
rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest)
|
||||
returns (google.protobuf.Empty) {
|
||||
rpc DeleteSessionEntityType(DeleteSessionEntityTypeRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v2/{name=projects/*/agent/sessions/*/entityTypes/*}"
|
||||
};
|
||||
|
|
@ -104,16 +105,22 @@ message SessionEntityType {
|
|||
|
||||
// The collection of session entities extends the collection of entities in
|
||||
// the corresponding developer entity type.
|
||||
// Calls to `ListSessionEntityTypes`, `GetSessionEntityType`,
|
||||
// `CreateSessionEntityType` and `UpdateSessionEntityType` return the full
|
||||
// collection of entities from the developer entity type in the agent's
|
||||
// default language and the session entity type.
|
||||
//
|
||||
// Note: Even in this override mode calls to `ListSessionEntityTypes`,
|
||||
// `GetSessionEntityType`, `CreateSessionEntityType` and
|
||||
// `UpdateSessionEntityType` only return the additional entities added in
|
||||
// this session entity type. If you want to get the supplemented list,
|
||||
// please call [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] on the developer entity type
|
||||
// and merge.
|
||||
ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2;
|
||||
}
|
||||
|
||||
// Required. The unique identifier of this session entity type. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
|
||||
// Display Name>`.
|
||||
//
|
||||
// `<Entity Type Display Name>` must be the display name of an existing entity
|
||||
// type in the same agent that will be overridden or supplemented.
|
||||
string name = 1;
|
||||
|
||||
// Required. Indicates whether the additional data should override or
|
||||
|
|
@ -125,8 +132,7 @@ message SessionEntityType {
|
|||
repeated EntityType.Entity entities = 3;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
|
||||
// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
|
||||
message ListSessionEntityTypesRequest {
|
||||
// Required. The session to list all session entity types from.
|
||||
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
|
||||
|
|
@ -140,8 +146,7 @@ message ListSessionEntityTypesRequest {
|
|||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
|
||||
// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
|
||||
message ListSessionEntityTypesResponse {
|
||||
// The list of session entity types. There will be a maximum number of items
|
||||
// returned based on the page_size field in the request.
|
||||
|
|
@ -152,8 +157,7 @@ message ListSessionEntityTypesResponse {
|
|||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType].
|
||||
// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType].
|
||||
message GetSessionEntityTypeRequest {
|
||||
// Required. The name of the session entity type. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
|
||||
|
|
@ -161,8 +165,7 @@ message GetSessionEntityTypeRequest {
|
|||
string name = 1;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType].
|
||||
// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType].
|
||||
message CreateSessionEntityTypeRequest {
|
||||
// Required. The session to create a session entity type for.
|
||||
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
|
||||
|
|
@ -172,8 +175,7 @@ message CreateSessionEntityTypeRequest {
|
|||
SessionEntityType session_entity_type = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType].
|
||||
// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType].
|
||||
message UpdateSessionEntityTypeRequest {
|
||||
// Required. The entity type to update. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
|
||||
|
|
@ -184,8 +186,7 @@ message UpdateSessionEntityTypeRequest {
|
|||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType].
|
||||
// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType].
|
||||
message DeleteSessionEntityTypeRequest {
|
||||
// Required. The name of the entity type to delete. Format:
|
||||
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2018 Google Inc.
|
||||
// Copyright 2019 Google LLC.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -11,16 +11,17 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
package google.cloud.dialogflow.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/cloud/dialogflow/v2/context.proto";
|
||||
import "google/cloud/dialogflow/v2/intent.proto";
|
||||
import "google/cloud/dialogflow/v2/session.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option cc_enable_arenas = true;
|
||||
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
|
||||
|
|
@ -34,7 +35,9 @@ option objc_class_prefix = "DF";
|
|||
message WebhookRequest {
|
||||
// The unique identifier of detectIntent request session.
|
||||
// Can be used to identify end-user inside webhook implementation.
|
||||
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
|
||||
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`, or
|
||||
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
|
||||
// ID>/sessions/<Session ID>`.
|
||||
string session = 4;
|
||||
|
||||
// The unique identifier of the response. Contains the same value as
|
||||
|
|
@ -104,7 +107,22 @@ message OriginalDetectIntentRequest {
|
|||
// by Dialogflow-owned servers.
|
||||
string source = 1;
|
||||
|
||||
// Optional. This field is set to the value of `QueryParameters.payload` field
|
||||
// passed in the request.
|
||||
// Optional. The version of the protocol used for this request.
|
||||
// This field is AoG-specific.
|
||||
string version = 2;
|
||||
|
||||
// Optional. This field is set to the value of the `QueryParameters.payload`
|
||||
// field passed in the request. Some integrations that query a Dialogflow
|
||||
// agent may provide additional information in the payload.
|
||||
//
|
||||
// In particular for the Telephony Gateway this field has the form:
|
||||
// <pre>{
|
||||
// "telephony": {
|
||||
// "caller_id": "+18558363987"
|
||||
// }
|
||||
// }</pre>
|
||||
// Note: The caller ID field (`caller_id`) will be redacted for Standard
|
||||
// Edition agents and populated with the caller ID in [E.164
|
||||
// format](https://en.wikipedia.org/wiki/E.164) for Enterprise Edition agents.
|
||||
google.protobuf.Struct payload = 3;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue