xref: /aosp_15_r20/external/googleapis/google/cloud/dialogflow/v2/conversation_profile.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.dialogflow.v2;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/dialogflow/v2/audio_config.proto";
24import "google/cloud/dialogflow/v2/participant.proto";
25import "google/longrunning/operations.proto";
26import "google/protobuf/duration.proto";
27import "google/protobuf/empty.proto";
28import "google/protobuf/field_mask.proto";
29import "google/protobuf/timestamp.proto";
30
31option cc_enable_arenas = true;
32option csharp_namespace = "Google.Cloud.Dialogflow.V2";
33option go_package = "cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb";
34option java_multiple_files = true;
35option java_outer_classname = "ConversationProfileProto";
36option java_package = "com.google.cloud.dialogflow.v2";
37option objc_class_prefix = "DF";
38option (google.api.resource_definition) = {
39  type: "dialogflow.googleapis.com/CXSecuritySettings"
40  pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}"
41};
42
43// Service for managing
44// [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile].
45service ConversationProfiles {
46  option (google.api.default_host) = "dialogflow.googleapis.com";
47  option (google.api.oauth_scopes) =
48      "https://www.googleapis.com/auth/cloud-platform,"
49      "https://www.googleapis.com/auth/dialogflow";
50
51  // Returns the list of all conversation profiles in the specified project.
52  rpc ListConversationProfiles(ListConversationProfilesRequest)
53      returns (ListConversationProfilesResponse) {
54    option (google.api.http) = {
55      get: "/v2/{parent=projects/*}/conversationProfiles"
56      additional_bindings {
57        get: "/v2/{parent=projects/*/locations/*}/conversationProfiles"
58      }
59    };
60    option (google.api.method_signature) = "parent";
61  }
62
63  // Retrieves the specified conversation profile.
64  rpc GetConversationProfile(GetConversationProfileRequest)
65      returns (ConversationProfile) {
66    option (google.api.http) = {
67      get: "/v2/{name=projects/*/conversationProfiles/*}"
68      additional_bindings {
69        get: "/v2/{name=projects/*/locations/*/conversationProfiles/*}"
70      }
71    };
72    option (google.api.method_signature) = "name";
73  }
74
75  // Creates a conversation profile in the specified project.
76  //
77  // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][]
78  // aren't populated in the response. You can retrieve them via
79  // [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile]
80  // API.
81  rpc CreateConversationProfile(CreateConversationProfileRequest)
82      returns (ConversationProfile) {
83    option (google.api.http) = {
84      post: "/v2/{parent=projects/*}/conversationProfiles"
85      body: "conversation_profile"
86      additional_bindings {
87        post: "/v2/{parent=projects/*/locations/*}/conversationProfiles"
88        body: "conversation_profile"
89      }
90    };
91    option (google.api.method_signature) = "parent,conversation_profile";
92  }
93
94  // Updates the specified conversation profile.
95  //
96  // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][]
97  // aren't populated in the response. You can retrieve them via
98  // [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile]
99  // API.
100  rpc UpdateConversationProfile(UpdateConversationProfileRequest)
101      returns (ConversationProfile) {
102    option (google.api.http) = {
103      patch: "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}"
104      body: "conversation_profile"
105      additional_bindings {
106        patch: "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}"
107        body: "conversation_profile"
108      }
109    };
110    option (google.api.method_signature) = "conversation_profile,update_mask";
111  }
112
113  // Deletes the specified conversation profile.
114  rpc DeleteConversationProfile(DeleteConversationProfileRequest)
115      returns (google.protobuf.Empty) {
116    option (google.api.http) = {
117      delete: "/v2/{name=projects/*/conversationProfiles/*}"
118      additional_bindings {
119        delete: "/v2/{name=projects/*/locations/*/conversationProfiles/*}"
120      }
121    };
122    option (google.api.method_signature) = "name";
123  }
124
125  // Adds or updates a suggestion feature in a conversation profile.
126  // If the conversation profile contains the type of suggestion feature for
127  // the participant role, it will update it. Otherwise it will insert the
128  // suggestion feature.
129  //
130  // This method is a [long-running
131  // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
132  // The returned `Operation` type has the following method-specific fields:
133  //
134  // - `metadata`:
135  // [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata]
136  // - `response`:
137  // [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]
138  //
139  // If a long running operation to add or update suggestion feature
140  // config for the same conversation profile, participant role and suggestion
141  // feature type exists, please cancel the existing long running operation
142  // before sending such request, otherwise the request will be rejected.
143  rpc SetSuggestionFeatureConfig(SetSuggestionFeatureConfigRequest)
144      returns (google.longrunning.Operation) {
145    option (google.api.http) = {
146      post: "/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig"
147      body: "*"
148      additional_bindings {
149        post: "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig"
150        body: "*"
151      }
152    };
153    option (google.api.method_signature) = "conversation_profile";
154    option (google.api.method_signature) =
155        "conversation_profile,participant_role,suggestion_feature_config";
156    option (google.longrunning.operation_info) = {
157      response_type: "ConversationProfile"
158      metadata_type: "SetSuggestionFeatureConfigOperationMetadata"
159    };
160  }
161
162  // Clears a suggestion feature from a conversation profile for the given
163  // participant role.
164  //
165  // This method is a [long-running
166  // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
167  // The returned `Operation` type has the following method-specific fields:
168  //
169  // - `metadata`:
170  // [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata]
171  // - `response`:
172  // [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]
173  rpc ClearSuggestionFeatureConfig(ClearSuggestionFeatureConfigRequest)
174      returns (google.longrunning.Operation) {
175    option (google.api.http) = {
176      post: "/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig"
177      body: "*"
178      additional_bindings {
179        post: "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig"
180        body: "*"
181      }
182    };
183    option (google.api.method_signature) = "conversation_profile";
184    option (google.api.method_signature) =
185        "conversation_profile,participant_role,suggestion_feature_type";
186    option (google.longrunning.operation_info) = {
187      response_type: "ConversationProfile"
188      metadata_type: "ClearSuggestionFeatureConfigOperationMetadata"
189    };
190  }
191}
192
193// Defines the services to connect to incoming Dialogflow conversations.
194message ConversationProfile {
195  option (google.api.resource) = {
196    type: "dialogflow.googleapis.com/ConversationProfile"
197    pattern: "projects/{project}/conversationProfiles/{conversation_profile}"
198    pattern: "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}"
199  };
200
201  // The unique identifier of this conversation profile.
202  // Format: `projects/<Project ID>/locations/<Location
203  // ID>/conversationProfiles/<Conversation Profile ID>`.
204  string name = 1;
205
206  // Required. Human readable name for this profile. Max length 1024 bytes.
207  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
208
209  // Output only. Create time of the conversation profile.
210  google.protobuf.Timestamp create_time = 11
211      [(google.api.field_behavior) = OUTPUT_ONLY];
212
213  // Output only. Update time of the conversation profile.
214  google.protobuf.Timestamp update_time = 12
215      [(google.api.field_behavior) = OUTPUT_ONLY];
216
217  // Configuration for an automated agent to use with this profile.
218  AutomatedAgentConfig automated_agent_config = 3;
219
220  // Configuration for agent assistance to use with this profile.
221  HumanAgentAssistantConfig human_agent_assistant_config = 4;
222
223  // Configuration for connecting to a live agent.
224  //
225  // Currently, this feature is not general available, please contact Google
226  // to get access.
227  HumanAgentHandoffConfig human_agent_handoff_config = 5;
228
229  // Configuration for publishing conversation lifecycle events.
230  NotificationConfig notification_config = 6;
231
232  // Configuration for logging conversation lifecycle events.
233  LoggingConfig logging_config = 7;
234
235  // Configuration for publishing new message events. Event will be sent in
236  // format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent]
237  NotificationConfig new_message_event_notification_config = 8;
238
239  // Settings for speech transcription.
240  SpeechToTextConfig stt_config = 9;
241
242  // Language code for the conversation profile. If not specified, the language
243  // is en-US. Language at ConversationProfile should be set for all non en-US
244  // languages.
245  // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
246  // language tag. Example: "en-US".
247  string language_code = 10;
248
249  // The time zone of this conversational profile from the
250  // [time zone database](https://www.iana.org/time-zones), e.g.,
251  // America/New_York, Europe/Paris. Defaults to America/New_York.
252  string time_zone = 14;
253
254  // Name of the CX SecuritySettings reference for the agent.
255  // Format: `projects/<Project ID>/locations/<Location
256  // ID>/securitySettings/<Security Settings ID>`.
257  string security_settings = 13 [(google.api.resource_reference) = {
258    type: "dialogflow.googleapis.com/CXSecuritySettings"
259  }];
260
261  // Configuration for Text-to-Speech synthesization.
262  //
263  // Used by Phone Gateway to specify synthesization options. If agent defines
264  // synthesization options as well, agent settings overrides the option here.
265  SynthesizeSpeechConfig tts_config = 18;
266}
267
268// The request message for
269// [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles].
270message ListConversationProfilesRequest {
271  // Required. The project to list all conversation profiles from.
272  // Format: `projects/<Project ID>/locations/<Location ID>`.
273  string parent = 1 [
274    (google.api.field_behavior) = REQUIRED,
275    (google.api.resource_reference) = {
276      child_type: "dialogflow.googleapis.com/ConversationProfile"
277    }
278  ];
279
280  // The maximum number of items to return in a single page. By
281  // default 100 and at most 1000.
282  int32 page_size = 2;
283
284  // The next_page_token value returned from a previous list request.
285  string page_token = 3;
286}
287
288// The response message for
289// [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles].
290message ListConversationProfilesResponse {
291  // The list of project conversation profiles. There is a maximum number
292  // of items returned based on the page_size field in the request.
293  repeated ConversationProfile conversation_profiles = 1;
294
295  // Token to retrieve the next page of results, or empty if there are no
296  // more results in the list.
297  string next_page_token = 2;
298}
299
300// The request message for
301// [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile].
302message GetConversationProfileRequest {
303  // Required. The resource name of the conversation profile.
304  // Format: `projects/<Project ID>/locations/<Location
305  // ID>/conversationProfiles/<Conversation Profile ID>`.
306  string name = 1 [
307    (google.api.field_behavior) = REQUIRED,
308    (google.api.resource_reference) = {
309      type: "dialogflow.googleapis.com/ConversationProfile"
310    }
311  ];
312}
313
314// The request message for
315// [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile].
316message CreateConversationProfileRequest {
317  // Required. The project to create a conversation profile for.
318  // Format: `projects/<Project ID>/locations/<Location ID>`.
319  string parent = 1 [
320    (google.api.field_behavior) = REQUIRED,
321    (google.api.resource_reference) = {
322      child_type: "dialogflow.googleapis.com/ConversationProfile"
323    }
324  ];
325
326  // Required. The conversation profile to create.
327  ConversationProfile conversation_profile = 2
328      [(google.api.field_behavior) = REQUIRED];
329}
330
331// The request message for
332// [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile].
333message UpdateConversationProfileRequest {
334  // Required. The conversation profile to update.
335  ConversationProfile conversation_profile = 1
336      [(google.api.field_behavior) = REQUIRED];
337
338  // Required. The mask to control which fields to update.
339  google.protobuf.FieldMask update_mask = 2
340      [(google.api.field_behavior) = REQUIRED];
341}
342
343// The request message for
344// [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile].
345//
346// This operation fails if the conversation profile is still referenced from
347// a phone number.
348message DeleteConversationProfileRequest {
349  // Required. The name of the conversation profile to delete.
350  // Format: `projects/<Project ID>/locations/<Location
351  // ID>/conversationProfiles/<Conversation Profile ID>`.
352  string name = 1 [
353    (google.api.field_behavior) = REQUIRED,
354    (google.api.resource_reference) = {
355      type: "dialogflow.googleapis.com/ConversationProfile"
356    }
357  ];
358}
359
360// Defines the Automated Agent to connect to a conversation.
361message AutomatedAgentConfig {
362  // Required. ID of the Dialogflow agent environment to use.
363  //
364  // This project needs to either be the same project as the conversation or you
365  // need to grant `service-<Conversation Project
366  // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
367  // Service Agent` role in this project.
368  //
369  // - For ES agents, use format: `projects/<Project ID>/locations/<Location
370  // ID>/agent/environments/<Environment ID or '-'>`. If environment is not
371  // specified, the default `draft` environment is used. Refer to
372  // [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest)
373  // for more details.
374  //
375  // - For CX agents, use format `projects/<Project ID>/locations/<Location
376  // ID>/agents/<Agent ID>/environments/<Environment ID
377  // or '-'>`. If environment is not specified, the default `draft` environment
378  // is used.
379  string agent = 1 [
380    (google.api.field_behavior) = REQUIRED,
381    (google.api.resource_reference) = {
382      type: "dialogflow.googleapis.com/Agent"
383    }
384  ];
385
386  // Optional. Configure lifetime of the Dialogflow session.
387  // By default, a Dialogflow CX session remains active and its data is stored
388  // for 30 minutes after the last request is sent for the session.
389  // This value should be no longer than 1 day.
390  google.protobuf.Duration session_ttl = 3
391      [(google.api.field_behavior) = OPTIONAL];
392}
393
394// Defines the Human Agent Assist to connect to a conversation.
395message HumanAgentAssistantConfig {
396  // Settings of suggestion trigger.
397  message SuggestionTriggerSettings {
398    // Do not trigger if last utterance is small talk.
399    bool no_smalltalk = 1;
400
401    // Only trigger suggestion if participant role of last utterance is
402    // END_USER.
403    bool only_end_user = 2;
404  }
405
406  // Config for suggestion features.
407  message SuggestionFeatureConfig {
408    // The suggestion feature.
409    SuggestionFeature suggestion_feature = 5;
410
411    // Automatically iterates all participants and tries to compile
412    // suggestions.
413    //
414    // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST,
415    // KNOWLEDGE_ASSIST.
416    bool enable_event_based_suggestion = 3;
417
418    // Optional. Disable the logging of search queries sent by human agents. It
419    // can prevent those queries from being stored at answer records.
420    //
421    // Supported features: KNOWLEDGE_SEARCH.
422    bool disable_agent_query_logging = 14
423        [(google.api.field_behavior) = OPTIONAL];
424
425    // Optional. Enable including conversation context during query answer
426    // generation. Supported features: KNOWLEDGE_SEARCH.
427    bool enable_conversation_augmented_query = 16
428        [(google.api.field_behavior) = OPTIONAL];
429
430    // Settings of suggestion trigger.
431    //
432    // Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
433    SuggestionTriggerSettings suggestion_trigger_settings = 10;
434
435    // Configs of query.
436    SuggestionQueryConfig query_config = 6;
437
438    // Configs of custom conversation model.
439    ConversationModelConfig conversation_model_config = 7;
440
441    // Configs for processing conversation.
442    ConversationProcessConfig conversation_process_config = 8;
443  }
444
445  // Detail human agent assistant config.
446  message SuggestionConfig {
447    // Configuration of different suggestion features. One feature can have only
448    // one config.
449    repeated SuggestionFeatureConfig feature_configs = 2;
450
451    // If `group_suggestion_responses` is false, and there are multiple
452    // `feature_configs` in `event based suggestion` or
453    // StreamingAnalyzeContent, we will try to deliver suggestions to customers
454    // as soon as we get new suggestion. Different type of suggestions based on
455    // the same context will be in  separate Pub/Sub event or
456    // `StreamingAnalyzeContentResponse`.
457    //
458    // If `group_suggestion_responses` set to true. All the suggestions to the
459    // same participant based on the same context will be grouped into a single
460    // Pub/Sub event or StreamingAnalyzeContentResponse.
461    bool group_suggestion_responses = 3;
462  }
463
464  // Config for suggestion query.
465  message SuggestionQueryConfig {
466    // Knowledge base source settings.
467    //
468    // Supported features: ARTICLE_SUGGESTION, FAQ.
469    message KnowledgeBaseQuerySource {
470      // Required. Knowledge bases to query. Format:
471      // `projects/<Project ID>/locations/<Location
472      // ID>/knowledgeBases/<Knowledge Base ID>`. Currently, at most 5 knowledge
473      // bases are supported.
474      repeated string knowledge_bases = 1 [
475        (google.api.field_behavior) = REQUIRED,
476        (google.api.resource_reference) = {
477          type: "dialogflow.googleapis.com/KnowledgeBase"
478        }
479      ];
480    }
481
482    // Document source settings.
483    //
484    // Supported features: SMART_REPLY, SMART_COMPOSE.
485    message DocumentQuerySource {
486      // Required. Knowledge documents to query from. Format:
487      // `projects/<Project ID>/locations/<Location
488      // ID>/knowledgeBases/<KnowledgeBase ID>/documents/<Document ID>`.
489      // Currently, at most 5 documents are supported.
490      repeated string documents = 1 [
491        (google.api.field_behavior) = REQUIRED,
492        (google.api.resource_reference) = {
493          type: "dialogflow.googleapis.com/Document"
494        }
495      ];
496    }
497
498    // Dialogflow source setting.
499    //
500    // Supported feature: DIALOGFLOW_ASSIST.
501    message DialogflowQuerySource {
502      // The configuration used for human agent side Dialogflow assist
503      // suggestion.
504      message HumanAgentSideConfig {
505        // Optional. The name of a dialogflow virtual agent used for intent
506        // detection and suggestion triggered by human agent.
507        // Format: `projects/<Project ID>/locations/<Location ID>/agent`.
508        string agent = 1 [
509          (google.api.field_behavior) = OPTIONAL,
510          (google.api.resource_reference) = {
511            type: "dialogflow.googleapis.com/Agent"
512          }
513        ];
514      }
515
516      // Required. The name of a Dialogflow virtual agent used for end user side
517      // intent detection and suggestion. Format: `projects/<Project
518      // ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
519      // the same Dialogflow project.
520      string agent = 1 [
521        (google.api.field_behavior) = REQUIRED,
522        (google.api.resource_reference) = {
523          type: "dialogflow.googleapis.com/Agent"
524        }
525      ];
526
527      // Optional. The Dialogflow assist configuration for human agent.
528      HumanAgentSideConfig human_agent_side_config = 3
529          [(google.api.field_behavior) = OPTIONAL];
530    }
531
532    // Settings that determine how to filter recent conversation context when
533    // generating suggestions.
534    message ContextFilterSettings {
535      // If set to true, the last message from virtual agent (hand off message)
536      // and the message before it (trigger message of hand off) are dropped.
537      bool drop_handoff_messages = 1;
538
539      // If set to true, all messages from virtual agent are dropped.
540      bool drop_virtual_agent_messages = 2;
541
542      // If set to true, all messages from ivr stage are dropped.
543      bool drop_ivr_messages = 3;
544    }
545
546    // Custom sections to return when requesting a summary of a conversation.
547    // This is only supported when `baseline_model_version` == '2.0'.
548    //
549    // Supported features: CONVERSATION_SUMMARIZATION,
550    // CONVERSATION_SUMMARIZATION_VOICE.
551    message Sections {
552      // Selectable sections to return when requesting a summary of a
553      // conversation.
554      enum SectionType {
555        // Undefined section type, does not return anything.
556        SECTION_TYPE_UNSPECIFIED = 0;
557
558        // What the customer needs help with or has question about.
559        // Section name: "situation".
560        SITUATION = 1;
561
562        // What the agent does to help the customer.
563        // Section name: "action".
564        ACTION = 2;
565
566        // Result of the customer service. A single word describing the result
567        // of the conversation.
568        // Section name: "resolution".
569        RESOLUTION = 3;
570
571        // Reason for cancellation if the customer requests for a cancellation.
572        // "N/A" otherwise.
573        // Section name: "reason_for_cancellation".
574        REASON_FOR_CANCELLATION = 4;
575
576        // "Unsatisfied" or "Satisfied" depending on the customer's feelings at
577        // the end of the conversation.
578        // Section name: "customer_satisfaction".
579        CUSTOMER_SATISFACTION = 5;
580
581        // Key entities extracted from the conversation, such as ticket number,
582        // order number, dollar amount, etc.
583        // Section names are prefixed by "entities/".
584        ENTITIES = 6;
585      }
586
587      // The selected sections chosen to return when requesting a summary of a
588      // conversation. A duplicate selected section will be treated as a single
589      // selected section. If section types are not provided, the default will
590      // be {SITUATION, ACTION, RESULT}.
591      repeated SectionType section_types = 1;
592    }
593
594    // Source of query.
595    oneof query_source {
596      // Query from knowledgebase. It is used by:
597      // ARTICLE_SUGGESTION, FAQ.
598      KnowledgeBaseQuerySource knowledge_base_query_source = 1;
599
600      // Query from knowledge base document. It is used by:
601      // SMART_REPLY, SMART_COMPOSE.
602      DocumentQuerySource document_query_source = 2;
603
604      // Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
605      DialogflowQuerySource dialogflow_query_source = 3;
606    }
607
608    // Maximum number of results to return. Currently, if unset, defaults to 10.
609    // And the max number is 20.
610    int32 max_results = 4;
611
612    // Confidence threshold of query result.
613    //
614    // Agent Assist gives each suggestion a score in the range [0.0, 1.0], based
615    // on the relevance between the suggestion and the current conversation
616    // context. A score of 0.0 has no relevance, while a score of 1.0 has high
617    // relevance. Only suggestions with a score greater than or equal to the
618    // value of this field are included in the results.
619    //
620    // For a baseline model (the default), the recommended value is in the range
621    // [0.05, 0.1].
622    //
623    // For a custom model, there is no recommended value. Tune this value by
624    // starting from a very low value and slowly increasing until you have
625    // desired results.
626    //
627    // If this field is not set, it defaults to 0.0, which means that all
628    // suggestions are returned.
629    //
630    // Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE,
631    // KNOWLEDGE_SEARCH, KNOWLEDGE_ASSIST, ENTITY_EXTRACTION.
632    float confidence_threshold = 5;
633
634    // Determines how recent conversation context is filtered when generating
635    // suggestions. If unspecified, no messages will be dropped.
636    ContextFilterSettings context_filter_settings = 7;
637
638    // Optional. The customized sections chosen to return when requesting a
639    // summary of a conversation.
640    Sections sections = 8 [(google.api.field_behavior) = OPTIONAL];
641  }
642
643  // Custom conversation models used in agent assist feature.
644  //
645  // Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY,
646  // CONVERSATION_SUMMARIZATION.
647  message ConversationModelConfig {
648    // Conversation model resource name. Format: `projects/<Project
649    // ID>/conversationModels/<Model ID>`.
650    string model = 1 [(google.api.resource_reference) = {
651      type: "dialogflow.googleapis.com/ConversationModel"
652    }];
653
654    // Version of current baseline model. It will be ignored if
655    // [model][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationModelConfig.model]
656    // is set. Valid versions are:
657    //   Article Suggestion baseline model:
658    //     - 0.9
659    //     - 1.0 (default)
660    //   Summarization baseline model:
661    //     - 1.0
662    string baseline_model_version = 8;
663  }
664
665  // Config to process conversation.
666  message ConversationProcessConfig {
667    // Number of recent non-small-talk sentences to use as context for article
668    // and FAQ suggestion
669    int32 recent_sentences_count = 2;
670  }
671
672  // Configuration for analyses to run on each conversation message.
673  message MessageAnalysisConfig {
674    // Enable entity extraction in conversation messages on [agent assist
675    // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
676    // If unspecified, defaults to false.
677    //
678    // Currently, this feature is not general available, please contact Google
679    // to get access.
680    bool enable_entity_extraction = 2;
681
682    // Enable sentiment analysis in conversation messages on [agent assist
683    // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
684    // If unspecified, defaults to false. Sentiment analysis inspects user input
685    // and identifies the prevailing subjective opinion, especially to determine
686    // a user's attitude as positive, negative, or neutral:
687    // https://cloud.google.com/natural-language/docs/basics#sentiment_analysis
688    // For
689    // [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
690    // method, result will be in
691    // [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message].
692    // For
693    // [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
694    // method, result will be in
695    // [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message]
696    // For
697    // [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages]
698    // method, result will be in
699    // [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages]
700    // If Pub/Sub notification is configured, result will be in
701    // [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload].
702    bool enable_sentiment_analysis = 3;
703  }
704
705  // Pub/Sub topic on which to publish new agent assistant events.
706  NotificationConfig notification_config = 2;
707
708  // Configuration for agent assistance of human agent participant.
709  SuggestionConfig human_agent_suggestion_config = 3;
710
711  // Configuration for agent assistance of end user participant.
712  //
713  // Currently, this feature is not general available, please contact Google
714  // to get access.
715  SuggestionConfig end_user_suggestion_config = 4;
716
717  // Configuration for message analysis.
718  MessageAnalysisConfig message_analysis_config = 5;
719}
720
721// Defines the hand off to a live agent, typically on which external agent
722// service provider to connect to a conversation.
723//
724// Currently, this feature is not general available, please contact Google
725// to get access.
726message HumanAgentHandoffConfig {
727  // Configuration specific to LivePerson (https://www.liveperson.com).
728  message LivePersonConfig {
729    // Required. Account number of the LivePerson account to connect. This is
730    // the account number you input at the login page.
731    string account_number = 1 [(google.api.field_behavior) = REQUIRED];
732  }
733
734  // Configuration specific to Salesforce Live Agent.
735  message SalesforceLiveAgentConfig {
736    // Required. The organization ID of the Salesforce account.
737    string organization_id = 1 [(google.api.field_behavior) = REQUIRED];
738
739    // Required. Live Agent deployment ID.
740    string deployment_id = 2 [(google.api.field_behavior) = REQUIRED];
741
742    // Required. Live Agent chat button ID.
743    string button_id = 3 [(google.api.field_behavior) = REQUIRED];
744
745    // Required. Domain of the Live Agent endpoint for this agent. You can find
746    // the endpoint URL in the `Live Agent settings` page. For example if URL
747    // has the form https://d.la4-c2-phx.salesforceliveagent.com/...,
748    // you should fill in d.la4-c2-phx.salesforceliveagent.com.
749    string endpoint_domain = 4 [(google.api.field_behavior) = REQUIRED];
750  }
751
752  // Required. Specifies which agent service to connect for human agent handoff.
753  oneof agent_service {
754    // Uses LivePerson (https://www.liveperson.com).
755    LivePersonConfig live_person_config = 1;
756
757    // Uses Salesforce Live Agent.
758    SalesforceLiveAgentConfig salesforce_live_agent_config = 2;
759  }
760}
761
762// Defines notification behavior.
763message NotificationConfig {
764  // Format of cloud pub/sub message.
765  enum MessageFormat {
766    // If it is unspecified, PROTO will be used.
767    MESSAGE_FORMAT_UNSPECIFIED = 0;
768
769    // Pub/Sub message will be serialized proto.
770    PROTO = 1;
771
772    // Pub/Sub message will be json.
773    JSON = 2;
774  }
775
776  // Name of the Pub/Sub topic to publish conversation
777  // events like
778  // [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED]
779  // as serialized
780  // [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos.
781  //
782  // For telephony integration to receive notification, make sure either this
783  // topic is in the same project as the conversation or you grant
784  // `service-<Conversation Project
785  // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service
786  // Agent` role in the topic project.
787  //
788  // For chat integration to receive notification, make sure API caller has been
789  // granted the `Dialogflow Service Agent` role for the topic.
790  //
791  // Format: `projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>`.
792  string topic = 1;
793
794  // Format of message.
795  MessageFormat message_format = 2;
796}
797
798// Defines logging behavior for conversation lifecycle events.
799message LoggingConfig {
800  // Whether to log conversation events like
801  // [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED]
802  // to Stackdriver in the conversation project as JSON format
803  // [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos.
804  bool enable_stackdriver_logging = 3;
805}
806
807// The type of Human Agent Assistant API suggestion to perform, and the maximum
808// number of results to return for that type. Multiple `Feature` objects can
809// be specified in the `features` list.
810message SuggestionFeature {
811  // Defines the type of Human Agent Assistant feature.
812  enum Type {
813    // Unspecified feature type.
814    TYPE_UNSPECIFIED = 0;
815
816    // Run article suggestion model for chat.
817    ARTICLE_SUGGESTION = 1;
818
819    // Run FAQ model for chat.
820    FAQ = 2;
821
822    // Run smart reply model for chat.
823    SMART_REPLY = 3;
824
825    // Run knowledge search with text input from agent or text generated query.
826    KNOWLEDGE_SEARCH = 14;
827  }
828
829  // Type of Human Agent Assistant API feature to request.
830  Type type = 1;
831}
832
833// The request message for
834// [ConversationProfiles.SetSuggestionFeature][].
835message SetSuggestionFeatureConfigRequest {
836  // Required. The Conversation Profile to add or update the suggestion feature
837  // config. Format: `projects/<Project ID>/locations/<Location
838  // ID>/conversationProfiles/<Conversation Profile ID>`.
839  string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED];
840
841  // Required. The participant role to add or update the suggestion feature
842  // config. Only HUMAN_AGENT or END_USER can be used.
843  Participant.Role participant_role = 2
844      [(google.api.field_behavior) = REQUIRED];
845
846  // Required. The suggestion feature config to add or update.
847  HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config =
848      3 [(google.api.field_behavior) = REQUIRED];
849}
850
851// The request message for [ConversationProfiles.ClearFeature][].
852message ClearSuggestionFeatureConfigRequest {
853  // Required. The Conversation Profile to add or update the suggestion feature
854  // config. Format: `projects/<Project ID>/locations/<Location
855  // ID>/conversationProfiles/<Conversation Profile ID>`.
856  string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED];
857
858  // Required. The participant role to remove the suggestion feature
859  // config. Only HUMAN_AGENT or END_USER can be used.
860  Participant.Role participant_role = 2
861      [(google.api.field_behavior) = REQUIRED];
862
863  // Required. The type of the suggestion feature to remove.
864  SuggestionFeature.Type suggestion_feature_type = 3
865      [(google.api.field_behavior) = REQUIRED];
866}
867
868// Metadata for a [ConversationProfile.SetSuggestionFeatureConfig][]
869// operation.
870message SetSuggestionFeatureConfigOperationMetadata {
871  // The resource name of the conversation profile. Format:
872  // `projects/<Project ID>/locations/<Location
873  // ID>/conversationProfiles/<Conversation Profile ID>`
874  string conversation_profile = 1;
875
876  // Required. The participant role to add or update the suggestion feature
877  // config. Only HUMAN_AGENT or END_USER can be used.
878  Participant.Role participant_role = 2
879      [(google.api.field_behavior) = REQUIRED];
880
881  // Required. The type of the suggestion feature to add or update.
882  SuggestionFeature.Type suggestion_feature_type = 3
883      [(google.api.field_behavior) = REQUIRED];
884
885  // Timestamp whe the request was created. The time is measured on server side.
886  google.protobuf.Timestamp create_time = 4;
887}
888
889// Metadata for a [ConversationProfile.ClearSuggestionFeatureConfig][]
890// operation.
891message ClearSuggestionFeatureConfigOperationMetadata {
892  // The resource name of the conversation profile. Format:
893  // `projects/<Project ID>/locations/<Location
894  // ID>/conversationProfiles/<Conversation Profile ID>`
895  string conversation_profile = 1;
896
897  // Required. The participant role to remove the suggestion feature
898  // config. Only HUMAN_AGENT or END_USER can be used.
899  Participant.Role participant_role = 2
900      [(google.api.field_behavior) = REQUIRED];
901
902  // Required. The type of the suggestion feature to remove.
903  SuggestionFeature.Type suggestion_feature_type = 3
904      [(google.api.field_behavior) = REQUIRED];
905
906  // Timestamp whe the request was created. The time is measured on server side.
907  google.protobuf.Timestamp create_time = 4;
908}
909