123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841 |
- syntax = "proto3";
- package google.cloud.dialogflow.v2beta1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/cloud/dialogflow/v2beta1/agent.proto";
- import "google/cloud/dialogflow/v2beta1/audio_config.proto";
- import "google/cloud/dialogflow/v2beta1/context.proto";
- import "google/cloud/dialogflow/v2beta1/intent.proto";
- import "google/cloud/dialogflow/v2beta1/session_entity_type.proto";
- import "google/protobuf/duration.proto";
- import "google/protobuf/field_mask.proto";
- import "google/protobuf/struct.proto";
- import "google/rpc/status.proto";
- import "google/type/latlng.proto";
- option cc_enable_arenas = true;
- option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
- option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
- option java_multiple_files = true;
- option java_outer_classname = "SessionProto";
- option java_package = "com.google.cloud.dialogflow.v2beta1";
- option objc_class_prefix = "DF";
- option (google.api.resource_definition) = {
- type: "dialogflow.googleapis.com/Session"
- pattern: "projects/{project}/agent/sessions/{session}"
- pattern: "projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session}"
- pattern: "projects/{project}/locations/{location}/agent/sessions/{session}"
- pattern: "projects/{project}/locations/{location}/agent/environments/{environment}/users/{user}/sessions/{session}"
- };
- service Sessions {
- option (google.api.default_host) = "dialogflow.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/cloud-platform,"
- "https://www.googleapis.com/auth/dialogflow";
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse) {
- option (google.api.http) = {
- post: "/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent"
- body: "*"
- additional_bindings {
- post: "/v2beta1/{session=projects/*/agent/environments/*/users/*/sessions/*}:detectIntent"
- body: "*"
- }
- additional_bindings {
- post: "/v2beta1/{session=projects/*/locations/*/agent/sessions/*}:detectIntent"
- body: "*"
- }
- additional_bindings {
- post: "/v2beta1/{session=projects/*/locations/*/agent/environments/*/users/*/sessions/*}:detectIntent"
- body: "*"
- }
- };
- option (google.api.method_signature) = "session,query_input";
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
- }
- }
- // The request to detect user's intent.
- message DetectIntentRequest {
- // Required. The name of the session this query is sent to. Supported formats:
- // - `projects/<Project ID>/agent/sessions/<Session ID>,
- // - `projects/<Project ID>/locations/<Location ID>/agent/sessions/<Session
- // ID>`,
- // - `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
- // ID>/sessions/<Session ID>`,
- // - `projects/<Project ID>/locations/<Location
- // ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session
- // ID>`,
- //
- // If `Location ID` is not specified we assume default 'us' location. If
- // `Environment ID` is not specified, we assume default 'draft' environment
- // (`Environment ID` might be referred to as environment name at some places).
- // If `User ID` is not specified, we are using "-". It's up to the API caller
- // to choose an appropriate `Session ID` and `User Id`. They can be a random
- // number or some type of user and session identifiers (preferably hashed).
- // The length of the `Session ID` and `User ID` must not exceed 36 characters.
- // For more information, see the [API interactions
- // guide](https://cloud.google.com/dialogflow/docs/api-overview).
- //
- // Note: Always use agent versions for production traffic.
- // See [Versions and
- // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
- string session = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Session"
- }
- ];
-
- QueryParameters query_params = 2;
-
-
-
-
-
-
-
-
- QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED];
-
-
-
- OutputAudioConfig output_audio_config = 4;
-
-
-
-
-
-
- google.protobuf.FieldMask output_audio_config_mask = 7;
-
-
-
- bytes input_audio = 5;
- }
- message DetectIntentResponse {
-
-
- string response_id = 1;
-
-
- QueryResult query_result = 2;
-
-
-
-
-
-
-
-
- repeated QueryResult alternative_query_results = 5;
-
- google.rpc.Status webhook_status = 3;
-
-
-
-
-
-
-
-
-
-
- bytes output_audio = 4;
-
- OutputAudioConfig output_audio_config = 6;
- }
- message QueryParameters {
-
-
-
-
- string time_zone = 1;
-
- google.type.LatLng geo_location = 2;
-
-
- repeated Context contexts = 3;
-
-
- bool reset_contexts = 4;
-
-
-
- repeated SessionEntityType session_entity_types = 5;
-
-
-
-
-
- google.protobuf.Struct payload = 6;
-
-
-
- repeated string knowledge_base_names = 12;
-
-
-
-
- SentimentAnalysisRequestConfig sentiment_analysis_request_config = 10;
-
-
-
-
- repeated SubAgent sub_agents = 13;
-
-
-
-
-
-
-
-
- map<string, string> webhook_headers = 14;
- }
- message QueryInput {
-
- oneof input {
-
- InputAudioConfig audio_config = 1;
-
- TextInput text = 2;
-
- EventInput event = 3;
-
- TelephonyDtmfEvents dtmf = 4;
- }
- }
- message QueryResult {
-
-
-
-
-
-
-
-
-
- string query_text = 1;
-
-
-
-
- string language_code = 15;
-
-
-
-
-
-
-
-
-
- float speech_recognition_confidence = 2;
-
- string action = 3;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- google.protobuf.Struct parameters = 4;
-
-
-
-
-
-
- bool all_required_params_present = 5;
-
-
-
- bool cancels_slot_filling = 21;
-
-
- string fulfillment_text = 6;
-
- repeated Intent.Message fulfillment_messages = 7;
-
-
- string webhook_source = 8;
-
-
- google.protobuf.Struct webhook_payload = 9;
-
-
-
-
- repeated Context output_contexts = 10;
-
-
-
- Intent intent = 11;
-
-
-
-
-
-
-
-
- float intent_detection_confidence = 12;
-
-
-
-
-
-
-
- google.protobuf.Struct diagnostic_info = 14;
-
-
- SentimentAnalysisResult sentiment_analysis_result = 17;
-
-
- KnowledgeAnswers knowledge_answers = 18;
- }
- message KnowledgeAnswers {
-
- message Answer {
-
-
- enum MatchConfidenceLevel {
-
- MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0;
-
- LOW = 1;
-
- MEDIUM = 2;
-
- HIGH = 3;
- }
-
-
-
- string source = 1 [(google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Document"
- }];
-
-
- string faq_question = 2;
-
-
- string answer = 3;
-
-
-
-
-
-
-
- MatchConfidenceLevel match_confidence_level = 4;
-
-
-
-
-
-
-
- float match_confidence = 5;
- }
-
- repeated Answer answers = 1;
- }
- message StreamingDetectIntentRequest {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- string session = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Session"
- }
- ];
-
- QueryParameters query_params = 2;
-
-
-
-
-
-
-
-
- QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED];
-
-
-
-
-
-
-
-
-
- bool single_utterance = 4 [deprecated = true];
-
-
-
- OutputAudioConfig output_audio_config = 5;
-
-
-
-
-
-
- google.protobuf.FieldMask output_audio_config_mask = 7;
-
-
-
- bytes input_audio = 6;
- }
- message StreamingDetectIntentResponse {
-
-
- string response_id = 1;
-
- StreamingRecognitionResult recognition_result = 2;
-
-
- QueryResult query_result = 3;
-
-
-
-
-
-
-
-
- repeated QueryResult alternative_query_results = 7;
-
- google.rpc.Status webhook_status = 4;
-
-
-
-
-
-
-
-
-
-
- bytes output_audio = 5;
-
- OutputAudioConfig output_audio_config = 6;
- }
- message StreamingRecognitionResult {
-
- enum MessageType {
-
- MESSAGE_TYPE_UNSPECIFIED = 0;
-
- TRANSCRIPT = 1;
-
-
-
-
- DTMF_DIGITS = 3;
-
-
-
-
-
-
-
- END_OF_SINGLE_UTTERANCE = 2;
-
-
-
- PARTIAL_DTMF_DIGITS = 4;
- }
-
- MessageType message_type = 1;
-
-
- string transcript = 2;
-
-
-
-
- bool is_final = 3;
-
-
-
-
-
-
-
- float confidence = 4;
-
-
-
-
-
-
-
-
- float stability = 6;
-
-
-
- repeated SpeechWordInfo speech_word_info = 7;
-
-
- google.protobuf.Duration speech_end_offset = 8;
-
- string language_code = 10;
-
- TelephonyDtmfEvents dtmf_digits = 5;
- }
- message TextInput {
-
-
- string text = 1;
-
-
-
-
- string language_code = 2;
- }
- message EventInput {
-
- string name = 1;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- google.protobuf.Struct parameters = 2;
-
-
-
-
-
-
-
-
-
- string language_code = 3;
- }
- message SentimentAnalysisRequestConfig {
-
-
-
- bool analyze_query_text_sentiment = 1;
- }
- message SentimentAnalysisResult {
-
- Sentiment query_text_sentiment = 1;
- }
- message Sentiment {
-
-
- float score = 1;
-
-
- float magnitude = 2;
- }
|