Skip to content

Commit 14b7a25

Browse files
Google APIscopybara-github
authored andcommitted
feat: removed OPTIONAL for speech model variant
docs: added more docs for speech model variant and improved docs format for participant PiperOrigin-RevId: 416079722
1 parent 987192d commit 14b7a25

3 files changed

Lines changed: 53 additions & 81 deletions

File tree

google/cloud/dialogflow/v2/audio_config.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,14 @@ message OutputAudioConfig {
340340

341341
// Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile].
342342
message SpeechToTextConfig {
343-
// Optional. The speech model used in speech to text.
343+
// The speech model used in speech to text.
344344
// `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as
345345
// `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and
346346
// [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request.
347-
SpeechModelVariant speech_model_variant = 1 [(google.api.field_behavior) = OPTIONAL];
347+
// If enhanced model variant is specified and an enhanced
348+
// version of the specified model for the language does not exist, then it
349+
// would emit an error.
350+
SpeechModelVariant speech_model_variant = 1;
348351
}
349352

350353
// Audio encoding of the output audio format in Text-To-Speech.

google/cloud/dialogflow/v2/conversation_profile.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/v2/audio_config.proto";
2424
import "google/cloud/dialogflow/v2/participant.proto";
2525
import "google/longrunning/operations.proto";
26+
import "google/protobuf/duration.proto";
2627
import "google/protobuf/empty.proto";
2728
import "google/protobuf/field_mask.proto";
2829
import "google/protobuf/timestamp.proto";

google/cloud/dialogflow/v2/participant.proto

Lines changed: 47 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ service Participants {
6969
}
7070

7171
// Returns the list of all participants in the specified conversation.
72-
rpc ListParticipants(ListParticipantsRequest)
73-
returns (ListParticipantsResponse) {
72+
rpc ListParticipants(ListParticipantsRequest) returns (ListParticipantsResponse) {
7473
option (google.api.http) = {
7574
get: "/v2/{parent=projects/*/conversations/*}/participants"
7675
additional_bindings {
@@ -114,8 +113,7 @@ service Participants {
114113

115114
// Gets suggested articles for a participant based on specific historical
116115
// messages.
117-
rpc SuggestArticles(SuggestArticlesRequest)
118-
returns (SuggestArticlesResponse) {
116+
rpc SuggestArticles(SuggestArticlesRequest) returns (SuggestArticlesResponse) {
119117
option (google.api.http) = {
120118
post: "/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestArticles"
121119
body: "*"
@@ -129,8 +127,7 @@ service Participants {
129127

130128
// Gets suggested faq answers for a participant based on specific historical
131129
// messages.
132-
rpc SuggestFaqAnswers(SuggestFaqAnswersRequest)
133-
returns (SuggestFaqAnswersResponse) {
130+
rpc SuggestFaqAnswers(SuggestFaqAnswersRequest) returns (SuggestFaqAnswersResponse) {
134131
option (google.api.http) = {
135132
post: "/v2/{parent=projects/*/conversations/*/participants/*}/suggestions:suggestFaqAnswers"
136133
body: "*"
@@ -172,19 +169,18 @@ message Participant {
172169
// ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
173170
string name = 1 [(google.api.field_behavior) = OPTIONAL];
174171

175-
// Immutable. The role this participant plays in the conversation. This field
176-
// must be set during participant creation and is then immutable.
172+
// Immutable. The role this participant plays in the conversation. This field must be set
173+
// during participant creation and is then immutable.
177174
Role role = 2 [(google.api.field_behavior) = IMMUTABLE];
178175

179176
// Optional. Label applied to streams representing this participant in SIPREC
180177
// XML metadata and SDP. This is used to assign transcriptions from that
181178
// media stream to this participant. This field can be updated.
182179
string sip_recording_media_label = 6 [(google.api.field_behavior) = OPTIONAL];
183180

184-
// Optional. Key-value filters on the metadata of documents returned by
185-
// article suggestion. If specified, article suggestion only returns suggested
186-
// documents that match all filters in their
187-
// [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple
181+
// Optional. Key-value filters on the metadata of documents returned by article
182+
// suggestion. If specified, article suggestion only returns suggested
183+
// documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple
188184
// values for a metadata key should be concatenated by comma. For example,
189185
// filters to match all documents that have 'US' or 'CA' in their market
190186
// metadata values and 'agent' in their user metadata values will be
@@ -198,8 +194,7 @@ message Participant {
198194
// value: "agent"
199195
// }
200196
// ```
201-
map<string, string> documents_metadata_filters = 8
202-
[(google.api.field_behavior) = OPTIONAL];
197+
map<string, string> documents_metadata_filters = 8 [(google.api.field_behavior) = OPTIONAL];
203198
}
204199

205200
// Represents a message posted into a conversation.
@@ -227,20 +222,16 @@ message Message {
227222
string participant = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
228223

229224
// Output only. The role of the participant.
230-
Participant.Role participant_role = 5
231-
[(google.api.field_behavior) = OUTPUT_ONLY];
225+
Participant.Role participant_role = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
232226

233227
// Output only. The time when the message was created.
234-
google.protobuf.Timestamp create_time = 6
235-
[(google.api.field_behavior) = OUTPUT_ONLY];
228+
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
236229

237230
// Output only. The annotation for the message.
238-
MessageAnnotation message_annotation = 7
239-
[(google.api.field_behavior) = OUTPUT_ONLY];
231+
MessageAnnotation message_annotation = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
240232
}
241233

242-
// The request message for
243-
// [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant].
234+
// The request message for [Participants.CreateParticipant][google.cloud.dialogflow.v2.Participants.CreateParticipant].
244235
message CreateParticipantRequest {
245236
// Required. Resource identifier of the conversation adding the participant.
246237
// Format: `projects/<Project ID>/locations/<Location
@@ -256,8 +247,7 @@ message CreateParticipantRequest {
256247
Participant participant = 2 [(google.api.field_behavior) = REQUIRED];
257248
}
258249

259-
// The request message for
260-
// [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant].
250+
// The request message for [Participants.GetParticipant][google.cloud.dialogflow.v2.Participants.GetParticipant].
261251
message GetParticipantRequest {
262252
// Required. The name of the participant. Format:
263253
// `projects/<Project ID>/locations/<Location ID>/conversations/<Conversation
@@ -270,8 +260,7 @@ message GetParticipantRequest {
270260
];
271261
}
272262

273-
// The request message for
274-
// [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
263+
// The request message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
275264
message ListParticipantsRequest {
276265
// Required. The conversation to list all participants from.
277266
// Format: `projects/<Project ID>/locations/<Location
@@ -291,8 +280,7 @@ message ListParticipantsRequest {
291280
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
292281
}
293282

294-
// The response message for
295-
// [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
283+
// The response message for [Participants.ListParticipants][google.cloud.dialogflow.v2.Participants.ListParticipants].
296284
message ListParticipantsResponse {
297285
// The list of participants. There is a maximum number of items
298286
// returned based on the page_size field in the request.
@@ -303,19 +291,16 @@ message ListParticipantsResponse {
303291
string next_page_token = 2;
304292
}
305293

306-
// The request message for
307-
// [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant].
294+
// The request message for [Participants.UpdateParticipant][google.cloud.dialogflow.v2.Participants.UpdateParticipant].
308295
message UpdateParticipantRequest {
309296
// Required. The participant to update.
310297
Participant participant = 1 [(google.api.field_behavior) = REQUIRED];
311298

312299
// Required. The mask to specify which fields to update.
313-
google.protobuf.FieldMask update_mask = 2
314-
[(google.api.field_behavior) = REQUIRED];
300+
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
315301
}
316302

317-
// The request message for
318-
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
303+
// The request message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
319304
message AnalyzeContentRequest {
320305
// Required. The name of the participant this text comes from.
321306
// Format: `projects/<Project ID>/locations/<Location
@@ -361,8 +346,7 @@ message DtmfParameters {
361346
bool accepts_dtmf_input = 1;
362347
}
363348

364-
// The response message for
365-
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
349+
// The response message for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
366350
message AnalyzeContentResponse {
367351
// The output text content.
368352
// This field is set if the automated agent responded with text to show to
@@ -385,32 +369,27 @@ message AnalyzeContentResponse {
385369
// Only set if a Dialogflow automated agent has responded.
386370
// Note that: [AutomatedAgentReply.detect_intent_response.output_audio][]
387371
// and [AutomatedAgentReply.detect_intent_response.output_audio_config][]
388-
// are always empty, use
389-
// [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio]
390-
// instead.
372+
// are always empty, use [reply_audio][google.cloud.dialogflow.v2.AnalyzeContentResponse.reply_audio] instead.
391373
AutomatedAgentReply automated_agent_reply = 3;
392374

393375
// Message analyzed by CCAI.
394376
Message message = 5;
395377

396378
// The suggestions for most recent human agent. The order is the same as
397-
// [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs]
398-
// of
379+
// [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
399380
// [HumanAgentAssistantConfig.human_agent_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.human_agent_suggestion_config].
400381
repeated SuggestionResult human_agent_suggestion_results = 6;
401382

402383
// The suggestions for end user. The order is the same as
403-
// [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs]
404-
// of
384+
// [HumanAgentAssistantConfig.SuggestionConfig.feature_configs][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.SuggestionConfig.feature_configs] of
405385
// [HumanAgentAssistantConfig.end_user_suggestion_config][google.cloud.dialogflow.v2.HumanAgentAssistantConfig.end_user_suggestion_config].
406386
repeated SuggestionResult end_user_suggestion_results = 7;
407387

408388
// Indicates the parameters of DTMF.
409389
DtmfParameters dtmf_parameters = 9;
410390
}
411391

412-
// The request message for
413-
// [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
392+
// The request message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
414393
message SuggestArticlesRequest {
415394
// Required. The name of the participant to fetch suggestion for.
416395
// Format: `projects/<Project ID>/locations/<Location
@@ -428,21 +407,19 @@ message SuggestArticlesRequest {
428407
// Format: `projects/<Project ID>/locations/<Location
429408
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
430409
string latest_message = 2 [(google.api.resource_reference) = {
431-
type: "dialogflow.googleapis.com/Message"
432-
}];
410+
type: "dialogflow.googleapis.com/Message"
411+
}];
433412

434413
// Max number of messages prior to and including
435-
// [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message]
436-
// to use as context when compiling the suggestion. By default 20 and at
437-
// most 50.
414+
// [latest_message][google.cloud.dialogflow.v2.SuggestArticlesRequest.latest_message] to use as context
415+
// when compiling the suggestion. By default 20 and at most 50.
438416
int32 context_size = 3;
439417

440418
// Parameters for a human assist query.
441419
AssistQueryParameters assist_query_params = 4;
442420
}
443421

444-
// The response message for
445-
// [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
422+
// The response message for [Participants.SuggestArticles][google.cloud.dialogflow.v2.Participants.SuggestArticles].
446423
message SuggestArticlesResponse {
447424
// Articles ordered by score in descending order.
448425
repeated ArticleAnswer article_answers = 1;
@@ -455,16 +432,14 @@ message SuggestArticlesResponse {
455432
string latest_message = 2;
456433

457434
// Number of messages prior to and including
458-
// [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message]
459-
// to compile the suggestion. It may be smaller than the
460-
// [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size]
461-
// field in the request if there aren't that many messages in the
462-
// conversation.
435+
// [latest_message][google.cloud.dialogflow.v2.SuggestArticlesResponse.latest_message] to compile the
436+
// suggestion. It may be smaller than the
437+
// [SuggestArticlesRequest.context_size][google.cloud.dialogflow.v2.SuggestArticlesRequest.context_size] field in the request if there
438+
// aren't that many messages in the conversation.
463439
int32 context_size = 3;
464440
}
465441

466-
// The request message for
467-
// [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
442+
// The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
468443
message SuggestFaqAnswersRequest {
469444
// Required. The name of the participant to fetch suggestion for.
470445
// Format: `projects/<Project ID>/locations/<Location
@@ -482,8 +457,8 @@ message SuggestFaqAnswersRequest {
482457
// Format: `projects/<Project ID>/locations/<Location
483458
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
484459
string latest_message = 2 [(google.api.resource_reference) = {
485-
type: "dialogflow.googleapis.com/Message"
486-
}];
460+
type: "dialogflow.googleapis.com/Message"
461+
}];
487462

488463
// Max number of messages prior to and including
489464
// [latest_message] to use as context when compiling the
@@ -494,8 +469,7 @@ message SuggestFaqAnswersRequest {
494469
AssistQueryParameters assist_query_params = 4;
495470
}
496471

497-
// The request message for
498-
// [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
472+
// The request message for [Participants.SuggestFaqAnswers][google.cloud.dialogflow.v2.Participants.SuggestFaqAnswers].
499473
message SuggestFaqAnswersResponse {
500474
// Answers extracted from FAQ documents.
501475
repeated FaqAnswer faq_answers = 1;
@@ -508,11 +482,10 @@ message SuggestFaqAnswersResponse {
508482
string latest_message = 2;
509483

510484
// Number of messages prior to and including
511-
// [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message]
512-
// to compile the suggestion. It may be smaller than the
513-
// [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size]
514-
// field in the request if there aren't that many messages in the
515-
// conversation.
485+
// [latest_message][google.cloud.dialogflow.v2.SuggestFaqAnswersResponse.latest_message] to compile the
486+
// suggestion. It may be smaller than the
487+
// [SuggestFaqAnswersRequest.context_size][google.cloud.dialogflow.v2.SuggestFaqAnswersRequest.context_size] field in the request if there
488+
// aren't that many messages in the conversation.
516489
int32 context_size = 3;
517490
}
518491

@@ -542,9 +515,7 @@ message AutomatedAgentReply {
542515
FINAL = 2;
543516
}
544517

545-
// Response of the Dialogflow
546-
// [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent]
547-
// call.
518+
// Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call.
548519
DetectIntentResponse detect_intent_response = 1;
549520

550521
// AutomatedAgentReply type.
@@ -613,12 +584,8 @@ message FaqAnswer {
613584
}
614585

615586
// One response of different type of suggestion response which is used in
616-
// the response of
617-
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
618-
// and
619-
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent],
620-
// as well as
621-
// [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent].
587+
// the response of [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and
588+
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent], as well as [HumanAgentAssistantEvent][google.cloud.dialogflow.v2.HumanAgentAssistantEvent].
622589
message SuggestionResult {
623590
// Different type of suggestion response.
624591
oneof suggestion_response {
@@ -674,11 +641,11 @@ message MessageAnnotation {
674641
message AssistQueryParameters {
675642
// Key-value filters on the metadata of documents returned by article
676643
// suggestion. If specified, article suggestion only returns suggested
677-
// documents that match all filters in their
678-
// [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple
644+
// documents that match all filters in their [Document.metadata][google.cloud.dialogflow.v2.Document.metadata]. Multiple
679645
// values for a metadata key should be concatenated by comma. For example,
680646
// filters to match all documents that have 'US' or 'CA' in their market
681647
// metadata values and 'agent' in their user metadata values will be
648+
// ```
682649
// documents_metadata_filters {
683650
// key: "market"
684651
// value: "US,CA"
@@ -687,5 +654,6 @@ message AssistQueryParameters {
687654
// key: "user"
688655
// value: "agent"
689656
// }
657+
// ```
690658
map<string, string> documents_metadata_filters = 1;
691659
}

0 commit comments

Comments
 (0)