conversation_profile.proto 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.dialogflow.v2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/dialogflow/v2/audio_config.proto";
  21. import "google/cloud/dialogflow/v2/participant.proto";
  22. import "google/longrunning/operations.proto";
  23. import "google/protobuf/empty.proto";
  24. import "google/protobuf/field_mask.proto";
  25. import "google/protobuf/timestamp.proto";
  26. option cc_enable_arenas = true;
  27. option csharp_namespace = "Google.Cloud.Dialogflow.V2";
  28. option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
  29. option java_multiple_files = true;
  30. option java_outer_classname = "ConversationProfileProto";
  31. option java_package = "com.google.cloud.dialogflow.v2";
  32. option objc_class_prefix = "DF";
  33. option (google.api.resource_definition) = {
  34. type: "dialogflow.googleapis.com/CXSecuritySettings"
  35. pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}"
  36. };
  37. // Service for managing [ConversationProfiles][google.cloud.dialogflow.v2.ConversationProfile].
  38. service ConversationProfiles {
  39. option (google.api.default_host) = "dialogflow.googleapis.com";
  40. option (google.api.oauth_scopes) =
  41. "https://www.googleapis.com/auth/cloud-platform,"
  42. "https://www.googleapis.com/auth/dialogflow";
  43. // Returns the list of all conversation profiles in the specified project.
  44. rpc ListConversationProfiles(ListConversationProfilesRequest) returns (ListConversationProfilesResponse) {
  45. option (google.api.http) = {
  46. get: "/v2/{parent=projects/*}/conversationProfiles"
  47. additional_bindings {
  48. get: "/v2/{parent=projects/*/locations/*}/conversationProfiles"
  49. }
  50. };
  51. option (google.api.method_signature) = "parent";
  52. }
  53. // Retrieves the specified conversation profile.
  54. rpc GetConversationProfile(GetConversationProfileRequest) returns (ConversationProfile) {
  55. option (google.api.http) = {
  56. get: "/v2/{name=projects/*/conversationProfiles/*}"
  57. additional_bindings {
  58. get: "/v2/{name=projects/*/locations/*/conversationProfiles/*}"
  59. }
  60. };
  61. option (google.api.method_signature) = "name";
  62. }
  63. // Creates a conversation profile in the specified project.
  64. //
  65. // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][]
  66. // aren't populated in the response. You can retrieve them via
  67. // [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API.
  68. rpc CreateConversationProfile(CreateConversationProfileRequest) returns (ConversationProfile) {
  69. option (google.api.http) = {
  70. post: "/v2/{parent=projects/*}/conversationProfiles"
  71. body: "conversation_profile"
  72. additional_bindings {
  73. post: "/v2/{parent=projects/*/locations/*}/conversationProfiles"
  74. body: "conversation_profile"
  75. }
  76. };
  77. option (google.api.method_signature) = "parent,conversation_profile";
  78. }
  79. // Updates the specified conversation profile.
  80. //
  81. // [ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][]
  82. // aren't populated in the response. You can retrieve them via
  83. // [GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile] API.
  84. rpc UpdateConversationProfile(UpdateConversationProfileRequest) returns (ConversationProfile) {
  85. option (google.api.http) = {
  86. patch: "/v2/{conversation_profile.name=projects/*/conversationProfiles/*}"
  87. body: "conversation_profile"
  88. additional_bindings {
  89. patch: "/v2/{conversation_profile.name=projects/*/locations/*/conversationProfiles/*}"
  90. body: "conversation_profile"
  91. }
  92. };
  93. option (google.api.method_signature) = "conversation_profile,update_mask";
  94. }
  95. // Deletes the specified conversation profile.
  96. rpc DeleteConversationProfile(DeleteConversationProfileRequest) returns (google.protobuf.Empty) {
  97. option (google.api.http) = {
  98. delete: "/v2/{name=projects/*/conversationProfiles/*}"
  99. additional_bindings {
  100. delete: "/v2/{name=projects/*/locations/*/conversationProfiles/*}"
  101. }
  102. };
  103. option (google.api.method_signature) = "name";
  104. }
  105. // Adds or updates a suggestion feature in a conversation profile.
  106. // If the conversation profile contains the type of suggestion feature for
  107. // the participant role, it will update it. Otherwise it will insert the
  108. // suggestion feature.
  109. //
  110. // This method is a [long-running
  111. // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
  112. // The returned `Operation` type has the following method-specific fields:
  113. //
  114. // - `metadata`: [SetSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.SetSuggestionFeatureConfigOperationMetadata]
  115. // - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]
  116. //
  117. // If a long running operation to add or update suggestion feature
  118. // config for the same conversation profile, participant role and suggestion
  119. // feature type exists, please cancel the existing long running operation
  120. // before sending such request, otherwise the request will be rejected.
  121. rpc SetSuggestionFeatureConfig(SetSuggestionFeatureConfigRequest) returns (google.longrunning.Operation) {
  122. option (google.api.http) = {
  123. post: "/v2/{conversation_profile=projects/*/conversationProfiles/*}:setSuggestionFeatureConfig"
  124. body: "*"
  125. additional_bindings {
  126. post: "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:setSuggestionFeatureConfig"
  127. body: "*"
  128. }
  129. };
  130. option (google.api.method_signature) = "conversation_profile";
  131. option (google.longrunning.operation_info) = {
  132. response_type: "ConversationProfile"
  133. metadata_type: "SetSuggestionFeatureConfigOperationMetadata"
  134. };
  135. }
  136. // Clears a suggestion feature from a conversation profile for the given
  137. // participant role.
  138. //
  139. // This method is a [long-running
  140. // operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
  141. // The returned `Operation` type has the following method-specific fields:
  142. //
  143. // - `metadata`: [ClearSuggestionFeatureConfigOperationMetadata][google.cloud.dialogflow.v2.ClearSuggestionFeatureConfigOperationMetadata]
  144. // - `response`: [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile]
  145. rpc ClearSuggestionFeatureConfig(ClearSuggestionFeatureConfigRequest) returns (google.longrunning.Operation) {
  146. option (google.api.http) = {
  147. post: "/v2/{conversation_profile=projects/*/conversationProfiles/*}:clearSuggestionFeatureConfig"
  148. body: "*"
  149. additional_bindings {
  150. post: "/v2/{conversation_profile=projects/*/locations/*/conversationProfiles/*}:clearSuggestionFeatureConfig"
  151. body: "*"
  152. }
  153. };
  154. option (google.api.method_signature) = "conversation_profile";
  155. option (google.longrunning.operation_info) = {
  156. response_type: "ConversationProfile"
  157. metadata_type: "ClearSuggestionFeatureConfigOperationMetadata"
  158. };
  159. }
  160. }
  161. // Defines the services to connect to incoming Dialogflow conversations.
  162. message ConversationProfile {
  163. option (google.api.resource) = {
  164. type: "dialogflow.googleapis.com/ConversationProfile"
  165. pattern: "projects/{project}/conversationProfiles/{conversation_profile}"
  166. pattern: "projects/{project}/locations/{location}/conversationProfiles/{conversation_profile}"
  167. };
  168. // The unique identifier of this conversation profile.
  169. // Format: `projects/<Project ID>/locations/<Location
  170. // ID>/conversationProfiles/<Conversation Profile ID>`.
  171. string name = 1;
  172. // Required. Human readable name for this profile. Max length 1024 bytes.
  173. string display_name = 2 [(google.api.field_behavior) = REQUIRED];
  174. // Output only. Create time of the conversation profile.
  175. google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  176. // Output only. Update time of the conversation profile.
  177. google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  178. // Configuration for an automated agent to use with this profile.
  179. AutomatedAgentConfig automated_agent_config = 3;
  180. // Configuration for agent assistance to use with this profile.
  181. HumanAgentAssistantConfig human_agent_assistant_config = 4;
  182. // Configuration for connecting to a live agent.
  183. //
  184. // Currently, this feature is not general available, please contact Google
  185. // to get access.
  186. HumanAgentHandoffConfig human_agent_handoff_config = 5;
  187. // Configuration for publishing conversation lifecycle events.
  188. NotificationConfig notification_config = 6;
  189. // Configuration for logging conversation lifecycle events.
  190. LoggingConfig logging_config = 7;
  191. // Configuration for publishing new message events. Event will be sent in
  192. // format of [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent]
  193. NotificationConfig new_message_event_notification_config = 8;
  194. // Settings for speech transcription.
  195. SpeechToTextConfig stt_config = 9;
  196. // Language code for the conversation profile. If not specified, the language
  197. // is en-US. Language at ConversationProfile should be set for all non en-US
  198. // languages.
  199. // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
  200. // language tag. Example: "en-US".
  201. string language_code = 10;
  202. // The time zone of this conversational profile from the
  203. // [time zone database](https://www.iana.org/time-zones), e.g.,
  204. // America/New_York, Europe/Paris. Defaults to America/New_York.
  205. string time_zone = 14;
  206. // Name of the CX SecuritySettings reference for the agent.
  207. // Format: `projects/<Project ID>/locations/<Location
  208. // ID>/securitySettings/<Security Settings ID>`.
  209. string security_settings = 13 [(google.api.resource_reference) = {
  210. type: "dialogflow.googleapis.com/CXSecuritySettings"
  211. }];
  212. }
  213. // The request message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles].
  214. message ListConversationProfilesRequest {
  215. // Required. The project to list all conversation profiles from.
  216. // Format: `projects/<Project ID>/locations/<Location ID>`.
  217. string parent = 1 [
  218. (google.api.field_behavior) = REQUIRED,
  219. (google.api.resource_reference) = {
  220. child_type: "dialogflow.googleapis.com/ConversationProfile"
  221. }
  222. ];
  223. // The maximum number of items to return in a single page. By
  224. // default 100 and at most 1000.
  225. int32 page_size = 2;
  226. // The next_page_token value returned from a previous list request.
  227. string page_token = 3;
  228. }
  229. // The response message for [ConversationProfiles.ListConversationProfiles][google.cloud.dialogflow.v2.ConversationProfiles.ListConversationProfiles].
  230. message ListConversationProfilesResponse {
  231. // The list of project conversation profiles. There is a maximum number
  232. // of items returned based on the page_size field in the request.
  233. repeated ConversationProfile conversation_profiles = 1;
  234. // Token to retrieve the next page of results, or empty if there are no
  235. // more results in the list.
  236. string next_page_token = 2;
  237. }
  238. // The request message for [ConversationProfiles.GetConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.GetConversationProfile].
  239. message GetConversationProfileRequest {
  240. // Required. The resource name of the conversation profile.
  241. // Format: `projects/<Project ID>/locations/<Location
  242. // ID>/conversationProfiles/<Conversation Profile ID>`.
  243. string name = 1 [
  244. (google.api.field_behavior) = REQUIRED,
  245. (google.api.resource_reference) = {
  246. type: "dialogflow.googleapis.com/ConversationProfile"
  247. }
  248. ];
  249. }
  250. // The request message for [ConversationProfiles.CreateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.CreateConversationProfile].
  251. message CreateConversationProfileRequest {
  252. // Required. The project to create a conversation profile for.
  253. // Format: `projects/<Project ID>/locations/<Location ID>`.
  254. string parent = 1 [
  255. (google.api.field_behavior) = REQUIRED,
  256. (google.api.resource_reference) = {
  257. child_type: "dialogflow.googleapis.com/ConversationProfile"
  258. }
  259. ];
  260. // Required. The conversation profile to create.
  261. ConversationProfile conversation_profile = 2 [(google.api.field_behavior) = REQUIRED];
  262. }
  263. // The request message for [ConversationProfiles.UpdateConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.UpdateConversationProfile].
  264. message UpdateConversationProfileRequest {
  265. // Required. The conversation profile to update.
  266. ConversationProfile conversation_profile = 1 [(google.api.field_behavior) = REQUIRED];
  267. // Required. The mask to control which fields to update.
  268. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  269. }
  270. // The request message for [ConversationProfiles.DeleteConversationProfile][google.cloud.dialogflow.v2.ConversationProfiles.DeleteConversationProfile].
  271. //
  272. // This operation fails if the conversation profile is still referenced from
  273. // a phone number.
  274. message DeleteConversationProfileRequest {
  275. // Required. The name of the conversation profile to delete.
  276. // Format: `projects/<Project ID>/locations/<Location
  277. // ID>/conversationProfiles/<Conversation Profile ID>`.
  278. string name = 1 [
  279. (google.api.field_behavior) = REQUIRED,
  280. (google.api.resource_reference) = {
  281. type: "dialogflow.googleapis.com/ConversationProfile"
  282. }
  283. ];
  284. }
  285. // Defines the Automated Agent to connect to a conversation.
  286. message AutomatedAgentConfig {
  287. // Required. ID of the Dialogflow agent environment to use.
  288. //
  289. // This project needs to either be the same project as the conversation or you
  290. // need to grant `service-<Conversation Project
  291. // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
  292. // Service Agent` role in this project.
  293. //
  294. // - For ES agents, use format: `projects/<Project ID>/locations/<Location
  295. // ID>/agent/environments/<Environment ID or '-'>`. If environment is not
  296. // specified, the default `draft` environment is used. Refer to
  297. // [DetectIntentRequest](/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest)
  298. // for more details.
  299. //
  300. // - For CX agents, use format `projects/<Project ID>/locations/<Location
  301. // ID>/agents/<Agent ID>/environments/<Environment ID
  302. // or '-'>`. If environment is not specified, the default `draft` environment
  303. // is used.
  304. string agent = 1 [
  305. (google.api.field_behavior) = REQUIRED,
  306. (google.api.resource_reference) = {
  307. type: "dialogflow.googleapis.com/Agent"
  308. }
  309. ];
  310. }
  311. // Defines the Human Agent Assist to connect to a conversation.
  312. message HumanAgentAssistantConfig {
  313. // Settings of suggestion trigger.
  314. message SuggestionTriggerSettings {
  315. // Do not trigger if last utterance is small talk.
  316. bool no_smalltalk = 1;
  317. // Only trigger suggestion if participant role of last utterance is
  318. // END_USER.
  319. bool only_end_user = 2;
  320. }
  321. // Config for suggestion features.
  322. message SuggestionFeatureConfig {
  323. // The suggestion feature.
  324. SuggestionFeature suggestion_feature = 5;
  325. // Automatically iterates all participants and tries to compile
  326. // suggestions.
  327. //
  328. // Supported features: ARTICLE_SUGGESTION, FAQ, DIALOGFLOW_ASSIST.
  329. bool enable_event_based_suggestion = 3;
  330. // Settings of suggestion trigger.
  331. //
  332. // Currently, only ARTICLE_SUGGESTION and FAQ will use this field.
  333. SuggestionTriggerSettings suggestion_trigger_settings = 10;
  334. // Configs of query.
  335. SuggestionQueryConfig query_config = 6;
  336. // Configs of custom conversation model.
  337. ConversationModelConfig conversation_model_config = 7;
  338. // Configs for processing conversation.
  339. ConversationProcessConfig conversation_process_config = 8;
  340. }
  341. // Detail human agent assistant config.
  342. message SuggestionConfig {
  343. // Configuration of different suggestion features. One feature can have only
  344. // one config.
  345. repeated SuggestionFeatureConfig feature_configs = 2;
  346. // If `group_suggestion_responses` is false, and there are multiple
  347. // `feature_configs` in `event based suggestion` or
  348. // StreamingAnalyzeContent, we will try to deliver suggestions to customers
  349. // as soon as we get new suggestion. Different type of suggestions based on
  350. // the same context will be in separate Pub/Sub event or
  351. // `StreamingAnalyzeContentResponse`.
  352. //
  353. // If `group_suggestion_responses` set to true. All the suggestions to the
  354. // same participant based on the same context will be grouped into a single
  355. // Pub/Sub event or StreamingAnalyzeContentResponse.
  356. bool group_suggestion_responses = 3;
  357. }
  358. // Config for suggestion query.
  359. message SuggestionQueryConfig {
  360. // Knowledge base source settings.
  361. //
  362. // Supported features: ARTICLE_SUGGESTION, FAQ.
  363. message KnowledgeBaseQuerySource {
  364. // Required. Knowledge bases to query. Format:
  365. // `projects/<Project ID>/locations/<Location
  366. // ID>/knowledgeBases/<Knowledge Base ID>`. Currently, at most 5 knowledge
  367. // bases are supported.
  368. repeated string knowledge_bases = 1 [
  369. (google.api.field_behavior) = REQUIRED,
  370. (google.api.resource_reference) = {
  371. type: "dialogflow.googleapis.com/KnowledgeBase"
  372. }
  373. ];
  374. }
  375. // Document source settings.
  376. //
  377. // Supported features: SMART_REPLY, SMART_COMPOSE.
  378. message DocumentQuerySource {
  379. // Required. Knowledge documents to query from. Format:
  380. // `projects/<Project ID>/locations/<Location
  381. // ID>/knowledgeBases/<KnowledgeBase ID>/documents/<Document ID>`.
  382. // Currently, at most 5 documents are supported.
  383. repeated string documents = 1 [
  384. (google.api.field_behavior) = REQUIRED,
  385. (google.api.resource_reference) = {
  386. type: "dialogflow.googleapis.com/Document"
  387. }
  388. ];
  389. }
  390. // Dialogflow source setting.
  391. //
  392. // Supported feature: DIALOGFLOW_ASSIST.
  393. message DialogflowQuerySource {
  394. // Required. The name of a Dialogflow virtual agent used for end user side intent
  395. // detection and suggestion. Format: `projects/<Project Number/
  396. // ID>/locations/<Location ID>/agent`. When multiple agents are allowed in
  397. // the same Dialogflow project.
  398. string agent = 1 [
  399. (google.api.field_behavior) = REQUIRED,
  400. (google.api.resource_reference) = {
  401. type: "dialogflow.googleapis.com/Agent"
  402. }
  403. ];
  404. }
  405. // Settings that determine how to filter recent conversation context when
  406. // generating suggestions.
  407. message ContextFilterSettings {
  408. // If set to true, the last message from virtual agent (hand off message)
  409. // and the message before it (trigger message of hand off) are dropped.
  410. bool drop_handoff_messages = 1;
  411. // If set to true, all messages from virtual agent are dropped.
  412. bool drop_virtual_agent_messages = 2;
  413. // If set to true, all messages from ivr stage are dropped.
  414. bool drop_ivr_messages = 3;
  415. }
  416. // Source of query.
  417. oneof query_source {
  418. // Query from knowledgebase. It is used by:
  419. // ARTICLE_SUGGESTION, FAQ.
  420. KnowledgeBaseQuerySource knowledge_base_query_source = 1;
  421. // Query from knowledge base document. It is used by:
  422. // SMART_REPLY, SMART_COMPOSE.
  423. DocumentQuerySource document_query_source = 2;
  424. // Query from Dialogflow agent. It is used by DIALOGFLOW_ASSIST.
  425. DialogflowQuerySource dialogflow_query_source = 3;
  426. }
  427. // Maximum number of results to return. Currently, if unset, defaults to 10.
  428. // And the max number is 20.
  429. int32 max_results = 4;
  430. // Confidence threshold of query result.
  431. //
  432. // Agent Assist gives each suggestion a score in the range [0.0, 1.0], based
  433. // on the relevance between the suggestion and the current conversation
  434. // context. A score of 0.0 has no relevance, while a score of 1.0 has high
  435. // relevance. Only suggestions with a score greater than or equal to the
  436. // value of this field are included in the results.
  437. //
  438. // For a baseline model (the default), the recommended value is in the range
  439. // [0.05, 0.1].
  440. //
  441. // For a custom model, there is no recommended value. Tune this value by
  442. // starting from a very low value and slowly increasing until you have
  443. // desired results.
  444. //
  445. // If this field is not set, it defaults to 0.0, which means that all
  446. // suggestions are returned.
  447. //
  448. // Supported features: ARTICLE_SUGGESTION, FAQ, SMART_REPLY, SMART_COMPOSE.
  449. float confidence_threshold = 5;
  450. // Determines how recent conversation context is filtered when generating
  451. // suggestions. If unspecified, no messages will be dropped.
  452. ContextFilterSettings context_filter_settings = 7;
  453. }
  454. // Custom conversation models used in agent assist feature.
  455. //
  456. // Supported feature: ARTICLE_SUGGESTION, SMART_COMPOSE, SMART_REPLY,
  457. // CONVERSATION_SUMMARIZATION.
  458. message ConversationModelConfig {
  459. // Conversation model resource name. Format: `projects/<Project
  460. // ID>/conversationModels/<Model ID>`.
  461. string model = 1 [(google.api.resource_reference) = {
  462. type: "dialogflow.googleapis.com/ConversationModel"
  463. }];
  464. }
  465. // Config to process conversation.
  466. message ConversationProcessConfig {
  467. // Number of recent non-small-talk sentences to use as context for article
  468. // and FAQ suggestion
  469. int32 recent_sentences_count = 2;
  470. }
  471. // Configuration for analyses to run on each conversation message.
  472. message MessageAnalysisConfig {
  473. // Enable entity extraction in conversation messages on [agent assist
  474. // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
  475. // If unspecified, defaults to false.
  476. //
  477. // Currently, this feature is not general available, please contact Google
  478. // to get access.
  479. bool enable_entity_extraction = 2;
  480. // Enable sentiment analysis in conversation messages on [agent assist
  481. // stage](https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages).
  482. // If unspecified, defaults to false. Sentiment analysis inspects user input
  483. // and identifies the prevailing subjective opinion, especially to determine
  484. // a user's attitude as positive, negative, or neutral:
  485. // https://cloud.google.com/natural-language/docs/basics#sentiment_analysis
  486. // For [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent] method, result will be in
  487. // [StreamingAnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.StreamingAnalyzeContentResponse.message].
  488. // For [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] method, result will be in
  489. // [AnalyzeContentResponse.message.SentimentAnalysisResult][google.cloud.dialogflow.v2.AnalyzeContentResponse.message]
  490. // For [Conversations.ListMessages][google.cloud.dialogflow.v2.Conversations.ListMessages] method, result will be in
  491. // [ListMessagesResponse.messages.SentimentAnalysisResult][google.cloud.dialogflow.v2.ListMessagesResponse.messages]
  492. // If Pub/Sub notification is configured, result will be in
  493. // [ConversationEvent.new_message_payload.SentimentAnalysisResult][google.cloud.dialogflow.v2.ConversationEvent.new_message_payload].
  494. bool enable_sentiment_analysis = 3;
  495. }
  496. // Pub/Sub topic on which to publish new agent assistant events.
  497. NotificationConfig notification_config = 2;
  498. // Configuration for agent assistance of human agent participant.
  499. SuggestionConfig human_agent_suggestion_config = 3;
  500. // Configuration for agent assistance of end user participant.
  501. //
  502. // Currently, this feature is not general available, please contact Google
  503. // to get access.
  504. SuggestionConfig end_user_suggestion_config = 4;
  505. // Configuration for message analysis.
  506. MessageAnalysisConfig message_analysis_config = 5;
  507. }
  508. // Defines the hand off to a live agent, typically on which external agent
  509. // service provider to connect to a conversation.
  510. //
  511. // Currently, this feature is not general available, please contact Google
  512. // to get access.
  513. message HumanAgentHandoffConfig {
  514. // Configuration specific to LivePerson (https://www.liveperson.com).
  515. message LivePersonConfig {
  516. // Required. Account number of the LivePerson account to connect. This is
  517. // the account number you input at the login page.
  518. string account_number = 1 [(google.api.field_behavior) = REQUIRED];
  519. }
  520. // Configuration specific to Salesforce Live Agent.
  521. message SalesforceLiveAgentConfig {
  522. // Required. The organization ID of the Salesforce account.
  523. string organization_id = 1 [(google.api.field_behavior) = REQUIRED];
  524. // Required. Live Agent deployment ID.
  525. string deployment_id = 2 [(google.api.field_behavior) = REQUIRED];
  526. // Required. Live Agent chat button ID.
  527. string button_id = 3 [(google.api.field_behavior) = REQUIRED];
  528. // Required. Domain of the Live Agent endpoint for this agent. You can find
  529. // the endpoint URL in the `Live Agent settings` page. For example if URL
  530. // has the form https://d.la4-c2-phx.salesforceliveagent.com/...,
  531. // you should fill in d.la4-c2-phx.salesforceliveagent.com.
  532. string endpoint_domain = 4 [(google.api.field_behavior) = REQUIRED];
  533. }
  534. // Required. Specifies which agent service to connect for human agent handoff.
  535. oneof agent_service {
  536. // Uses LivePerson (https://www.liveperson.com).
  537. LivePersonConfig live_person_config = 1;
  538. // Uses Salesforce Live Agent.
  539. SalesforceLiveAgentConfig salesforce_live_agent_config = 2;
  540. }
  541. }
  542. // Defines notification behavior.
  543. message NotificationConfig {
  544. // Format of cloud pub/sub message.
  545. enum MessageFormat {
  546. // If it is unspecified, PROTO will be used.
  547. MESSAGE_FORMAT_UNSPECIFIED = 0;
  548. // Pub/Sub message will be serialized proto.
  549. PROTO = 1;
  550. // Pub/Sub message will be json.
  551. JSON = 2;
  552. }
  553. // Name of the Pub/Sub topic to publish conversation
  554. // events like
  555. // [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] as
  556. // serialized [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos.
  557. //
  558. // For telephony integration to receive notification, make sure either this
  559. // topic is in the same project as the conversation or you grant
  560. // `service-<Conversation Project
  561. // Number>@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow Service
  562. // Agent` role in the topic project.
  563. //
  564. // For chat integration to receive notification, make sure API caller has been
  565. // granted the `Dialogflow Service Agent` role for the topic.
  566. //
  567. // Format: `projects/<Project ID>/locations/<Location ID>/topics/<Topic ID>`.
  568. string topic = 1;
  569. // Format of message.
  570. MessageFormat message_format = 2;
  571. }
  572. // Defines logging behavior for conversation lifecycle events.
  573. message LoggingConfig {
  574. // Whether to log conversation events like
  575. // [CONVERSATION_STARTED][google.cloud.dialogflow.v2.ConversationEvent.Type.CONVERSATION_STARTED] to
  576. // Stackdriver in the conversation project as JSON format
  577. // [ConversationEvent][google.cloud.dialogflow.v2.ConversationEvent] protos.
  578. bool enable_stackdriver_logging = 3;
  579. }
  580. // The type of Human Agent Assistant API suggestion to perform, and the maximum
  581. // number of results to return for that type. Multiple `Feature` objects can
  582. // be specified in the `features` list.
  583. message SuggestionFeature {
  584. // Defines the type of Human Agent Assistant feature.
  585. enum Type {
  586. // Unspecified feature type.
  587. TYPE_UNSPECIFIED = 0;
  588. // Run article suggestion model for chat.
  589. ARTICLE_SUGGESTION = 1;
  590. // Run FAQ model for chat.
  591. FAQ = 2;
  592. // Run smart reply model for chat.
  593. SMART_REPLY = 3;
  594. }
  595. // Type of Human Agent Assistant API feature to request.
  596. Type type = 1;
  597. }
  598. // The request message for
  599. // [ConversationProfiles.SetSuggestionFeature][].
  600. message SetSuggestionFeatureConfigRequest {
  601. // Required. The Conversation Profile to add or update the suggestion feature
  602. // config. Format: `projects/<Project ID>/locations/<Location
  603. // ID>/conversationProfiles/<Conversation Profile ID>`.
  604. string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED];
  605. // Required. The participant role to add or update the suggestion feature
  606. // config. Only HUMAN_AGENT or END_USER can be used.
  607. Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED];
  608. // Required. The suggestion feature config to add or update.
  609. HumanAgentAssistantConfig.SuggestionFeatureConfig suggestion_feature_config = 3 [(google.api.field_behavior) = REQUIRED];
  610. }
  611. // The request message for [ConversationProfiles.ClearFeature][].
  612. message ClearSuggestionFeatureConfigRequest {
  613. // Required. The Conversation Profile to add or update the suggestion feature
  614. // config. Format: `projects/<Project ID>/locations/<Location
  615. // ID>/conversationProfiles/<Conversation Profile ID>`.
  616. string conversation_profile = 1 [(google.api.field_behavior) = REQUIRED];
  617. // Required. The participant role to remove the suggestion feature
  618. // config. Only HUMAN_AGENT or END_USER can be used.
  619. Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED];
  620. // Required. The type of the suggestion feature to remove.
  621. SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior) = REQUIRED];
  622. }
  623. // Metadata for a [ConversationProfile.SetSuggestionFeatureConfig][]
  624. // operation.
  625. message SetSuggestionFeatureConfigOperationMetadata {
  626. // The resource name of the conversation profile. Format:
  627. // `projects/<Project ID>/locations/<Location
  628. // ID>/conversationProfiles/<Conversation Profile ID>`
  629. string conversation_profile = 1;
  630. // Required. The participant role to add or update the suggestion feature
  631. // config. Only HUMAN_AGENT or END_USER can be used.
  632. Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED];
  633. // Required. The type of the suggestion feature to add or update.
  634. SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior) = REQUIRED];
  635. // Timestamp whe the request was created. The time is measured on server side.
  636. google.protobuf.Timestamp create_time = 4;
  637. }
  638. // Metadata for a [ConversationProfile.ClearSuggestionFeatureConfig][]
  639. // operation.
  640. message ClearSuggestionFeatureConfigOperationMetadata {
  641. // The resource name of the conversation profile. Format:
  642. // `projects/<Project ID>/locations/<Location
  643. // ID>/conversationProfiles/<Conversation Profile ID>`
  644. string conversation_profile = 1;
  645. // Required. The participant role to remove the suggestion feature
  646. // config. Only HUMAN_AGENT or END_USER can be used.
  647. Participant.Role participant_role = 2 [(google.api.field_behavior) = REQUIRED];
  648. // Required. The type of the suggestion feature to remove.
  649. SuggestionFeature.Type suggestion_feature_type = 3 [(google.api.field_behavior) = REQUIRED];
  650. // Timestamp whe the request was created. The time is measured on server side.
  651. google.protobuf.Timestamp create_time = 4;
  652. }