participant.proto 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. // Copyright 2021 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/session.proto";
  22. import "google/protobuf/any.proto";
  23. import "google/protobuf/duration.proto";
  24. import "google/protobuf/field_mask.proto";
  25. import "google/protobuf/struct.proto";
  26. import "google/protobuf/timestamp.proto";
  27. import "google/rpc/status.proto";
  28. option cc_enable_arenas = true;
  29. option csharp_namespace = "Google.Cloud.Dialogflow.V2";
  30. option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
  31. option java_multiple_files = true;
  32. option java_outer_classname = "ParticipantProto";
  33. option java_package = "com.google.cloud.dialogflow.v2";
  34. option objc_class_prefix = "DF";
  35. // Service for managing [Participants][google.cloud.dialogflow.v2.Participant].
  36. service Participants {
  37. option (google.api.default_host) = "dialogflow.googleapis.com";
  38. option (google.api.oauth_scopes) =
  39. "https://www.googleapis.com/auth/cloud-platform,"
  40. "https://www.googleapis.com/auth/dialogflow";
  41. // Creates a new participant in a conversation.
  42. rpc CreateParticipant(CreateParticipantRequest) returns (Participant) {
  43. option (google.api.http) = {
  44. post: "/v2/{parent=projects/*/conversations/*}/participants"
  45. body: "participant"
  46. additional_bindings {
  47. post: "/v2/{parent=projects/*/locations/*/conversations/*}/participants"
  48. body: "participant"
  49. }
  50. };
  51. option (google.api.method_signature) = "parent,participant";
  52. }
  53. // Retrieves a conversation participant.
  54. rpc GetParticipant(GetParticipantRequest) returns (Participant) {
  55. option (google.api.http) = {
  56. get: "/v2/{name=projects/*/conversations/*/participants/*}"
  57. additional_bindings {
  58. get: "/v2/{name=projects/*/locations/*/conversations/*/participants/*}"
  59. }
  60. };
  61. option (google.api.method_signature) = "name";
  62. }
  63. // Returns the list of all participants in the specified conversation.
  64. rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse) {
  65. option (google.api.http) = {
  66. get: "/v2/{parent=projects/*/conversations/*}/participants"
  67. additional_bindings {
  68. get: "/v2/{parent=projects/*/locations/*/conversations/*}/participants"
  69. }
  70. };
  71. option (google.api.method_signature) = "parent";
  72. }
  73. // Updates the specified participant.
  74. rpc UpdateParticipant(UpdateParticipantRequest) returns (Participant) {
  75. option (google.api.http) = {
  76. patch: "/v2/{participant.name=projects/*/conversations/*/participants/*}"
  77. body: "participant"
  78. additional_bindings {
  79. patch: "/v2/{participant.name=projects/*/locations/*/conversations/*/participants/*}"
  80. body: "participant"
  81. }
  82. };
  83. option (google.api.method_signature) = "participant,update_mask";
  84. }
  85. // Adds a text (chat, for example), or audio (phone recording, for example)
  86. // message from a participant into the conversation.
  87. //
  88. // Note: Always use agent versions for production traffic
  89. // sent to virtual agents. See [Versions and
  90. // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
  91. rpc AnalyzeContent(AnalyzeContentRequest) returns (AnalyzeContentResponse) {
  92. option (google.api.http) = {
  93. post: "/v2/{participant=projects/*/conversations/*/participants/*}:analyzeContent"
  94. body: "*"
  95. additional_bindings {
  96. post: "/v2/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent"
  97. body: "*"
  98. }
  99. };
  100. option (google.api.method_signature) = "participant,text_input";
  101. option (google.api.method_signature) = "participant,event_input";
  102. }
  103. // Gets suggested articles for a participant based on specific historical
  104. // messages.
  105. rpc SuggestArticles(SuggestArticlesRequest) returns (SuggestArticlesResponse) {
  106. option (google.api.http) = {
  107. post: "/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles"
  108. body: "*"
  109. additional_bindings {
  110. post: "/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles"
  111. body: "*"
  112. }
  113. };
  114. option (google.api.method_signature) = "parent";
  115. }
  116. // Gets suggested faq answers for a participant based on specific historical
  117. // messages.
  118. rpc SuggestFaqAnswers(SuggestFaqAnswersRequest) returns (SuggestFaqAnswersResponse) {
  119. option (google.api.http) = {
  120. post: "/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers"
  121. body: "*"
  122. additional_bindings {
  123. post: "/v2/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers"
  124. body: "*"
  125. }
  126. };
  127. option (google.api.method_signature) = "parent";
  128. }
  129. }
  130. // Represents a conversation participant (human agent, virtual agent, end-user).
  131. message Participant {
  132. option (google.api.resource) = {
  133. type: "dialogflow.googleapis.com/Participant"
  134. pattern: "projects/{project}/conversations/{conversation}/participants/{participant}"
  135. pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}"
  136. };
  137. // Enumeration of the roles a participant can play in a conversation.
  138. enum Role {
  139. // Participant role not set.
  140. ROLE_UNSPECIFIED = 0;
  141. // Participant is a human agent.
  142. HUMAN_AGENT = 1;
  143. // Participant is an automated agent, such as a Dialogflow agent.
  144. AUTOMATED_AGENT = 2;
  145. // Participant is an end user that has called or chatted with
  146. // Dialogflow services.
  147. END_USER = 3;
  148. }
  149. // Optional. The unique identifier of this participant.
  150. // Format: `projects/<Project ID>/locations/<Location
  151. // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
  152. string name = 1 [(google.api.field_behavior) = OPTIONAL];
  153. // Immutable. The role this participant plays in the conversation. This field must be set
  154. // during participant creation and is then immutable.
  155. Role role = 2 [(google.api.field_behavior) = IMMUTABLE];
  156. // Optional. Label applied to streams representing this participant in SIPREC
  157. // XML metadata and SDP. This is used to assign transcriptions from that
  158. // media stream to this participant. This field can be updated.
  159. string sip_recording_media_label = 6 [(google.api.field_behavior) = OPTIONAL];
  160. }
  161. // Represents a message posted into a conversation.
  162. message Message {
  163. option (google.api.resource) = {
  164. type: "dialogflow.googleapis.com/Message"
  165. pattern: "projects/{project}/conversations/{conversation}/messages/{message}"
  166. pattern: "projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}"
  167. };
  168. // The unique identifier of the message.
  169. // Format: `projects/<Project ID>/locations/<Location
  170. // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
  171. string name = 1;
  172. // Required. The message content.
  173. string content = 2 [(google.api.field_behavior) = REQUIRED];
  174. // Optional. The message language.
  175. // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
  176. // language tag. Example: "en-US".
  177. string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
  178. // Output only. The participant that sends this message.
  179. string participant = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  180. // Output only. The role of the participant.
  181. Participant.Role participant_role = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  182. // Output only. The time when the message was created.
  183. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  184. // Output only. The annotation for the message.
  185. MessageAnnotation message_annotation = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  186. }
  187. // The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant].
  188. message CreateParticipantRequest {
  189. // Required. Resource identifier of the conversation adding the participant.
  190. // Format: `projects/<Project ID>/locations/<Location
  191. // ID>/conversations/<Conversation ID>`.
  192. string parent = 1 [
  193. (google.api.field_behavior) = REQUIRED,
  194. (google.api.resource_reference) = {
  195. child_type: "dialogflow.googleapis.com/Participant"
  196. }
  197. ];
  198. // Required. The participant to create.
  199. Participant participant = 2 [(google.api.field_behavior) = REQUIRED];
  200. }
  201. // The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant].
  202. message GetParticipantRequest {
  203. // Required. The name of the participant. Format:
  204. // `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
  205. // ID>/participants/<Participant ID>`.
  206. string name = 1 [
  207. (google.api.field_behavior) = REQUIRED,
  208. (google.api.resource_reference) = {
  209. type: "dialogflow.googleapis.com/Participant"
  210. }
  211. ];
  212. }
  213. // The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
  214. message ListParticipantsRequest {
  215. // Required. The conversation to list all participants from.
  216. // Format: `projects/<Project ID>/locations/<Location
  217. // ID>/conversations/<Conversation ID>`.
  218. string parent = 1 [
  219. (google.api.field_behavior) = REQUIRED,
  220. (google.api.resource_reference) = {
  221. child_type: "dialogflow.googleapis.com/Participant"
  222. }
  223. ];
  224. // Optional. The maximum number of items to return in a single page. By
  225. // default 100 and at most 1000.
  226. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  227. // Optional. The next_page_token value returned from a previous list request.
  228. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  229. }
  230. // The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
  231. message ListParticipantsResponse {
  232. // The list of participants. There is a maximum number of items
  233. // returned based on the page_size field in the request.
  234. repeated Participant participants = 1;
  235. // Token to retrieve the next page of results or empty if there are no
  236. // more results in the list.
  237. string next_page_token = 2;
  238. }
  239. // The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant].
  240. message UpdateParticipantRequest {
  241. // Required. The participant to update.
  242. Participant participant = 1 [(google.api.field_behavior) = REQUIRED];
  243. // Required. The mask to specify which fields to update.
  244. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
  245. }
  246. // The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
  247. message AnalyzeContentRequest {
  248. // Required. The name of the participant this text comes from.
  249. // Format: `projects/<Project ID>/locations/<Location
  250. // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
  251. string participant = 1 [
  252. (google.api.field_behavior) = REQUIRED,
  253. (google.api.resource_reference) = {
  254. type: "dialogflow.googleapis.com/Participant"
  255. }
  256. ];
  257. // Required. The input content.
  258. oneof input {
  259. // The natural language text to be processed.
  260. TextInput text_input = 6;
  261. // An input event to send to Dialogflow.
  262. EventInput event_input = 8;
  263. }
  264. // Speech synthesis configuration.
  265. // The speech synthesis settings for a virtual agent that may be configured
  266. // for the associated conversation profile are not used when calling
  267. // AnalyzeContent. If this configuration is not supplied, speech synthesis
  268. // is disabled.
  269. OutputAudioConfig reply_audio_config = 5;
  270. // Parameters for a Dialogflow virtual-agent query.
  271. QueryParameters query_params = 9;
  272. // A unique identifier for this request. Restricted to 36 ASCII characters.
  273. // A random UUID is recommended.
  274. // This request is only idempotent if a `request_id` is provided.
  275. string request_id = 11;
  276. }
  277. // The message in the response that indicates the parameters of DTMF.
  278. message DtmfParameters {
  279. // Indicates whether DTMF input can be handled in the next request.
  280. bool accepts_dtmf_input = 1;
  281. }
  282. // The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
  283. message AnalyzeContentResponse {
  284. // The output text content.
  285. // This field is set if the automated agent responded with text to show to
  286. // the user.
  287. string reply_text = 1;
  288. // The audio data bytes encoded as specified in the request.
  289. // This field is set if:
  290. //
  291. // - `reply_audio_config` was specified in the request, or
  292. // - The automated agent responded with audio to play to the user. In such
  293. // case, `reply_audio.config` contains settings used to synthesize the
  294. // speech.
  295. //
  296. // In some scenarios, multiple output audio fields may be present in the
  297. // response structure. In these cases, only the top-most-level audio output
  298. // has content.
  299. OutputAudio reply_audio = 2;
  300. // Only set if a Dialogflow automated agent has responded.
  301. // Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
  302. // and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
  303. // are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead.
  304. AutomatedAgentReply automated_agent_reply = 3;
  305. // Message analyzed by CCAI.
  306. Message message = 5;
  307. // The suggestions for most recent human agent. The order is the same as
  308. // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
  309. // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config].
  310. repeated SuggestionResult human_agent_suggestion_results = 6;
  311. // The suggestions for end user. The order is the same as
  312. // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
  313. // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config].
  314. repeated SuggestionResult end_user_suggestion_results = 7;
  315. // Indicates the parameters of DTMF.
  316. DtmfParameters dtmf_parameters = 9;
  317. }
  318. // The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
  319. message SuggestArticlesRequest {
  320. // Required. The name of the participant to fetch suggestion for.
  321. // Format: `projects/<Project ID>/locations/<Location
  322. // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
  323. string parent = 1 [
  324. (google.api.field_behavior) = REQUIRED,
  325. (google.api.resource_reference) = {
  326. type: "dialogflow.googleapis.com/Participant"
  327. }
  328. ];
  329. // The name of the latest conversation message to compile suggestion
  330. // for. If empty, it will be the latest message of the conversation.
  331. //
  332. // Format: `projects/<Project ID>/locations/<Location
  333. // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
  334. string latest_message = 2 [(google.api.resource_reference) = {
  335. type: "dialogflow.googleapis.com/Message"
  336. }];
  337. // Max number of messages prior to and including
  338. // [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context
  339. // when compiling the suggestion. By default 20 and at most 50.
  340. int32 context_size = 3;
  341. }
  342. // The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
  343. message SuggestArticlesResponse {
  344. // Articles ordered by score in descending order.
  345. repeated ArticleAnswer article_answers = 1;
  346. // The name of the latest conversation message used to compile
  347. // suggestion for.
  348. //
  349. // Format: `projects/<Project ID>/locations/<Location
  350. // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
  351. string latest_message = 2;
  352. // Number of messages prior to and including
  353. // [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the
  354. // suggestion. It may be smaller than the
  355. // [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there
  356. // aren't that many messages in the conversation.
  357. int32 context_size = 3;
  358. }
  359. // The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
  360. message SuggestFaqAnswersRequest {
  361. // Required. The name of the participant to fetch suggestion for.
  362. // Format: `projects/<Project ID>/locations/<Location
  363. // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
  364. string parent = 1 [
  365. (google.api.field_behavior) = REQUIRED,
  366. (google.api.resource_reference) = {
  367. type: "dialogflow.googleapis.com/Participant"
  368. }
  369. ];
  370. // The name of the latest conversation message to compile suggestion
  371. // for. If empty, it will be the latest message of the conversation.
  372. //
  373. // Format: `projects/<Project ID>/locations/<Location
  374. // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
  375. string latest_message = 2 [(google.api.resource_reference) = {
  376. type: "dialogflow.googleapis.com/Message"
  377. }];
  378. // Max number of messages prior to and including
  379. // [latest_message] to use as context when compiling the
  380. // suggestion. By default 20 and at most 50.
  381. int32 context_size = 3;
  382. }
  383. // The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
  384. message SuggestFaqAnswersResponse {
  385. // Answers extracted from FAQ documents.
  386. repeated FaqAnswer faq_answers = 1;
  387. // The name of the latest conversation message used to compile
  388. // suggestion for.
  389. //
  390. // Format: `projects/<Project ID>/locations/<Location
  391. // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
  392. string latest_message = 2;
  393. // Number of messages prior to and including
  394. // [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the
  395. // suggestion. It may be smaller than the
  396. // [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there
  397. // aren't that many messages in the conversation.
  398. int32 context_size = 3;
  399. }
  400. // Represents the natural language speech audio to be played to the end user.
  401. message OutputAudio {
  402. // Instructs the speech synthesizer how to generate the speech
  403. // audio.
  404. OutputAudioConfig config = 1;
  405. // The natural language speech audio.
  406. bytes audio = 2;
  407. }
  408. // Represents a response from an automated agent.
  409. message AutomatedAgentReply {
  410. // Represents different automated agent reply types.
  411. enum AutomatedAgentReplyType {
  412. // Not specified. This should never happen.
  413. AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0;
  414. // Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables
  415. // `return_partial_response` can be returned as partial reply.
  416. // WARNING: partial reply is not eligible for barge-in.
  417. PARTIAL = 1;
  418. // Final reply.
  419. FINAL = 2;
  420. }
  421. // Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call.
  422. DetectIntentResponse detect_intent_response = 1;
  423. // AutomatedAgentReply type.
  424. AutomatedAgentReplyType automated_agent_reply_type = 7;
  425. // Indicates whether the partial automated agent reply is interruptible when a
  426. // later reply message arrives. e.g. if the agent specified some music as
  427. // partial response, it can be cancelled.
  428. bool allow_cancellation = 8;
  429. }
  430. // Represents article answer.
  431. message ArticleAnswer {
  432. // The article title.
  433. string title = 1;
  434. // The article URI.
  435. string uri = 2;
  436. // Article snippets.
  437. repeated string snippets = 3;
  438. // Article match confidence.
  439. // The system's confidence score that this article is a good match for this
  440. // conversation, as a value from 0.0 (completely uncertain) to 1.0
  441. // (completely certain).
  442. float confidence = 4;
  443. // A map that contains metadata about the answer and the
  444. // document from which it originates.
  445. map<string, string> metadata = 5;
  446. // The name of answer record, in the format of
  447. // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
  448. // ID>"
  449. string answer_record = 6;
  450. }
  451. // Represents answer from "frequently asked questions".
  452. message FaqAnswer {
  453. // The piece of text from the `source` knowledge base document.
  454. string answer = 1;
  455. // The system's confidence score that this Knowledge answer is a good match
  456. // for this conversational query, range from 0.0 (completely uncertain)
  457. // to 1.0 (completely certain).
  458. float confidence = 2;
  459. // The corresponding FAQ question.
  460. string question = 3;
  461. // Indicates which Knowledge Document this answer was extracted
  462. // from.
  463. // Format: `projects/<Project ID>/locations/<Location
  464. // ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
  465. string source = 4;
  466. // A map that contains metadata about the answer and the
  467. // document from which it originates.
  468. map<string, string> metadata = 5;
  469. // The name of answer record, in the format of
  470. // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
  471. // ID>"
  472. string answer_record = 6;
  473. }
  474. // One response of different type of suggestion response which is used in
  475. // the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and
  476. // [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent].
  477. message SuggestionResult {
  478. // Different type of suggestion response.
  479. oneof suggestion_response {
  480. // Error status if the request failed.
  481. google.rpc.Status error = 1;
  482. // SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
  483. SuggestArticlesResponse suggest_articles_response = 2;
  484. // SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
  485. SuggestFaqAnswersResponse suggest_faq_answers_response = 3;
  486. }
  487. }
  488. // Represents a part of a message possibly annotated with an entity. The part
  489. // can be an entity or purely a part of the message between two entities or
  490. // message start/end.
  491. message AnnotatedMessagePart {
  492. // A part of a message possibly annotated with an entity.
  493. string text = 1;
  494. // The [Dialogflow system entity
  495. // type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
  496. // of this message part. If this is empty, Dialogflow could not annotate the
  497. // phrase part with a system entity.
  498. string entity_type = 2;
  499. // The [Dialogflow system entity formatted value
  500. // ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
  501. // this message part. For example for a system entity of type
  502. // `@sys.unit-currency`, this may contain:
  503. // <pre>
  504. // {
  505. // "amount": 5,
  506. // "currency": "USD"
  507. // }
  508. // </pre>
  509. google.protobuf.Value formatted_value = 3;
  510. }
  511. // Represents the result of annotation for the message.
  512. message MessageAnnotation {
  513. // The collection of annotated message parts ordered by their
  514. // position in the message. You can recover the annotated message by
  515. // concatenating [AnnotatedMessagePart.text].
  516. repeated AnnotatedMessagePart parts = 1;
  517. // Indicates whether the text message contains entities.
  518. bool contain_entities = 2;
  519. }