Skip to content

Commit 551ddbb

Browse files
Google APIscopybara-github
authored andcommitted
feat: include original user query in WebhookRequest; add GetTextCaseresult API.
doc: clarify resource format for session response. PiperOrigin-RevId: 364734171
1 parent d76f26f commit 551ddbb

4 files changed

Lines changed: 61 additions & 10 deletions

File tree

google/cloud/dialogflow/cx/v3beta1/session.proto

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,14 @@ message QueryResult {
452452

453453
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
454454
// contain a copy of the intent identifier.
455-
string trigger_intent = 11;
455+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
456+
// ID>/intents/<Intent ID>`.
457+
string trigger_intent = 11 [(google.api.resource_reference) = {
458+
type: "dialogflow.googleapis.com/Intent"
459+
}];
456460

457461
// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
458-
// this field will contain the trascript for the audio.
462+
// this field will contain the transcript for the audio.
459463
string transcript = 12;
460464

461465
// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will contain
@@ -694,10 +698,14 @@ message MatchIntentResponse {
694698

695699
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
696700
// contain a copy of the intent identifier.
697-
string trigger_intent = 2;
701+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
702+
// ID>/intents/<Intent ID>`.
703+
string trigger_intent = 2 [(google.api.resource_reference) = {
704+
type: "dialogflow.googleapis.com/Intent"
705+
}];
698706

699707
// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
700-
// this field will contain the trascript for the audio.
708+
// this field will contain the transcript for the audio.
701709
string transcript = 3;
702710

703711
// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will

google/cloud/dialogflow/cx/v3beta1/session_entity_type.proto

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ service SessionEntityTypes {
6262
}
6363

6464
// Creates a session entity type.
65-
//
66-
// If the specified session entity type already exists, overrides the
67-
// session entity type.
6865
rpc CreateSessionEntityType(CreateSessionEntityTypeRequest) returns (SessionEntityType) {
6966
option (google.api.http) = {
7067
post: "/v3beta1/{parent=projects/*/locations/*/agents/*/sessions/*}/entityTypes"

google/cloud/dialogflow/cx/v3beta1/test_case.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ service TestCases {
157157
};
158158
option (google.api.method_signature) = "parent";
159159
}
160+
161+
// Gets a test case result.
162+
rpc GetTestCaseResult(GetTestCaseResultRequest) returns (TestCaseResult) {
163+
option (google.api.http) = {
164+
get: "/v3beta1/{name=projects/*/locations/*/agents/*/testCases/*/results/*}"
165+
};
166+
option (google.api.method_signature) = "name";
167+
}
160168
}
161169

162170
// Represents a test case.
@@ -862,6 +870,19 @@ message ListTestCaseResultsResponse {
862870
string next_page_token = 2;
863871
}
864872

873+
// The request message for [TestCases.GetTestCaseResult][google.cloud.dialogflow.cx.v3beta1.TestCases.GetTestCaseResult].
874+
message GetTestCaseResultRequest {
875+
// Required. The name of the testcase.
876+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
877+
// ID>/testCases/<TestCase ID>/results/<TestCaseResult ID>`.
878+
string name = 1 [
879+
(google.api.field_behavior) = REQUIRED,
880+
(google.api.resource_reference) = {
881+
type: "dialogflow.googleapis.com/TestCaseResult"
882+
}
883+
];
884+
}
885+
865886
// The test result for a test case and an agent environment.
866887
enum TestResult {
867888
// Not specified. Should never be used.

google/cloud/dialogflow/cx/v3beta1/webhook.proto

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ message DeleteWebhookRequest {
231231
bool force = 2;
232232
}
233233

234-
// The request message for a webhook call.
234+
// The request message for a webhook call. The request is sent as a JSON object
235+
// and the field names will be presented in camel cases.
235236
message WebhookRequest {
236237
// Represents fulfillment information communicated to the webhook.
237238
message FulfillmentInfo {
@@ -253,8 +254,9 @@ message WebhookRequest {
253254
}
254255

255256
// Always present. The unique identifier of the last matched
256-
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent]. Format: `projects/<Project ID>/locations/<Location
257-
// ID>/agents/<Agent ID>/intents/<Intent ID>`.
257+
// [intent][google.cloud.dialogflow.cx.v3beta1.Intent].
258+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
259+
// ID>/intents/<Intent ID>`.
258260
string last_matched_intent = 1 [(google.api.resource_reference) = {
259261
type: "dialogflow.googleapis.com/Intent"
260262
}];
@@ -289,6 +291,29 @@ message WebhookRequest {
289291
// will be returned to the API caller.
290292
string detect_intent_response_id = 1;
291293

294+
// The original conversational query.
295+
oneof query {
296+
// If [natural language text][google.cloud.dialogflow.cx.v3beta1.TextInput] was provided as input, this field
297+
// will contain a copy of the text.
298+
string text = 10;
299+
300+
// If an [intent][google.cloud.dialogflow.cx.v3beta1.IntentInput] was provided as input, this field will
301+
// contain a copy of the intent identifier.
302+
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
303+
// ID>/intents/<Intent ID>`.
304+
string trigger_intent = 11 [(google.api.resource_reference) = {
305+
type: "dialogflow.googleapis.com/Intent"
306+
}];
307+
308+
// If [natural language speech audio][google.cloud.dialogflow.cx.v3beta1.AudioInput] was provided as input,
309+
// this field will contain the transcript for the audio.
310+
string transcript = 12;
311+
312+
// If an [event][google.cloud.dialogflow.cx.v3beta1.EventInput] was provided as input, this field will contain
313+
// the name of the event.
314+
string trigger_event = 14;
315+
}
316+
292317
// Always present. Information about the fulfillment that triggered this
293318
// webhook call.
294319
FulfillmentInfo fulfillment_info = 6;

0 commit comments

Comments
 (0)