mirror of
https://github.com/googleapis/googleapis.git
synced 2026-08-19 13:17:47 +02:00
feat: supports SentimentAnalysisResult in webhook request
docs: minor updates in wording PiperOrigin-RevId: 356624136
This commit is contained in:
parent
9b95bf0e95
commit
e28aa8570d
5 changed files with 95 additions and 86 deletions
|
|
@ -29,6 +29,31 @@ 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
|
||||
|
|
@ -78,31 +103,6 @@ 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.
|
||||
|
|
|
|||
|
|
@ -93,6 +93,21 @@ backend:
|
|||
- selector: 'google.longrunning.Operations.*'
|
||||
deadline: 60.0
|
||||
|
||||
http:
|
||||
rules:
|
||||
- selector: google.longrunning.Operations.CancelOperation
|
||||
post: '/v3beta1/{name=projects/*/operations/*}:cancel'
|
||||
additional_bindings:
|
||||
- post: '/v3beta1/{name=projects/*/locations/*/operations/*}:cancel'
|
||||
- selector: google.longrunning.Operations.GetOperation
|
||||
get: '/v3beta1/{name=projects/*/operations/*}'
|
||||
additional_bindings:
|
||||
- get: '/v3beta1/{name=projects/*/locations/*/operations/*}'
|
||||
- selector: google.longrunning.Operations.ListOperations
|
||||
get: '/v3beta1/{name=projects/*}/operations'
|
||||
additional_bindings:
|
||||
- get: '/v3beta1/{name=projects/*/locations/*}/operations'
|
||||
|
||||
authentication:
|
||||
rules:
|
||||
- selector: 'google.cloud.dialogflow.cx.v3beta1.Agents.*'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 Google LLC
|
||||
// Copyright 2020 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
|
@ -33,26 +33,22 @@ option java_outer_classname = "ExperimentProto";
|
|||
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
|
||||
option objc_class_prefix = "DF";
|
||||
|
||||
// Service for managing
|
||||
// [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
// Service for managing [Experiments][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
service Experiments {
|
||||
option (google.api.default_host) = "dialogflow.googleapis.com";
|
||||
option (google.api.oauth_scopes) =
|
||||
"https://www.googleapis.com/auth/cloud-platform,"
|
||||
"https://www.googleapis.com/auth/dialogflow";
|
||||
|
||||
// Returns the list of all experiments in the specified
|
||||
// [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
|
||||
rpc ListExperiments(ListExperimentsRequest)
|
||||
returns (ListExperimentsResponse) {
|
||||
// Returns the list of all experiments in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
|
||||
rpc ListExperiments(ListExperimentsRequest) returns (ListExperimentsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments"
|
||||
};
|
||||
option (google.api.method_signature) = "parent";
|
||||
}
|
||||
|
||||
// Retrieves the specified
|
||||
// [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
// Retrieves the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
rpc GetExperiment(GetExperimentRequest) returns (Experiment) {
|
||||
option (google.api.http) = {
|
||||
get: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}"
|
||||
|
|
@ -60,9 +56,7 @@ service Experiments {
|
|||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in
|
||||
// the specified
|
||||
// [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
|
||||
// Creates an [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment] in the specified [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
|
||||
rpc CreateExperiment(CreateExperimentRequest) returns (Experiment) {
|
||||
option (google.api.http) = {
|
||||
post: "/v3beta1/{parent=projects/*/locations/*/agents/*/environments/*}/experiments"
|
||||
|
|
@ -71,8 +65,7 @@ service Experiments {
|
|||
option (google.api.method_signature) = "parent,experiment";
|
||||
}
|
||||
|
||||
// Updates the specified
|
||||
// [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
// Updates the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
rpc UpdateExperiment(UpdateExperimentRequest) returns (Experiment) {
|
||||
option (google.api.http) = {
|
||||
patch: "/v3beta1/{experiment.name=projects/*/locations/*/agents/*/environments/*/experiments/*}"
|
||||
|
|
@ -81,19 +74,16 @@ service Experiments {
|
|||
option (google.api.method_signature) = "experiment,update_mask";
|
||||
}
|
||||
|
||||
// Deletes the specified
|
||||
// [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
rpc DeleteExperiment(DeleteExperimentRequest)
|
||||
returns (google.protobuf.Empty) {
|
||||
// Deletes the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
|
||||
rpc DeleteExperiment(DeleteExperimentRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
delete: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}"
|
||||
};
|
||||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Starts the specified
|
||||
// [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
|
||||
// changes the state of experiment from PENDING to RUNNING.
|
||||
// Starts the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
|
||||
// experiment from PENDING to RUNNING.
|
||||
rpc StartExperiment(StartExperimentRequest) returns (Experiment) {
|
||||
option (google.api.http) = {
|
||||
post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:start"
|
||||
|
|
@ -102,9 +92,8 @@ service Experiments {
|
|||
option (google.api.method_signature) = "name";
|
||||
}
|
||||
|
||||
// Stops the specified
|
||||
// [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only
|
||||
// changes the state of experiment from RUNNING to DONE.
|
||||
// Stops the specified [Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment]. This rpc only changes the state of
|
||||
// experiment from RUNNING to DONE.
|
||||
rpc StopExperiment(StopExperimentRequest) returns (Experiment) {
|
||||
option (google.api.http) = {
|
||||
post: "/v3beta1/{name=projects/*/locations/*/agents/*/environments/*/experiments/*}:stop"
|
||||
|
|
@ -184,13 +173,12 @@ message Experiment {
|
|||
|
||||
// Version variant and associated metrics.
|
||||
message VersionMetrics {
|
||||
// The name of the flow
|
||||
// [Version][google.cloud.dialogflow.cx.v3beta1.Version]. Format:
|
||||
// `projects/<Project Number>/locations/<Location ID>/agents/<Agent
|
||||
// ID>/flows/<Flow ID>/versions/<Version ID>`.
|
||||
// The name of the flow [Version][google.cloud.dialogflow.cx.v3beta1.Version].
|
||||
// Format: `projects/<Project Number>/locations/<Location
|
||||
// ID>/agents/<Agent ID>/flows/<Flow ID>/versions/<Version ID>`.
|
||||
string version = 1 [(google.api.resource_reference) = {
|
||||
type: "dialogflow.googleapis.com/Version"
|
||||
}];
|
||||
type: "dialogflow.googleapis.com/Version"
|
||||
}];
|
||||
|
||||
// The metrics and corresponding confidence intervals in the inference
|
||||
// result.
|
||||
|
|
@ -265,8 +253,8 @@ message Experiment {
|
|||
// ID>/environments/<Environment ID>/experiments/<Experiment ID>..
|
||||
string name = 1;
|
||||
|
||||
// Required. The human-readable name of the experiment (unique in an
|
||||
// environment). Limit of 64 characters.
|
||||
// Required. The human-readable name of the experiment (unique in an environment). Limit
|
||||
// of 64 characters.
|
||||
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// The human-readable description of the experiment.
|
||||
|
|
@ -337,13 +325,11 @@ message VariantsHistory {
|
|||
google.protobuf.Timestamp update_time = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
|
||||
// The request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
|
||||
message ListExperimentsRequest {
|
||||
// Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]
|
||||
// to list all environments for. Format: `projects/<Project
|
||||
// ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment
|
||||
// ID>`.
|
||||
// Required. The [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to list all environments for.
|
||||
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
// ID>/environments/<Environment ID>`.
|
||||
string parent = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
(google.api.resource_reference) = {
|
||||
|
|
@ -359,8 +345,7 @@ message ListExperimentsRequest {
|
|||
string page_token = 3;
|
||||
}
|
||||
|
||||
// The response message for
|
||||
// [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
|
||||
// The response message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3beta1.Experiments.ListExperiments].
|
||||
message ListExperimentsResponse {
|
||||
// The list of experiments. There will be a maximum number of items
|
||||
// returned based on the page_size field in the request. The list may in some
|
||||
|
|
@ -373,12 +358,10 @@ message ListExperimentsResponse {
|
|||
string next_page_token = 2;
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
|
||||
// The request message for [Experiments.GetExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.GetExperiment].
|
||||
message GetExperimentRequest {
|
||||
// Required. The name of the
|
||||
// [Environment][google.cloud.dialogflow.cx.v3beta1.Environment]. Format:
|
||||
// `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
// Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment].
|
||||
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
// ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
|
||||
string name = 1 [
|
||||
(google.api.field_behavior) = REQUIRED,
|
||||
|
|
@ -388,11 +371,9 @@ message GetExperimentRequest {
|
|||
];
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
|
||||
// The request message for [Experiments.CreateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.CreateExperiment].
|
||||
message CreateExperimentRequest {
|
||||
// Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create
|
||||
// an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
|
||||
// Required. The [Agent][google.cloud.dialogflow.cx.v3beta1.Agent] to create an [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] for.
|
||||
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
// ID>/environments/<Environment ID>`.
|
||||
string parent = 1 [
|
||||
|
|
@ -406,22 +387,18 @@ message CreateExperimentRequest {
|
|||
Experiment experiment = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
|
||||
// The request message for [Experiments.UpdateExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.UpdateExperiment].
|
||||
message UpdateExperimentRequest {
|
||||
// Required. The experiment to update.
|
||||
Experiment experiment = 1 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Required. The mask to control which fields get updated.
|
||||
google.protobuf.FieldMask update_mask = 2
|
||||
[(google.api.field_behavior) = REQUIRED];
|
||||
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
|
||||
// The request message for [Experiments.DeleteExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.DeleteExperiment].
|
||||
message DeleteExperimentRequest {
|
||||
// Required. The name of the
|
||||
// [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
|
||||
// Required. The name of the [Environment][google.cloud.dialogflow.cx.v3beta1.Environment] to delete.
|
||||
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
// ID>/environments/<Environment ID>/experiments/<Experiment ID>`.
|
||||
string name = 1 [
|
||||
|
|
@ -432,8 +409,7 @@ message DeleteExperimentRequest {
|
|||
];
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
|
||||
// The request message for [Experiments.StartExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StartExperiment].
|
||||
message StartExperimentRequest {
|
||||
// Required. Resource name of the experiment to start.
|
||||
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
|
|
@ -446,8 +422,7 @@ message StartExperimentRequest {
|
|||
];
|
||||
}
|
||||
|
||||
// The request message for
|
||||
// [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
|
||||
// The request message for [Experiments.StopExperiment][google.cloud.dialogflow.cx.v3beta1.Experiments.StopExperiment].
|
||||
message StopExperimentRequest {
|
||||
// Required. Resource name of the experiment to stop.
|
||||
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
|
||||
|
|
|
|||
|
|
@ -150,6 +150,9 @@ message Page {
|
|||
// [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with intent
|
||||
// specified.
|
||||
// * TransitionRoutes defined in flow with intent specified.
|
||||
// * TransitionRoutes defined in the
|
||||
// [transition route groups][google.cloud.dialogflow.cx.v3beta1.Flow.transition_route_groups] with intent
|
||||
// specified.
|
||||
// * TransitionRoutes defined in the page with only condition specified.
|
||||
// * TransitionRoutes defined in the
|
||||
// [transition route groups][google.cloud.dialogflow.cx.v3beta1.Page.transition_route_groups] with only
|
||||
|
|
|
|||
|
|
@ -273,6 +273,18 @@ message WebhookRequest {
|
|||
float confidence = 4;
|
||||
}
|
||||
|
||||
// Represents the result of sentiment analysis.
|
||||
message SentimentAnalysisResult {
|
||||
// Sentiment score between -1.0 (negative sentiment) and 1.0 (positive
|
||||
// sentiment).
|
||||
float score = 1;
|
||||
|
||||
// A non-negative number in the [0, +inf) range, which represents the
|
||||
// absolute magnitude of sentiment, regardless of score (positive or
|
||||
// negative).
|
||||
float magnitude = 2;
|
||||
}
|
||||
|
||||
// Always present. The unique identifier of the [DetectIntentResponse][google.cloud.dialogflow.cx.v3beta1.DetectIntentResponse] that
|
||||
// will be returned to the API caller.
|
||||
string detect_intent_response_id = 1;
|
||||
|
|
@ -297,6 +309,10 @@ message WebhookRequest {
|
|||
|
||||
// Custom data set in [QueryParameters.payload][google.cloud.dialogflow.cx.v3beta1.QueryParameters.payload].
|
||||
google.protobuf.Struct payload = 8;
|
||||
|
||||
// The sentiment analysis result of the current user request. The field is
|
||||
// filled when sentiment analysis is configured to be enabled for the request.
|
||||
SentimentAnalysisResult sentiment_analysis_result = 9;
|
||||
}
|
||||
|
||||
// The response message for a webhook call.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue