Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
feat: add support for service directory webhooks (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored May 10, 2021
1 parent 3a8236d commit d4b87a5
Show file tree
Hide file tree
Showing 7 changed files with 561 additions and 197 deletions.
50 changes: 25 additions & 25 deletions protos/google/cloud/dialogflow/cx/v3beta1/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,6 @@ option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
Expand Down Expand Up @@ -103,6 +78,31 @@ enum AudioEncoding {
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
}

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Instructs the speech recognizer on how to process the audio content.
message InputAudioConfig {
// Required. Audio encoding of the audio content to process.
Expand Down
189 changes: 81 additions & 108 deletions protos/google/cloud/dialogflow/cx/v3beta1/session.proto

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions protos/google/cloud/dialogflow/cx/v3beta1/webhook.proto
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,26 @@ message Webhook {
map<string, string> request_headers = 4;
}

// Represents configuration for a [Service
// Directory](https://cloud.google.com/service-directory) service.
message ServiceDirectoryConfig {
// Required. The name of [Service
// Directory](https://cloud.google.com/service-directory) service.
// Format: `projects/<Project ID>/locations/<Location
// ID>/namespaces/<Namespace ID>/services/<Service ID>`.
// `Location ID` of the service directory must be the same as the location
// of the agent.
string service = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "servicedirectory.googleapis.com/Service"
}
];

// Generic Service configuration of this webhook.
GenericWebService generic_web_service = 2;
}

// The unique identifier of the webhook.
// Required for the [Webhooks.UpdateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.UpdateWebhook] method.
// [Webhooks.CreateWebhook][google.cloud.dialogflow.cx.v3beta1.Webhooks.CreateWebhook] populates the name automatically.
Expand All @@ -128,6 +148,10 @@ message Webhook {
oneof webhook {
// Configuration for a generic web service.
GenericWebService generic_web_service = 4;

// Configuration for a [Service
// Directory](https://cloud.google.com/service-directory) service.
ServiceDirectoryConfig service_directory = 7;
}

// Webhook execution timeout. Execution is considered failed if Dialogflow
Expand Down
128 changes: 115 additions & 13 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d4b87a5

Please sign in to comment.