Skip to content

Commit 58187af

Browse files
Google APIscopybara-github
authored andcommitted
feat: added Automated agent reply type and allow cancellation flag for partial response feature.
PiperOrigin-RevId: 379370373
1 parent 6ddf77d commit 58187af

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

google/cloud/dialogflow/v2/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ proto_library(
5151
"//google/longrunning:operations_proto",
5252
"//google/rpc:status_proto",
5353
"//google/type:latlng_proto",
54+
"@com_google_protobuf//:any_proto",
5455
"@com_google_protobuf//:duration_proto",
5556
"@com_google_protobuf//:empty_proto",
5657
"@com_google_protobuf//:field_mask_proto",

google/cloud/dialogflow/v2/participant.proto

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/v2/audio_config.proto";
2424
import "google/cloud/dialogflow/v2/session.proto";
25+
import "google/protobuf/any.proto";
2526
import "google/protobuf/duration.proto";
2627
import "google/protobuf/field_mask.proto";
2728
import "google/protobuf/struct.proto";
@@ -473,8 +474,30 @@ message OutputAudio {
473474

474475
// Represents a response from an automated agent.
475476
message AutomatedAgentReply {
477+
// Represents different automated agent reply types.
478+
enum AutomatedAgentReplyType {
479+
// Not specified. This should never happen.
480+
AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0;
481+
482+
// Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables
483+
// `return_partial_response` can be returned as partial reply.
484+
// WARNING: partial reply is not eligible for barge-in.
485+
PARTIAL = 1;
486+
487+
// Final reply.
488+
FINAL = 2;
489+
}
490+
476491
// Response of the Dialogflow [Sessions.DetectIntent][google.cloud.dialogflow.v2.Sessions.DetectIntent] call.
477492
DetectIntentResponse detect_intent_response = 1;
493+
494+
// AutomatedAgentReply type.
495+
AutomatedAgentReplyType automated_agent_reply_type = 7;
496+
497+
// Indicates whether the partial automated agent reply is interruptible when a
498+
// later reply message arrives. e.g. if the agent specified some music as
499+
// partial response, it can be cancelled.
500+
bool allow_cancellation = 8;
478501
}
479502

480503
// Represents article answer.

0 commit comments

Comments
 (0)