Skip to content

Commit 091bc8c

Browse files
Google APIscopybara-github
authored andcommitted
feat: add support for flexible webhook
docs: update synthesize speech configs's documentation PiperOrigin-RevId: 539265734
1 parent 2f59906 commit 091bc8c

3 files changed

Lines changed: 71 additions & 6 deletions

File tree

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ message OutputAudioConfig {
320320
int32 sample_rate_hertz = 2;
321321

322322
// Optional. Configuration of how speech should be synthesized.
323+
// If not specified,
324+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings]
325+
// is applied.
323326
SynthesizeSpeechConfig synthesize_speech_config = 3;
324327
}
325328

@@ -331,12 +334,16 @@ message TextToSpeechSettings {
331334
//
332335
// These settings affect:
333336
//
334-
// - The synthesize configuration used in [phone
335-
// gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway).
337+
// - The [phone
338+
// gateway](https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway)
339+
// synthesize configuration set via
340+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings].
336341
//
337-
// - You no longer need to specify
342+
// - How speech is synthesized when invoking
343+
// [session][google.cloud.dialogflow.cx.v3beta1.Sessions] APIs.
344+
// [Agent.text_to_speech_settings][google.cloud.dialogflow.cx.v3beta1.Agent.text_to_speech_settings]
345+
// only applies if
338346
// [OutputAudioConfig.synthesize_speech_config][google.cloud.dialogflow.cx.v3beta1.OutputAudioConfig.synthesize_speech_config]
339-
// when invoking API calls. Your agent will use the pre-configured options
340-
// for speech synthesizing.
347+
// is not specified.
341348
map<string, SynthesizeSpeechConfig> synthesize_speech_configs = 1;
342349
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,8 @@ message TestRunDifference {
406406
// The type of diff.
407407
DiffType type = 1;
408408

409-
// A description of the diff, showing the actual output vs expected output.
409+
// A human readable description of the diff, showing the actual output vs
410+
// expected output.
410411
string description = 2;
411412
}
412413

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

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,45 @@ message Webhook {
101101

102102
// Represents configuration for a generic web service.
103103
message GenericWebService {
104+
// Represents the type of webhook configuration.
105+
enum WebhookType {
106+
// Default value. This value is unused.
107+
WEBHOOK_TYPE_UNSPECIFIED = 0;
108+
109+
// Represents a standard webhook.
110+
STANDARD = 1;
111+
112+
// Represents a flexible webhook.
113+
FLEXIBLE = 2;
114+
}
115+
116+
// HTTP method to use when calling webhooks.
117+
enum HttpMethod {
118+
// HTTP method not specified.
119+
HTTP_METHOD_UNSPECIFIED = 0;
120+
121+
// HTTP POST Method.
122+
POST = 1;
123+
124+
// HTTP GET Method.
125+
GET = 2;
126+
127+
// HTTP HEAD Method.
128+
HEAD = 3;
129+
130+
// HTTP PUT Method.
131+
PUT = 4;
132+
133+
// HTTP DELETE Method.
134+
DELETE = 5;
135+
136+
// HTTP PATCH Method.
137+
PATCH = 6;
138+
139+
// HTTP OPTIONS Method.
140+
OPTIONS = 7;
141+
}
142+
104143
// Required. The webhook URI for receiving POST requests. It must use https
105144
// protocol.
106145
string uri = 1 [(google.api.field_behavior) = REQUIRED];
@@ -129,6 +168,24 @@ message Webhook {
129168
// ```
130169
repeated bytes allowed_ca_certs = 5
131170
[(google.api.field_behavior) = OPTIONAL];
171+
172+
// Optional. Type of the webhook.
173+
WebhookType webhook_type = 6 [(google.api.field_behavior) = OPTIONAL];
174+
175+
// Optional. HTTP method for the flexible webhook calls. Standard webhook
176+
// always uses POST.
177+
HttpMethod http_method = 7 [(google.api.field_behavior) = OPTIONAL];
178+
179+
// Optional. Defines a custom JSON object as request body to send to
180+
// flexible webhook.
181+
string request_body = 8 [(google.api.field_behavior) = OPTIONAL];
182+
183+
// Optional. Maps the values extracted from specific fields of the flexible
184+
// webhook response into session parameters.
185+
// - Key: session parameter name
186+
// - Value: field path in the webhook response
187+
map<string, string> parameter_mapping = 9
188+
[(google.api.field_behavior) = OPTIONAL];
132189
}
133190

134191
// Represents configuration for a [Service

0 commit comments

Comments
 (0)