docs: update comments on parameters and validation result.
PiperOrigin-RevId: 348673154
This commit is contained in:
parent
36536e21b8
commit
0795e3f854
|
|
@ -83,6 +83,7 @@ java_gapic_library(
|
|||
name = "dialogflow_java_gapic",
|
||||
srcs = [":dialogflow_proto_with_info"],
|
||||
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||
package = "google.cloud.dialogflow.v2",
|
||||
test_deps = [
|
||||
":dialogflow_java_grpc",
|
||||
],
|
||||
|
|
@ -188,6 +189,7 @@ py_gapic_library(
|
|||
grpc_service_config = "dialogflow_grpc_service_config.json",
|
||||
)
|
||||
|
||||
# Open Source Packages
|
||||
py_gapic_assembly_pkg(
|
||||
name = "dialogflow-v2-py",
|
||||
deps = [
|
||||
|
|
|
|||
|
|
@ -29,36 +29,6 @@ option java_outer_classname = "AudioConfigProto";
|
|||
option java_package = "com.google.cloud.dialogflow.v2";
|
||||
option objc_class_prefix = "DF";
|
||||
|
||||
// Hints for the speech recognizer to help with recognition in a specific
|
||||
// conversation state.
|
||||
message SpeechContext {
|
||||
// Optional. A list of strings containing words and phrases that the speech
|
||||
// recognizer should recognize with higher likelihood.
|
||||
//
|
||||
// This list can be used to:
|
||||
//
|
||||
// * improve accuracy for words and phrases you expect the user to say,
|
||||
// e.g. typical commands for your Dialogflow agent
|
||||
// * add additional words to the speech recognizer vocabulary
|
||||
// * ...
|
||||
//
|
||||
// See the [Cloud Speech
|
||||
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
|
||||
// limits.
|
||||
repeated string phrases = 1;
|
||||
|
||||
// Optional. Boost for this context compared to other contexts:
|
||||
//
|
||||
// * If the boost is positive, Dialogflow will increase the probability that
|
||||
// the phrases in this context are recognized over similar sounding phrases.
|
||||
// * If the boost is unspecified or non-positive, Dialogflow will not apply
|
||||
// any boost.
|
||||
//
|
||||
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
|
||||
// find a value that fits your use case with binary search.
|
||||
float boost = 2;
|
||||
}
|
||||
|
||||
// Audio encoding of the audio content sent in the conversational query request.
|
||||
// Refer to the
|
||||
// [Cloud Speech API
|
||||
|
|
@ -108,6 +78,36 @@ enum AudioEncoding {
|
|||
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
|
||||
}
|
||||
|
||||
// Hints for the speech recognizer to help with recognition in a specific
|
||||
// conversation state.
|
||||
message SpeechContext {
|
||||
// Optional. A list of strings containing words and phrases that the speech
|
||||
// recognizer should recognize with higher likelihood.
|
||||
//
|
||||
// This list can be used to:
|
||||
//
|
||||
// * improve accuracy for words and phrases you expect the user to say,
|
||||
// e.g. typical commands for your Dialogflow agent
|
||||
// * add additional words to the speech recognizer vocabulary
|
||||
// * ...
|
||||
//
|
||||
// See the [Cloud Speech
|
||||
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
|
||||
// limits.
|
||||
repeated string phrases = 1;
|
||||
|
||||
// Optional. Boost for this context compared to other contexts:
|
||||
//
|
||||
// * If the boost is positive, Dialogflow will increase the probability that
|
||||
// the phrases in this context are recognized over similar sounding phrases.
|
||||
// * If the boost is unspecified or non-positive, Dialogflow will not apply
|
||||
// any boost.
|
||||
//
|
||||
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
|
||||
// find a value that fits your use case with binary search.
|
||||
float boost = 2;
|
||||
}
|
||||
|
||||
// Information for a word recognized by the speech recognizer.
|
||||
message SpeechWordInfo {
|
||||
// The word this info is for.
|
||||
|
|
|
|||
|
|
@ -169,7 +169,8 @@ message Context {
|
|||
// - MapKey value: parameter name
|
||||
// - MapValue type:
|
||||
// - If parameter's entity type is a composite entity: map
|
||||
// - Else: string or number, depending on parameter value type
|
||||
// - Else: depending on parameter value type, could be one of string,
|
||||
// number, boolean, null, list or map
|
||||
// - MapValue value:
|
||||
// - If parameter's entity type is a composite entity:
|
||||
// map from composite entity property names to property values
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ service Sessions {
|
|||
// Note: Always use agent versions for production traffic.
|
||||
// See [Versions and
|
||||
// environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
|
||||
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest)
|
||||
returns (stream StreamingDetectIntentResponse) {}
|
||||
rpc StreamingDetectIntent(stream StreamingDetectIntentRequest) returns (stream StreamingDetectIntentResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
// The request to detect user's intent.
|
||||
|
|
@ -127,14 +127,12 @@ message DetectIntentRequest {
|
|||
// configured, no output audio is generated.
|
||||
OutputAudioConfig output_audio_config = 4;
|
||||
|
||||
// Mask for
|
||||
// [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config]
|
||||
// indicating which settings in this request-level config should override
|
||||
// speech synthesizer settings defined at agent-level.
|
||||
// Mask for [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] indicating which settings in this
|
||||
// request-level config should override speech synthesizer settings defined at
|
||||
// agent-level.
|
||||
//
|
||||
// If unspecified or empty,
|
||||
// [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config]
|
||||
// replaces the agent-level config in its entirety.
|
||||
// If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.DetectIntentRequest.output_audio_config] replaces the agent-level
|
||||
// config in its entirety.
|
||||
google.protobuf.FieldMask output_audio_config_mask = 7;
|
||||
|
||||
// The natural language speech audio to be processed. This field
|
||||
|
|
@ -284,7 +282,8 @@ message QueryResult {
|
|||
// - MapKey value: parameter name
|
||||
// - MapValue type:
|
||||
// - If parameter's entity type is a composite entity: map
|
||||
// - Else: string or number, depending on parameter value type
|
||||
// - Else: depending on parameter value type, could be one of string,
|
||||
// number, boolean, null, list or map
|
||||
// - MapValue value:
|
||||
// - If parameter's entity type is a composite entity:
|
||||
// map from composite entity property names to property values
|
||||
|
|
@ -350,29 +349,25 @@ message QueryResult {
|
|||
}
|
||||
|
||||
// The top-level message sent by the client to the
|
||||
// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent]
|
||||
// method.
|
||||
// [Sessions.StreamingDetectIntent][google.cloud.dialogflow.v2.Sessions.StreamingDetectIntent] method.
|
||||
//
|
||||
// Multiple request messages should be sent in order:
|
||||
//
|
||||
// 1. The first message must contain
|
||||
// [session][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.session],
|
||||
// [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input]
|
||||
// plus optionally
|
||||
// [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params].
|
||||
// If the client wants to receive an audio response, it should also contain
|
||||
// [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] plus optionally
|
||||
// [query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params]. If the client
|
||||
// wants to receive an audio response, it should also contain
|
||||
// [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config].
|
||||
// The message must not contain
|
||||
// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio].
|
||||
// 2. If
|
||||
// [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input]
|
||||
// was set to
|
||||
// [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig],
|
||||
// all subsequent messages must contain
|
||||
// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio]
|
||||
// to continue with Speech recognition. If you decide to rather detect an
|
||||
// intent from text input after you already started Speech recognition,
|
||||
// please send a message with
|
||||
// 2. If [query_input][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_input] was set to
|
||||
// [query_input.audio_config][google.cloud.dialogflow.v2.InputAudioConfig], all subsequent
|
||||
// messages must contain
|
||||
// [input_audio][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.input_audio] to continue with
|
||||
// Speech recognition.
|
||||
// If you decide to rather detect an intent from text input after you
|
||||
// already started Speech recognition, please send a message with
|
||||
// [query_input.text][google.cloud.dialogflow.v2.QueryInput.text].
|
||||
//
|
||||
// However, note that:
|
||||
|
|
@ -421,15 +416,14 @@ message StreamingDetectIntentRequest {
|
|||
// 3. an event that specifies which intent to trigger.
|
||||
QueryInput query_input = 3 [(google.api.field_behavior) = REQUIRED];
|
||||
|
||||
// Please use
|
||||
// [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance]
|
||||
// instead. If `false` (default), recognition does not cease until the client
|
||||
// closes the stream. If `true`, the recognizer will detect a single spoken
|
||||
// utterance in input audio. Recognition ceases when it detects the audio's
|
||||
// voice has stopped or paused. In this case, once a detected intent is
|
||||
// received, the client should close the stream and start a new request with a
|
||||
// new stream as needed. This setting is ignored when `query_input` is a piece
|
||||
// of text or an event.
|
||||
// Please use [InputAudioConfig.single_utterance][google.cloud.dialogflow.v2.InputAudioConfig.single_utterance] instead.
|
||||
// If `false` (default), recognition does not cease until
|
||||
// the client closes the stream. If `true`, the recognizer will detect a
|
||||
// single spoken utterance in input audio. Recognition ceases when it detects
|
||||
// the audio's voice has stopped or paused. In this case, once a detected
|
||||
// intent is received, the client should close the stream and start a new
|
||||
// request with a new stream as needed.
|
||||
// This setting is ignored when `query_input` is a piece of text or an event.
|
||||
bool single_utterance = 4 [deprecated = true];
|
||||
|
||||
// Instructs the speech synthesizer how to generate the output
|
||||
|
|
@ -437,14 +431,12 @@ message StreamingDetectIntentRequest {
|
|||
// configured, no output audio is generated.
|
||||
OutputAudioConfig output_audio_config = 5;
|
||||
|
||||
// Mask for
|
||||
// [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]
|
||||
// indicating which settings in this request-level config should override
|
||||
// speech synthesizer settings defined at agent-level.
|
||||
// Mask for [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] indicating which settings in this
|
||||
// request-level config should override speech synthesizer settings defined at
|
||||
// agent-level.
|
||||
//
|
||||
// If unspecified or empty,
|
||||
// [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config]
|
||||
// replaces the agent-level config in its entirety.
|
||||
// If unspecified or empty, [output_audio_config][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.output_audio_config] replaces the agent-level
|
||||
// config in its entirety.
|
||||
google.protobuf.FieldMask output_audio_config_mask = 7;
|
||||
|
||||
// The input audio content to be recognized. Must be sent if
|
||||
|
|
@ -539,12 +531,11 @@ message StreamingRecognitionResult {
|
|||
|
||||
// Event indicates that the server has detected the end of the user's speech
|
||||
// utterance and expects no additional inputs.
|
||||
// Therefore, the server will not process additional audio (although it may
|
||||
// subsequently return additional results). The client should stop sending
|
||||
// additional audio data, half-close the gRPC connection, and wait for any
|
||||
// additional results until the server closes the gRPC connection. This
|
||||
// message is only sent if `single_utterance` was set to `true`, and is not
|
||||
// used otherwise.
|
||||
// Therefore, the server will not process additional audio (although it may subsequently return additional results). The
|
||||
// client should stop sending additional audio data, half-close the gRPC
|
||||
// connection, and wait for any additional results until the server closes
|
||||
// the gRPC connection. This message is only sent if `single_utterance` was
|
||||
// set to `true`, and is not used otherwise.
|
||||
END_OF_SINGLE_UTTERANCE = 2;
|
||||
}
|
||||
|
||||
|
|
@ -571,8 +562,7 @@ message StreamingRecognitionResult {
|
|||
float confidence = 4;
|
||||
|
||||
// Word-specific information for the words recognized by Speech in
|
||||
// [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript].
|
||||
// Populated if and only if `message_type` = `TRANSCRIPT` and
|
||||
// [transcript][google.cloud.dialogflow.v2.StreamingRecognitionResult.transcript]. Populated if and only if `message_type` = `TRANSCRIPT` and
|
||||
// [InputAudioConfig.enable_word_info] is set.
|
||||
repeated SpeechWordInfo speech_word_info = 7;
|
||||
|
||||
|
|
@ -613,7 +603,8 @@ message EventInput {
|
|||
// - MapKey value: parameter name
|
||||
// - MapValue type:
|
||||
// - If parameter's entity type is a composite entity: map
|
||||
// - Else: string or number, depending on parameter value type
|
||||
// - Else: depending on parameter value type, could be one of string,
|
||||
// number, boolean, null, list or map
|
||||
// - MapValue value:
|
||||
// - If parameter's entity type is a composite entity:
|
||||
// map from composite entity property names to property values
|
||||
|
|
@ -639,14 +630,11 @@ message SentimentAnalysisRequestConfig {
|
|||
// and identifies the prevailing subjective opinion, especially to determine a
|
||||
// user's attitude as positive, negative, or neutral.
|
||||
// For [Participants.DetectIntent][], it needs to be configured in
|
||||
// [DetectIntentRequest.query_params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params].
|
||||
// For [Participants.StreamingDetectIntent][], it needs to be configured in
|
||||
// [DetectIntentRequest.query_params][google.cloud.dialogflow.v2.DetectIntentRequest.query_params]. For
|
||||
// [Participants.StreamingDetectIntent][], it needs to be configured in
|
||||
// [StreamingDetectIntentRequest.query_params][google.cloud.dialogflow.v2.StreamingDetectIntentRequest.query_params].
|
||||
// And for
|
||||
// [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
|
||||
// and
|
||||
// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent],
|
||||
// it needs to be configured in
|
||||
// And for [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent] and
|
||||
// [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent], it needs to be configured in
|
||||
// [ConversationProfile.human_agent_assistant_config][google.cloud.dialogflow.v2.ConversationProfile.human_agent_assistant_config]
|
||||
message SentimentAnalysisResult {
|
||||
// The sentiment analysis result for `query_text`.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ message ValidationError {
|
|||
// Not specified. This value should never be used.
|
||||
SEVERITY_UNSPECIFIED = 0;
|
||||
|
||||
// The agent doesn't follow Dialogflow best practicies.
|
||||
// The agent doesn't follow Dialogflow best practices.
|
||||
INFO = 1;
|
||||
|
||||
// The agent may not behave as expected.
|
||||
|
|
|
|||
Loading…
Reference in New Issue