1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429 |
- // Copyright 2022 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- syntax = "proto3";
- package google.cloud.dialogflow.v2beta1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/field_behavior.proto";
- import "google/api/resource.proto";
- import "google/cloud/dialogflow/v2beta1/audio_config.proto";
- import "google/cloud/dialogflow/v2beta1/session.proto";
- import "google/protobuf/field_mask.proto";
- import "google/protobuf/struct.proto";
- import "google/protobuf/timestamp.proto";
- import "google/rpc/status.proto";
- option cc_enable_arenas = true;
- option csharp_namespace = "Google.Cloud.Dialogflow.V2beta1";
- option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2beta1;dialogflow";
- option java_multiple_files = true;
- option java_outer_classname = "ParticipantProto";
- option java_package = "com.google.cloud.dialogflow.v2beta1";
- option objc_class_prefix = "DF";
- // Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant].
- service Participants {
- option (google.api.default_host) = "dialogflow.googleapis.com";
- option (google.api.oauth_scopes) =
- "https://www.googleapis.com/auth/cloud-platform,"
- "https://www.googleapis.com/auth/dialogflow";
- // Creates a new participant in a conversation.
- rpc CreateParticipant(CreateParticipantRequest) returns (Participant) {
- option (google.api.http) = {
- post: "/v2beta1/{parent=projects/*/conversations/*}/participants"
- body: "participant"
- additional_bindings {
- post: "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants"
- body: "participant"
- }
- };
- option (google.api.method_signature) = "parent,participant";
- }
- // Retrieves a conversation participant.
- rpc GetParticipant(GetParticipantRequest) returns (Participant) {
- option (google.api.http) = {
- get: "/v2beta1/{name=projects/*/conversations/*/participants/*}"
- additional_bindings {
- get: "/v2beta1/{name=projects/*/locations/*/conversations/*/participants/*}"
- }
- };
- option (google.api.method_signature) = "name";
- }
- // Returns the list of all participants in the specified conversation.
- rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse) {
- option (google.api.http) = {
- get: "/v2beta1/{parent=projects/*/conversations/*}/participants"
- additional_bindings {
- get: "/v2beta1/{parent=projects/*/locations/*/conversations/*}/participants"
- }
- };
- option (google.api.method_signature) = "parent";
- }
- // Updates the specified participant.
- rpc UpdateParticipant(UpdateParticipantRequest) returns (Participant) {
- option (google.api.http) = {
- patch: "/v2beta1/{participant.name=projects/*/conversations/*/participants/*}"
- body: "participant"
- additional_bindings {
- patch: "/v2beta1/{participant.name=projects/*/locations/*/conversations/*/participants/*}"
- body: "participant"
- }
- };
- option (google.api.method_signature) = "participant,update_mask";
- }
- // Adds a text (chat, for example), or audio (phone recording, for example)
- // message from a participant into the conversation.
- //
- // Note: Always use agent versions for production traffic
- // sent to virtual agents. See [Versions and
- // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
- rpc AnalyzeContent(AnalyzeContentRequest) returns (AnalyzeContentResponse) {
- option (google.api.http) = {
- post: "/v2beta1/{participant=projects/*/conversations/*/participants/*}:analyzeContent"
- body: "*"
- additional_bindings {
- post: "/v2beta1/{participant=projects/*/locations/*/conversations/*/participants/*}:analyzeContent"
- body: "*"
- }
- };
- option (google.api.method_signature) = "participant,text_input";
- option (google.api.method_signature) = "participant,audio_input";
- option (google.api.method_signature) = "participant,event_input";
- }
- // Adds a text (e.g., chat) or audio (e.g., phone recording) message from a
- // participant into the conversation.
- // Note: This method is only available through the gRPC API (not REST).
- //
- // The top-level message sent to the client by the server is
- // `StreamingAnalyzeContentResponse`. Multiple response messages can be
- // returned in order. The first one or more messages contain the
- // `recognition_result` field. Each result represents a more complete
- // transcript of what the user said. The next message contains the
- // `reply_text` field, and potentially the `reply_audio` and/or the
- // `automated_agent_reply` fields.
- //
- // Note: Always use agent versions for production traffic
- // sent to virtual agents. See [Versions and
- // environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
- rpc StreamingAnalyzeContent(stream StreamingAnalyzeContentRequest) returns (stream StreamingAnalyzeContentResponse) {
- }
- // Gets suggested articles for a participant based on specific historical
- // messages.
- //
- // Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
- // suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
- // based on the provided conversation context in the real time.
- rpc SuggestArticles(SuggestArticlesRequest) returns (SuggestArticlesResponse) {
- option (google.api.http) = {
- post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles"
- body: "*"
- additional_bindings {
- post: "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestArticles"
- body: "*"
- }
- };
- option (google.api.method_signature) = "parent";
- }
- // Gets suggested faq answers for a participant based on specific historical
- // messages.
- rpc SuggestFaqAnswers(SuggestFaqAnswersRequest) returns (SuggestFaqAnswersResponse) {
- option (google.api.http) = {
- post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers"
- body: "*"
- additional_bindings {
- post: "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers"
- body: "*"
- }
- };
- option (google.api.method_signature) = "parent";
- }
- // Gets smart replies for a participant based on specific historical
- // messages.
- rpc SuggestSmartReplies(SuggestSmartRepliesRequest) returns (SuggestSmartRepliesResponse) {
- option (google.api.http) = {
- post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestSmartReplies"
- body: "*"
- additional_bindings {
- post: "/v2beta1/{parent=projects/*/locations/*/conversations/*/participants/*}/suggestions:suggestSmartReplies"
- body: "*"
- }
- };
- option (google.api.method_signature) = "parent";
- }
- // Deprecated: Use inline suggestion, event based suggestion or
- // Suggestion* API instead.
- // See [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more
- // details.
- // Removal Date: 2020-09-01.
- //
- // Retrieves suggestions for live agents.
- //
- // This method should be used by human agent client software to fetch auto
- // generated suggestions in real-time, while the conversation with an end user
- // is in progress. The functionality is implemented in terms of the
- // [list
- // pagination](https://cloud.google.com/apis/design/design_patterns#list_pagination)
- // design pattern. The client app should use the `next_page_token` field
- // to fetch the next batch of suggestions. `suggestions` are sorted by
- // `create_time` in descending order.
- // To fetch latest suggestion, just set `page_size` to 1.
- // To fetch new suggestions without duplication, send request with filter
- // `create_time_epoch_microseconds > [first item's create_time of previous
- // request]` and empty page_token.
- rpc ListSuggestions(ListSuggestionsRequest) returns (ListSuggestionsResponse) {
- option deprecated = true;
- option (google.api.http) = {
- get: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions"
- };
- }
- // Deprecated. use [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles] and [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers] instead.
- //
- // Gets suggestions for a participant based on specific historical
- // messages.
- //
- // Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
- // suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
- // based on the provided conversation context in the real time.
- rpc CompileSuggestion(CompileSuggestionRequest) returns (CompileSuggestionResponse) {
- option deprecated = true;
- option (google.api.http) = {
- post: "/v2beta1/{parent=projects/*/conversations/*/participants/*}/suggestions:compile"
- body: "*"
- };
- }
- }
- // Represents a conversation participant (human agent, virtual agent, end-user).
- message Participant {
- option (google.api.resource) = {
- type: "dialogflow.googleapis.com/Participant"
- pattern: "projects/{project}/conversations/{conversation}/participants/{participant}"
- pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}"
- };
- // Enumeration of the roles a participant can play in a conversation.
- enum Role {
- // Participant role not set.
- ROLE_UNSPECIFIED = 0;
- // Participant is a human agent.
- HUMAN_AGENT = 1;
- // Participant is an automated agent, such as a Dialogflow agent.
- AUTOMATED_AGENT = 2;
- // Participant is an end user that has called or chatted with
- // Dialogflow services.
- END_USER = 3;
- }
- // Optional. The unique identifier of this participant.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string name = 1 [(google.api.field_behavior) = OPTIONAL];
- // Immutable. The role this participant plays in the conversation. This field must be set
- // during participant creation and is then immutable.
- Role role = 2 [(google.api.field_behavior) = IMMUTABLE];
- // Optional. Obfuscated user id that should be associated with the created participant.
- //
- // You can specify a user id as follows:
- //
- // 1. If you set this field in
- // [CreateParticipantRequest][google.cloud.dialogflow.v2beta1.CreateParticipantRequest.participant] or
- // [UpdateParticipantRequest][google.cloud.dialogflow.v2beta1.UpdateParticipantRequest.participant],
- // Dialogflow adds the obfuscated user id with the participant.
- //
- // 2. If you set this field in
- // [AnalyzeContent][google.cloud.dialogflow.v2beta1.AnalyzeContentRequest.obfuscated_external_user_id] or
- // [StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.obfuscated_external_user_id],
- // Dialogflow will update [Participant.obfuscated_external_user_id][google.cloud.dialogflow.v2beta1.Participant.obfuscated_external_user_id].
- //
- // Dialogflow uses this user id for following purposes:
- // 1) Billing and measurement. If user with the same
- // obfuscated_external_user_id is created in a later conversation, dialogflow
- // will know it's the same user. 2) Agent assist suggestion personalization.
- // For example, Dialogflow can use it to provide personalized smart reply
- // suggestions for this user.
- //
- // Note:
- //
- // * Please never pass raw user ids to Dialogflow. Always obfuscate your user
- // id first.
- // * Dialogflow only accepts a UTF-8 encoded string, e.g., a hex digest of a
- // hash function like SHA-512.
- // * The length of the user id must be <= 256 characters.
- string obfuscated_external_user_id = 7 [(google.api.field_behavior) = OPTIONAL];
- // Optional. Key-value filters on the metadata of documents returned by article
- // suggestion. If specified, article suggestion only returns suggested
- // documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2beta1.Document.metadata]. Multiple
- // values for a metadata key should be concatenated by comma. For example,
- // filters to match all documents that have 'US' or 'CA' in their market
- // metadata values and 'agent' in their user metadata values will be
- // ```
- // documents_metadata_filters {
- // key: "market"
- // value: "US,CA"
- // }
- // documents_metadata_filters {
- // key: "user"
- // value: "agent"
- // }
- // ```
- map<string, string> documents_metadata_filters = 8 [(google.api.field_behavior) = OPTIONAL];
- }
- // Represents a message posted into a conversation.
- message Message {
- option (google.api.resource) = {
- type: "dialogflow.googleapis.com/Message"
- pattern: "projects/{project}/conversations/{conversation}/messages/{message}"
- pattern: "projects/{project}/locations/{location}/conversations/{conversation}/messages/{message}"
- };
- // Optional. The unique identifier of the message.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string name = 1 [(google.api.field_behavior) = OPTIONAL];
- // Required. The message content.
- string content = 2 [(google.api.field_behavior) = REQUIRED];
- // Optional. The message language.
- // This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt)
- // language tag. Example: "en-US".
- string language_code = 3 [(google.api.field_behavior) = OPTIONAL];
- // Output only. The participant that sends this message.
- string participant = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
- // Output only. The role of the participant.
- Participant.Role participant_role = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
- // Output only. The time when the message was created in Contact Center AI.
- google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
- // Optional. The time when the message was sent.
- google.protobuf.Timestamp send_time = 9 [(google.api.field_behavior) = OPTIONAL];
- // Output only. The annotation for the message.
- MessageAnnotation message_annotation = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
- // Output only. The sentiment analysis result for the message.
- SentimentAnalysisResult sentiment_analysis = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
- }
- // The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2beta1.Participants.CreateParticipant].
- message CreateParticipantRequest {
- // Required. Resource identifier of the conversation adding the participant.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>`.
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- child_type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // Required. The participant to create.
- Participant participant = 2 [(google.api.field_behavior) = REQUIRED];
- }
- // The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2beta1.Participants.GetParticipant].
- message GetParticipantRequest {
- // Required. The name of the participant. Format:
- // `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
- // ID>/participants/<Participant ID>`.
- string name = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Participant"
- }
- ];
- }
- // The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2beta1.Participants.ListParticipants].
- message ListParticipantsRequest {
- // Required. The conversation to list all participants from.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>`.
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- child_type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // Optional. The maximum number of items to return in a single page. By
- // default 100 and at most 1000.
- int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
- // Optional. The next_page_token value returned from a previous list request.
- string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
- }
- // The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2beta1.Participants.ListParticipants].
- message ListParticipantsResponse {
- // The list of participants. There is a maximum number of items
- // returned based on the page_size field in the request.
- repeated Participant participants = 1;
- // Token to retrieve the next page of results or empty if there are no
- // more results in the list.
- string next_page_token = 2;
- }
- // The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2beta1.Participants.UpdateParticipant].
- message UpdateParticipantRequest {
- // Required. The participant to update.
- Participant participant = 1 [(google.api.field_behavior) = REQUIRED];
- // Required. The mask to specify which fields to update.
- google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
- }
- // Represents the natural language speech audio to be processed.
- message AudioInput {
- // Required. Instructs the speech recognizer how to process the speech audio.
- InputAudioConfig config = 1;
- // Required. The natural language speech audio to be processed.
- // A single request can contain up to 1 minute of speech audio data.
- // The transcribed text cannot contain more than 256 bytes for virtual agent
- // interactions.
- bytes audio = 2;
- }
- // Represents the natural language speech audio to be played to the end user.
- message OutputAudio {
- // Required. Instructs the speech synthesizer how to generate the speech
- // audio.
- OutputAudioConfig config = 1;
- // Required. The natural language speech audio.
- bytes audio = 2;
- }
- // Represents a response from an automated agent.
- message AutomatedAgentReply {
- // Represents different automated agent reply types.
- enum AutomatedAgentReplyType {
- // Not specified. This should never happen.
- AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0;
- // Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables
- // `return_partial_response` can be returned as partial reply.
- // WARNING: partial reply is not eligible for barge-in.
- PARTIAL = 1;
- // Final reply.
- FINAL = 2;
- }
- // Required.
- oneof response {
- // Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2beta1.Sessions.DetectIntent] call.
- DetectIntentResponse detect_intent_response = 1;
- }
- // Response messages from the automated agent.
- repeated ResponseMessage response_messages = 3;
- // Info on the query match for the automated agent response.
- oneof match {
- // Name of the intent if an intent is matched for the query.
- // For a V2 query, the value format is `projects/<Project ID>/locations/
- // <Location ID>/agent/intents/<Intent ID>`.
- // For a V3 query, the value format is `projects/<Project ID>/locations/
- // <Location ID>/agents/<Agent ID>/intents/<Intent ID>`.
- string intent = 4 [(google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Intent"
- }];
- // Event name if an event is triggered for the query.
- string event = 5;
- }
- // The confidence of the match. Values range from 0.0 (completely uncertain)
- // to 1.0 (completely certain).
- // This value is for informational purpose only and is only used to help match
- // the best intent within the classification threshold. This value may change
- // for the same end-user expression at any time due to a model retraining or
- // change in implementation.
- float match_confidence = 9;
- // The collection of current parameters at the time of this response.
- google.protobuf.Struct parameters = 10;
- // The collection of current Dialogflow CX agent session parameters at the
- // time of this response.
- // Deprecated: Use `parameters` instead.
- google.protobuf.Struct cx_session_parameters = 6 [deprecated = true];
- // AutomatedAgentReply type.
- AutomatedAgentReplyType automated_agent_reply_type = 7;
- // Indicates whether the partial automated agent reply is interruptible when a
- // later reply message arrives. e.g. if the agent specified some music as
- // partial response, it can be cancelled.
- bool allow_cancellation = 8;
- // The unique identifier of the current Dialogflow CX conversation page.
- // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
- // ID>/flows/<Flow ID>/pages/<Page ID>`.
- string cx_current_page = 11;
- }
- // The type of Human Agent Assistant API suggestion to perform, and the maximum
- // number of results to return for that type. Multiple `Feature` objects can
- // be specified in the `features` list.
- message SuggestionFeature {
- // Defines the type of Human Agent Assistant feature.
- enum Type {
- // Unspecified feature type.
- TYPE_UNSPECIFIED = 0;
- // Run article suggestion model for chat.
- ARTICLE_SUGGESTION = 1;
- // Run FAQ model.
- FAQ = 2;
- // Run smart reply model for chat.
- SMART_REPLY = 3;
- // Run conversation summarization model for chat.
- CONVERSATION_SUMMARIZATION = 8;
- }
- // Type of Human Agent Assistant API feature to request.
- Type type = 1;
- }
- // Represents the parameters of human assist query.
- message AssistQueryParameters {
- // Key-value filters on the metadata of documents returned by article
- // suggestion. If specified, article suggestion only returns suggested
- // documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2beta1.Document.metadata]. Multiple
- // values for a metadata key should be concatenated by comma. For example,
- // filters to match all documents that have 'US' or 'CA' in their market
- // metadata values and 'agent' in their user metadata values will be
- // ```
- // documents_metadata_filters {
- // key: "market"
- // value: "US,CA"
- // }
- // documents_metadata_filters {
- // key: "user"
- // value: "agent"
- // }
- // ```
- map<string, string> documents_metadata_filters = 1;
- }
- // The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent].
- message AnalyzeContentRequest {
- // Required. The name of the participant this text comes from.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string participant = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // Required. The input content.
- oneof input {
- // The natural language text to be processed.
- TextInput text_input = 6;
- // The natural language speech audio to be processed.
- AudioInput audio_input = 7;
- // An input event to send to Dialogflow.
- EventInput event_input = 8;
- }
- // Speech synthesis configuration.
- // The speech synthesis settings for a virtual agent that may be configured
- // for the associated conversation profile are not used when calling
- // AnalyzeContent. If this configuration is not supplied, speech synthesis
- // is disabled.
- OutputAudioConfig reply_audio_config = 5;
- // Parameters for a Dialogflow virtual-agent query.
- QueryParameters query_params = 9;
- // Parameters for a human assist query.
- AssistQueryParameters assist_query_params = 14;
- // Additional parameters to be put into Dialogflow CX session parameters. To
- // remove a parameter from the session, clients should explicitly set the
- // parameter value to null.
- //
- // Note: this field should only be used if you are connecting to a Dialogflow
- // CX agent.
- google.protobuf.Struct cx_parameters = 18;
- // The unique identifier of the CX page to override the `current_page` in the
- // session.
- // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
- // ID>/flows/<Flow ID>/pages/<Page ID>`.
- //
- // If `cx_current_page` is specified, the previous state of the session will
- // be ignored by Dialogflow CX, including the [previous
- // page][QueryResult.current_page] and the [previous session
- // parameters][QueryResult.parameters]. In most cases, `cx_current_page` and
- // `cx_parameters` should be configured together to direct a session to a
- // specific state.
- //
- // Note: this field should only be used if you are connecting to a Dialogflow
- // CX agent.
- string cx_current_page = 20;
- // Optional. The send time of the message from end user or human agent's
- // perspective. It is used for identifying the same message under one
- // participant.
- //
- // Given two messages under the same participant:
- // - If send time are different regardless of whether the content of the
- // messages are exactly the same, the conversation will regard them as
- // two distinct messages sent by the participant.
- // - If send time is the same regardless of whether the content of the
- // messages are exactly the same, the conversation will regard them as
- // same message, and ignore the message received later.
- //
- // If the value is not provided, a new request will always be regarded as a
- // new message without any de-duplication.
- google.protobuf.Timestamp message_send_time = 10;
- // A unique identifier for this request. Restricted to 36 ASCII characters.
- // A random UUID is recommended.
- // This request is only idempotent if a `request_id` is provided.
- string request_id = 11;
- }
- // The message in the response that indicates the parameters of DTMF.
- message DtmfParameters {
- // Indicates whether DTMF input can be handled in the next request.
- bool accepts_dtmf_input = 1;
- }
- // The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent].
- message AnalyzeContentResponse {
- // Output only. The output text content.
- // This field is set if the automated agent responded with text to show to
- // the user.
- string reply_text = 1;
- // Optional. The audio data bytes encoded as specified in the request.
- // This field is set if:
- //
- // - `reply_audio_config` was specified in the request, or
- // - The automated agent responded with audio to play to the user. In such
- // case, `reply_audio.config` contains settings used to synthesize the
- // speech.
- //
- // In some scenarios, multiple output audio fields may be present in the
- // response structure. In these cases, only the top-most-level audio output
- // has content.
- OutputAudio reply_audio = 2;
- // Optional. Only set if a Dialogflow automated agent has responded.
- // Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
- // and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
- // are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.AnalyzeContentResponse.reply_audio] instead.
- AutomatedAgentReply automated_agent_reply = 3;
- // Output only. Message analyzed by CCAI.
- Message message = 5;
- // The suggestions for most recent human agent. The order is the same as
- // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
- // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
- //
- // Note that any failure of Agent Assist features will not lead to the overall
- // failure of an AnalyzeContent API call. Instead, the features will
- // fail silently with the error field set in the corresponding
- // SuggestionResult.
- repeated SuggestionResult human_agent_suggestion_results = 6;
- // The suggestions for end user. The order is the same as
- // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
- // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
- //
- // Same as human_agent_suggestion_results, any failure of Agent Assist
- // features will not lead to the overall failure of an AnalyzeContent API
- // call. Instead, the features will fail silently with the error field set in
- // the corresponding SuggestionResult.
- repeated SuggestionResult end_user_suggestion_results = 7;
- // Indicates the parameters of DTMF.
- DtmfParameters dtmf_parameters = 9;
- }
- // Defines the language used in the input text.
- message InputTextConfig {
- // Required. The language of this conversational query. See [Language
- // Support](https://cloud.google.com/dialogflow/docs/reference/language)
- // for a list of the currently supported language codes.
- string language_code = 1;
- }
- // The top-level message sent by the client to the
- // [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.StreamingAnalyzeContent] method.
- //
- // Multiple request messages should be sent in order:
- //
- // 1. The first message must contain
- // [participant][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.participant],
- // [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] and optionally
- // [query_params][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.query_params]. If you want
- // to receive an audio response, it should also contain
- // [reply_audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.reply_audio_config].
- // The message must not contain
- // [input][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input].
- //
- // 2. If [config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message
- // was set to [audio_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.audio_config],
- // all subsequent messages must contain
- // [input_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_audio] to continue
- // with Speech recognition.
- // If you decide to rather analyze text input after you already started
- // Speech recognition, please send a message with
- // [StreamingAnalyzeContentRequest.input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text].
- //
- // However, note that:
- //
- // * Dialogflow will bill you for the audio so far.
- // * Dialogflow discards all Speech recognition results in favor of the
- // text input.
- //
- // 3. If [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.config] in the first message was set
- // to [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.text_config], then the second message
- // must contain only [input_text][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest.input_text].
- // Moreover, you must not send more than two messages.
- //
- // After you sent all input, you must half-close or abort the request stream.
- message StreamingAnalyzeContentRequest {
- // Required. The name of the participant this text comes from.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string participant = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // Required. The input config.
- oneof config {
- // Instructs the speech recognizer how to process the speech audio.
- InputAudioConfig audio_config = 2;
- // The natural language text to be processed.
- InputTextConfig text_config = 3;
- }
- // Speech synthesis configuration.
- // The speech synthesis settings for a virtual agent that may be configured
- // for the associated conversation profile are not used when calling
- // StreamingAnalyzeContent. If this configuration is not supplied, speech
- // synthesis is disabled.
- OutputAudioConfig reply_audio_config = 4;
- // Required. The input.
- oneof input {
- // The input audio content to be recognized. Must be sent if `audio_config`
- // is set in the first message. The complete audio over all streaming
- // messages must not exceed 1 minute.
- bytes input_audio = 5;
- // The UTF-8 encoded natural language text to be processed. Must be sent if
- // `text_config` is set in the first message. Text length must not exceed
- // 256 bytes for virtual agent interactions. The `input_text` field can be
- // only sent once.
- string input_text = 6;
- // The DTMF digits used to invoke intent and fill in parameter value.
- //
- // This input is ignored if the previous response indicated that DTMF input
- // is not accepted.
- TelephonyDtmfEvents input_dtmf = 9;
- }
- // Parameters for a Dialogflow virtual-agent query.
- QueryParameters query_params = 7;
- // Parameters for a human assist query.
- AssistQueryParameters assist_query_params = 8;
- // Additional parameters to be put into Dialogflow CX session parameters. To
- // remove a parameter from the session, clients should explicitly set the
- // parameter value to null.
- //
- // Note: this field should only be used if you are connecting to a Dialogflow
- // CX agent.
- google.protobuf.Struct cx_parameters = 13;
- // The unique identifier of the CX page to override the `current_page` in the
- // session.
- // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
- // ID>/flows/<Flow ID>/pages/<Page ID>`.
- //
- // If `cx_current_page` is specified, the previous state of the session will
- // be ignored by Dialogflow CX, including the [previous
- // page][QueryResult.current_page] and the [previous session
- // parameters][QueryResult.parameters]. In most cases, `cx_current_page` and
- // `cx_parameters` should be configured together to direct a session to a
- // specific state.
- //
- // Note: this field should only be used if you are connecting to a Dialogflow
- // CX agent.
- string cx_current_page = 15;
- // Enable partial virtual agent responses. If this flag is not enabled,
- // response stream still contains only one final response even if some
- // `Fulfillment`s in Dialogflow virtual agent have been configured to return
- // partial responses.
- bool enable_partial_automated_agent_reply = 12;
- }
- // The top-level message returned from the `StreamingAnalyzeContent` method.
- //
- // Multiple response messages can be returned in order:
- //
- // 1. If the input was set to streaming audio, the first one or more messages
- // contain `recognition_result`. Each `recognition_result` represents a more
- // complete transcript of what the user said. The last `recognition_result`
- // has `is_final` set to `true`.
- //
- // 2. In virtual agent stage: if `enable_partial_automated_agent_reply` is
- // true, the following N (currently 1 <= N <= 4) messages
- // contain `automated_agent_reply` and optionally `reply_audio`
- // returned by the virtual agent. The first (N-1)
- // `automated_agent_reply`s will have `automated_agent_reply_type` set to
- // `PARTIAL`. The last `automated_agent_reply` has
- // `automated_agent_reply_type` set to `FINAL`.
- // If `enable_partial_automated_agent_reply` is not enabled, response stream
- // only contains the final reply.
- //
- // In human assist stage: the following N (N >= 1) messages contain
- // `human_agent_suggestion_results`, `end_user_suggestion_results` or
- // `message`.
- message StreamingAnalyzeContentResponse {
- // The result of speech recognition.
- StreamingRecognitionResult recognition_result = 1;
- // Optional. The output text content.
- // This field is set if an automated agent responded with a text for the user.
- string reply_text = 2;
- // Optional. The audio data bytes encoded as specified in the request.
- // This field is set if:
- //
- // - The `reply_audio_config` field is specified in the request.
- // - The automated agent, which this output comes from, responded with audio.
- // In such case, the `reply_audio.config` field contains settings used to
- // synthesize the speech.
- //
- // In some scenarios, multiple output audio fields may be present in the
- // response structure. In these cases, only the top-most-level audio output
- // has content.
- OutputAudio reply_audio = 3;
- // Optional. Only set if a Dialogflow automated agent has responded.
- // Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
- // and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
- // are always empty, use [reply_audio][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentResponse.reply_audio] instead.
- AutomatedAgentReply automated_agent_reply = 4;
- // Output only. Message analyzed by CCAI.
- Message message = 6;
- // The suggestions for most recent human agent. The order is the same as
- // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
- // [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.human_agent_suggestion_config].
- repeated SuggestionResult human_agent_suggestion_results = 7;
- // The suggestions for end user. The order is the same as
- // [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
- // [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.end_user_suggestion_config].
- repeated SuggestionResult end_user_suggestion_results = 8;
- // Indicates the parameters of DTMF.
- DtmfParameters dtmf_parameters = 10;
- }
- // Represents a part of a message possibly annotated with an entity. The part
- // can be an entity or purely a part of the message between two entities or
- // message start/end.
- message AnnotatedMessagePart {
- // Required. A part of a message possibly annotated with an entity.
- string text = 1;
- // Optional. The [Dialogflow system entity
- // type](https://cloud.google.com/dialogflow/docs/reference/system-entities)
- // of this message part. If this is empty, Dialogflow could not annotate the
- // phrase part with a system entity.
- string entity_type = 2;
- // Optional. The [Dialogflow system entity formatted value
- // ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of
- // this message part. For example for a system entity of type
- // `@sys.unit-currency`, this may contain:
- // <pre>
- // {
- // "amount": 5,
- // "currency": "USD"
- // }
- // </pre>
- google.protobuf.Value formatted_value = 3;
- }
- // Represents the result of annotation for the message.
- message MessageAnnotation {
- // Optional. The collection of annotated message parts ordered by their
- // position in the message. You can recover the annotated message by
- // concatenating [AnnotatedMessagePart.text].
- repeated AnnotatedMessagePart parts = 1;
- // Required. Indicates whether the text message contains entities.
- bool contain_entities = 2;
- }
- // Represents article answer.
- message ArticleAnswer {
- // The article title.
- string title = 1;
- // The article URI.
- string uri = 2;
- // Output only. Article snippets.
- repeated string snippets = 3;
- // A map that contains metadata about the answer and the
- // document from which it originates.
- map<string, string> metadata = 5;
- // The name of answer record, in the format of
- // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
- // ID>"
- string answer_record = 6;
- }
- // Represents answer from "frequently asked questions".
- message FaqAnswer {
- // The piece of text from the `source` knowledge base document.
- string answer = 1;
- // The system's confidence score that this Knowledge answer is a good match
- // for this conversational query, range from 0.0 (completely uncertain)
- // to 1.0 (completely certain).
- float confidence = 2;
- // The corresponding FAQ question.
- string question = 3;
- // Indicates which Knowledge Document this answer was extracted
- // from.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
- string source = 4;
- // A map that contains metadata about the answer and the
- // document from which it originates.
- map<string, string> metadata = 5;
- // The name of answer record, in the format of
- // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
- // ID>"
- string answer_record = 6;
- }
- // Represents a smart reply answer.
- message SmartReplyAnswer {
- // The content of the reply.
- string reply = 1;
- // Smart reply confidence.
- // The system's confidence score that this reply is a good match for
- // this conversation, as a value from 0.0 (completely uncertain) to 1.0
- // (completely certain).
- float confidence = 2;
- // The name of answer record, in the format of
- // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
- // ID>"
- string answer_record = 3 [(google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/AnswerRecord"
- }];
- }
- // One response of different type of suggestion response which is used in
- // the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent] and
- // [Participants.AnalyzeContent][google.cloud.dialogflow.v2beta1.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2beta1.HumanAgentAssistantEvent].
- message SuggestionResult {
- // Different type of suggestion response.
- oneof suggestion_response {
- // Error status if the request failed.
- google.rpc.Status error = 1;
- // SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
- SuggestArticlesResponse suggest_articles_response = 2;
- // SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
- SuggestFaqAnswersResponse suggest_faq_answers_response = 3;
- // SuggestSmartRepliesResponse if request is for SMART_REPLY.
- SuggestSmartRepliesResponse suggest_smart_replies_response = 4;
- }
- }
- // The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles].
- message SuggestArticlesRequest {
- // Required. The name of the participant to fetch suggestion for.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // Optional. The name of the latest conversation message to compile suggestion
- // for. If empty, it will be the latest message of the conversation.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2 [
- (google.api.field_behavior) = OPTIONAL,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Message"
- }
- ];
- // Optional. Max number of messages prior to and including
- // [latest_message][google.cloud.dialogflow.v2beta1.SuggestArticlesRequest.latest_message] to use as context
- // when compiling the suggestion. By default 20 and at most 50.
- int32 context_size = 3 [(google.api.field_behavior) = OPTIONAL];
- // Optional. Parameters for a human assist query.
- AssistQueryParameters assist_query_params = 4 [(google.api.field_behavior) = OPTIONAL];
- }
- // The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles].
- message SuggestArticlesResponse {
- // Output only. Articles ordered by score in descending order.
- repeated ArticleAnswer article_answers = 1;
- // The name of the latest conversation message used to compile
- // suggestion for.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2;
- // Number of messages prior to and including
- // [latest_message][google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.latest_message] to compile the
- // suggestion. It may be smaller than the
- // [SuggestArticlesResponse.context_size][google.cloud.dialogflow.v2beta1.SuggestArticlesResponse.context_size] field in the request if there
- // aren't that many messages in the conversation.
- int32 context_size = 3;
- }
- // The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers].
- message SuggestFaqAnswersRequest {
- // Required. The name of the participant to fetch suggestion for.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // Optional. The name of the latest conversation message to compile suggestion
- // for. If empty, it will be the latest message of the conversation.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2 [
- (google.api.field_behavior) = OPTIONAL,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Message"
- }
- ];
- // Optional. Max number of messages prior to and including
- // [latest_message] to use as context when compiling the
- // suggestion. By default 20 and at most 50.
- int32 context_size = 3 [(google.api.field_behavior) = OPTIONAL];
- // Optional. Parameters for a human assist query.
- AssistQueryParameters assist_query_params = 4 [(google.api.field_behavior) = OPTIONAL];
- }
- // The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers].
- message SuggestFaqAnswersResponse {
- // Output only. Answers extracted from FAQ documents.
- repeated FaqAnswer faq_answers = 1;
- // The name of the latest conversation message used to compile
- // suggestion for.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2;
- // Number of messages prior to and including
- // [latest_message][google.cloud.dialogflow.v2beta1.SuggestFaqAnswersResponse.latest_message] to compile the
- // suggestion. It may be smaller than the
- // [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2beta1.SuggestFaqAnswersRequest.context_size] field in the request if there
- // aren't that many messages in the conversation.
- int32 context_size = 3;
- }
- // The request message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2beta1.Participants.SuggestSmartReplies].
- message SuggestSmartRepliesRequest {
- // Required. The name of the participant to fetch suggestion for.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string parent = 1 [
- (google.api.field_behavior) = REQUIRED,
- (google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Participant"
- }
- ];
- // The current natural language text segment to compile suggestion
- // for. This provides a way for user to get follow up smart reply suggestion
- // after a smart reply selection, without sending a text message.
- TextInput current_text_input = 4;
- // The name of the latest conversation message to compile suggestion
- // for. If empty, it will be the latest message of the conversation.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2 [(google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Message"
- }];
- // Optional. Max number of messages prior to and including
- // [latest_message] to use as context when compiling the
- // suggestion. By default 20 and at most 50.
- int32 context_size = 3;
- }
- // The response message for [Participants.SuggestSmartReplies][google.cloud.dialogflow.v2beta1.Participants.SuggestSmartReplies].
- message SuggestSmartRepliesResponse {
- // Output only. Multiple reply options provided by smart reply service. The
- // order is based on the rank of the model prediction.
- // The maximum number of the returned replies is set in SmartReplyConfig.
- repeated SmartReplyAnswer smart_reply_answers = 1;
- // The name of the latest conversation message used to compile
- // suggestion for.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2 [(google.api.resource_reference) = {
- type: "dialogflow.googleapis.com/Message"
- }];
- // Number of messages prior to and including
- // [latest_message][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.latest_message] to compile the
- // suggestion. It may be smaller than the
- // [SuggestSmartRepliesRequest.context_size][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesRequest.context_size] field in the request if there
- // aren't that many messages in the conversation.
- int32 context_size = 3;
- }
- // Represents a suggestion for a human agent.
- message Suggestion {
- option deprecated = true;
- // Represents suggested article.
- message Article {
- // Output only. The article title.
- string title = 1;
- // Output only. The article URI.
- string uri = 2;
- // Output only. Article snippets.
- repeated string snippets = 3;
- // Output only. A map that contains metadata about the answer and the
- // document from which it originates.
- map<string, string> metadata = 5;
- // Output only. The name of answer record, in the format of
- // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer
- // Record ID>"
- string answer_record = 6;
- }
- // Represents suggested answer from "frequently asked questions".
- message FaqAnswer {
- // Output only. The piece of text from the `source` knowledge base document.
- string answer = 1;
- // The system's confidence score that this Knowledge answer is a good match
- // for this conversational query, range from 0.0 (completely uncertain)
- // to 1.0 (completely certain).
- float confidence = 2;
- // Output only. The corresponding FAQ question.
- string question = 3;
- // Output only. Indicates which Knowledge Document this answer was extracted
- // from.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/agent/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
- string source = 4;
- // Output only. A map that contains metadata about the answer and the
- // document from which it originates.
- map<string, string> metadata = 5;
- // Output only. The name of answer record, in the format of
- // "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer
- // Record ID>"
- string answer_record = 6;
- }
- // Output only. The name of this suggestion.
- // Format:
- // `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
- // ID>/participants/*/suggestions/<Suggestion ID>`.
- string name = 1;
- // Output only. Articles ordered by score in descending order.
- repeated Article articles = 2;
- // Output only. Answers extracted from FAQ documents.
- repeated FaqAnswer faq_answers = 4;
- // Output only. The time the suggestion was created.
- google.protobuf.Timestamp create_time = 5;
- // Output only. Latest message used as context to compile this suggestion.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 7;
- }
- // The request message for [Participants.ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions].
- message ListSuggestionsRequest {
- option deprecated = true;
- // Required. The name of the participant to fetch suggestions for.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string parent = 1;
- // Optional. The maximum number of items to return in a single page. The
- // default value is 100; the maximum value is 1000.
- int32 page_size = 2;
- // Optional. The next_page_token value returned from a previous list request.
- string page_token = 3;
- // Optional. Filter on suggestions fields. Currently predicates on
- // `create_time` and `create_time_epoch_microseconds` are supported.
- // `create_time` only support milliseconds accuracy. E.g.,
- // `create_time_epoch_microseconds > 1551790877964485` or
- // `create_time > "2017-01-15T01:30:15.01Z"`
- //
- // For more information about filtering, see
- // [API Filtering](https://aip.dev/160).
- string filter = 4;
- }
- // The response message for [Participants.ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions].
- message ListSuggestionsResponse {
- option deprecated = true;
- // Required. The list of suggestions. There will be a maximum number of items
- // returned based on the page_size field in the request. `suggestions` is
- // sorted by `create_time` in descending order.
- repeated Suggestion suggestions = 1;
- // Optional. Token to retrieve the next page of results or empty if there are
- // no more results in the list.
- string next_page_token = 2;
- }
- // The request message for [Participants.CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion].
- message CompileSuggestionRequest {
- option deprecated = true;
- // Required. The name of the participant to fetch suggestion for.
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
- string parent = 1;
- // Optional. The name of the latest conversation message to compile suggestion
- // for. If empty, it will be the latest message of the conversation.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2;
- // Optional. Max number of messages prior to and including
- // [latest_message] to use as context when compiling the
- // suggestion. If zero or less than zero, 20 is used.
- int32 context_size = 3;
- }
- // The response message for [Participants.CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion].
- message CompileSuggestionResponse {
- option deprecated = true;
- // The compiled suggestion.
- Suggestion suggestion = 1;
- // The name of the latest conversation message used to compile
- // suggestion for.
- //
- // Format: `projects/<Project ID>/locations/<Location
- // ID>/conversations/<Conversation ID>/messages/<Message ID>`.
- string latest_message = 2;
- // Number of messages prior to and including
- // [latest_message][google.cloud.dialogflow.v2beta1.CompileSuggestionResponse.latest_message]
- // to compile the suggestion. It may be smaller than the
- // [CompileSuggestionRequest.context_size][google.cloud.dialogflow.v2beta1.CompileSuggestionRequest.context_size] field in the request if
- // there aren't that many messages in the conversation.
- int32 context_size = 3;
- }
- // Response messages from an automated agent.
- message ResponseMessage {
- // The text response message.
- message Text {
- // A collection of text responses.
- repeated string text = 1;
- }
- // Indicates that the conversation should be handed off to a human agent.
- //
- // Dialogflow only uses this to determine which conversations were handed off
- // to a human agent for measurement purposes. What else to do with this signal
- // is up to you and your handoff procedures.
- //
- // You may set this, for example:
- // * In the entry fulfillment of a CX Page if entering the page indicates
- // something went extremely wrong in the conversation.
- // * In a webhook response when you determine that the customer issue can only
- // be handled by a human.
- message LiveAgentHandoff {
- // Custom metadata for your handoff procedure. Dialogflow doesn't impose
- // any structure on this.
- google.protobuf.Struct metadata = 1;
- }
- // Indicates that interaction with the Dialogflow agent has ended.
- message EndInteraction {
- }
- // Represents an audio message that is composed of both segments
- // synthesized from the Dialogflow agent prompts and ones hosted externally
- // at the specified URIs.
- message MixedAudio {
- // Represents one segment of audio.
- message Segment {
- // Content of the segment.
- oneof content {
- // Raw audio synthesized from the Dialogflow agent's response using
- // the output config specified in the request.
- bytes audio = 1;
- // Client-specific URI that points to an audio clip accessible to the
- // client.
- string uri = 2;
- }
- // Whether the playback of this segment can be interrupted by the end
- // user's speech and the client should then start the next Dialogflow
- // request.
- bool allow_playback_interruption = 3;
- }
- // Segments this audio response is composed of.
- repeated Segment segments = 1;
- }
- // Represents the signal that telles the client to transfer the phone call
- // connected to the agent to a third-party endpoint.
- message TelephonyTransferCall {
- // Endpoint to transfer the call to.
- oneof endpoint {
- // Transfer the call to a phone number
- // in [E.164 format](https://en.wikipedia.org/wiki/E.164).
- string phone_number = 1;
- // Transfer the call to a SIP endpoint.
- string sip_uri = 2;
- }
- }
- // Required. The rich response message.
- oneof message {
- // Returns a text response.
- Text text = 1;
- // Returns a response containing a custom, platform-specific payload.
- google.protobuf.Struct payload = 2;
- // Hands off conversation to a live agent.
- LiveAgentHandoff live_agent_handoff = 3;
- // A signal that indicates the interaction with the Dialogflow agent has
- // ended.
- EndInteraction end_interaction = 4;
- // An audio response message composed of both the synthesized Dialogflow
- // agent responses and the audios hosted in places known to the client.
- MixedAudio mixed_audio = 5;
- // A signal that the client should transfer the phone call connected to
- // this agent to a third-party endpoint.
- TelephonyTransferCall telephony_transfer_call = 6;
- }
- }
|