Skip to content

Commit 8dfb215

Browse files
Google APIscopybara-github
authored andcommitted
fix: fix validation result docs
feat: add language code to streaming recognition result docs: update environment docs PiperOrigin-RevId: 388737005
1 parent ec9c7e5 commit 8dfb215

5 files changed

Lines changed: 68 additions & 57 deletions

File tree

google/cloud/dialogflow/v2/BUILD.bazel

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -388,20 +388,4 @@ csharp_gapic_assembly_pkg(
388388
##############################################################################
389389
# C++
390390
##############################################################################
391-
load(
392-
"@com_google_googleapis_imports//:imports.bzl",
393-
"cc_grpc_library",
394-
"cc_proto_library",
395-
)
396-
397-
cc_proto_library(
398-
name = "dialogflow_cc_proto",
399-
deps = [":dialogflow_proto"],
400-
)
401-
402-
cc_grpc_library(
403-
name = "dialogflow_cc_grpc",
404-
srcs = [":dialogflow_proto"],
405-
grpc_only = True,
406-
deps = [":dialogflow_cc_proto"],
407-
)
391+
# Put your C++ rules here

google/cloud/dialogflow/v2/audio_config.proto

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,36 @@ option java_outer_classname = "AudioConfigProto";
2929
option java_package = "com.google.cloud.dialogflow.v2";
3030
option objc_class_prefix = "DF";
3131

32+
// Hints for the speech recognizer to help with recognition in a specific
33+
// conversation state.
34+
message SpeechContext {
35+
// Optional. A list of strings containing words and phrases that the speech
36+
// recognizer should recognize with higher likelihood.
37+
//
38+
// This list can be used to:
39+
//
40+
// * improve accuracy for words and phrases you expect the user to say,
41+
// e.g. typical commands for your Dialogflow agent
42+
// * add additional words to the speech recognizer vocabulary
43+
// * ...
44+
//
45+
// See the [Cloud Speech
46+
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
47+
// limits.
48+
repeated string phrases = 1;
49+
50+
// Optional. Boost for this context compared to other contexts:
51+
//
52+
// * If the boost is positive, Dialogflow will increase the probability that
53+
// the phrases in this context are recognized over similar sounding phrases.
54+
// * If the boost is unspecified or non-positive, Dialogflow will not apply
55+
// any boost.
56+
//
57+
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
58+
// find a value that fits your use case with binary search.
59+
float boost = 2;
60+
}
61+
3262
// Audio encoding of the audio content sent in the conversational query request.
3363
// Refer to the
3464
// [Cloud Speech API
@@ -78,36 +108,6 @@ enum AudioEncoding {
78108
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
79109
}
80110

81-
// Hints for the speech recognizer to help with recognition in a specific
82-
// conversation state.
83-
message SpeechContext {
84-
// Optional. A list of strings containing words and phrases that the speech
85-
// recognizer should recognize with higher likelihood.
86-
//
87-
// This list can be used to:
88-
//
89-
// * improve accuracy for words and phrases you expect the user to say,
90-
// e.g. typical commands for your Dialogflow agent
91-
// * add additional words to the speech recognizer vocabulary
92-
// * ...
93-
//
94-
// See the [Cloud Speech
95-
// documentation](https://cloud.google.com/speech-to-text/quotas) for usage
96-
// limits.
97-
repeated string phrases = 1;
98-
99-
// Optional. Boost for this context compared to other contexts:
100-
//
101-
// * If the boost is positive, Dialogflow will increase the probability that
102-
// the phrases in this context are recognized over similar sounding phrases.
103-
// * If the boost is unspecified or non-positive, Dialogflow will not apply
104-
// any boost.
105-
//
106-
// Dialogflow recommends that you use boosts in the range (0, 20] and that you
107-
// find a value that fits your use case with binary search.
108-
float boost = 2;
109-
}
110-
111111
// Information for a word recognized by the speech recognizer.
112112
message SpeechWordInfo {
113113
// The word this info is for.

google/cloud/dialogflow/v2/environment.proto

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ service Environments {
4141
"https://www.googleapis.com/auth/cloud-platform,"
4242
"https://www.googleapis.com/auth/dialogflow";
4343

44-
// Returns the list of all non-draft environments of the specified agent.
44+
// Returns the list of all non-default environments of the specified agent.
4545
rpc ListEnvironments(ListEnvironmentsRequest) returns (ListEnvironmentsResponse) {
4646
option (google.api.http) = {
4747
get: "/v2/{parent=projects/*/agent}/environments"
@@ -79,13 +79,13 @@ service Environments {
7979
// This method allows you to deploy new agent versions into the environment.
8080
// When an environment is pointed to a new agent version by setting
8181
// `environment.agent_version`, the environment is temporarily set to the
82-
// `LOADING` state. During that time, the environment keeps on serving the
82+
// `LOADING` state. During that time, the environment continues serving the
8383
// previous version of the agent. After the new agent version is done loading,
8484
// the environment is set back to the `RUNNING` state.
85-
// You can use "-" as Environment ID in environment name to update version
86-
// in "draft" environment. WARNING: this will negate all recent changes to
87-
// draft and can't be undone. You may want to save the draft to a version
88-
// before calling this function.
85+
// You can use "-" as Environment ID in environment name to update an agent
86+
// version in the default environment. WARNING: this will negate all recent
87+
// changes to the draft agent and can't be undone. You may want to save the
88+
// draft agent to a version before calling this method.
8989
rpc UpdateEnvironment(UpdateEnvironmentRequest) returns (Environment) {
9090
option (google.api.http) = {
9191
patch: "/v2/{environment.name=projects/*/agent/environments/*}"
@@ -164,17 +164,21 @@ message Environment {
164164

165165
// Output only. The unique identifier of this agent environment.
166166
// Supported formats:
167+
//
167168
// - `projects/<Project ID>/agent/environments/<Environment ID>`
168169
// - `projects/<Project ID>/locations/<Location
169170
// ID>/agent/environments/<Environment ID>`
171+
//
172+
// The environment ID for the default environment is `-`.
170173
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
171174

172175
// Optional. The developer-provided description for this environment.
173176
// The maximum length is 500 characters. If exceeded, the request is rejected.
174177
string description = 2 [(google.api.field_behavior) = OPTIONAL];
175178

176-
// Required. The agent version loaded into this environment.
179+
// Optional. The agent version loaded into this environment.
177180
// Supported formats:
181+
//
178182
// - `projects/<Project ID>/agent/versions/<Version ID>`
179183
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
180184
// ID>`
@@ -226,6 +230,7 @@ message TextToSpeechSettings {
226230
message ListEnvironmentsRequest {
227231
// Required. The agent to list all environments from.
228232
// Format:
233+
//
229234
// - `projects/<Project ID>/agent`
230235
// - `projects/<Project ID>/locations/<Location ID>/agent`
231236
string parent = 1 [
@@ -258,9 +263,12 @@ message ListEnvironmentsResponse {
258263
message GetEnvironmentRequest {
259264
// Required. The name of the environment.
260265
// Supported formats:
266+
//
261267
// - `projects/<Project ID>/agent/environments/<Environment ID>`
262268
// - `projects/<Project ID>/locations/<Location
263269
// ID>/agent/environments/<Environment ID>`
270+
//
271+
// The environment ID for the default environment is `-`.
264272
string name = 1 [
265273
(google.api.field_behavior) = REQUIRED,
266274
(google.api.resource_reference) = {
@@ -273,6 +281,7 @@ message GetEnvironmentRequest {
273281
message CreateEnvironmentRequest {
274282
// Required. The agent to create an environment for.
275283
// Supported formats:
284+
//
276285
// - `projects/<Project ID>/agent`
277286
// - `projects/<Project ID>/locations/<Location ID>/agent`
278287
string parent = 1 [
@@ -297,20 +306,23 @@ message UpdateEnvironmentRequest {
297306
// Required. The mask to control which fields get updated.
298307
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
299308

300-
// Optional. This field is used to prevent accidental overwrite of the draft
309+
// Optional. This field is used to prevent accidental overwrite of the default
301310
// environment, which is an operation that cannot be undone. To confirm that
302311
// the caller desires this overwrite, this field must be explicitly set to
303-
// true when updating the draft environment (environment ID = `-`).
312+
// true when updating the default environment (environment ID = `-`).
304313
bool allow_load_to_draft_and_discard_changes = 3 [(google.api.field_behavior) = OPTIONAL];
305314
}
306315

307316
// The request message for [Environments.DeleteEnvironment][google.cloud.dialogflow.v2.Environments.DeleteEnvironment].
308317
message DeleteEnvironmentRequest {
309318
// Required. The name of the environment to delete.
310319
// / Format:
320+
//
311321
// - `projects/<Project ID>/agent/environments/<Environment ID>`
312322
// - `projects/<Project ID>/locations/<Location
313-
// ID>/agent/environments/<Environment ID>`
323+
// ID>/agent/environments/<Environment ID>`
324+
//
325+
// The environment ID for the default environment is `-`.
314326
string name = 1 [
315327
(google.api.field_behavior) = REQUIRED,
316328
(google.api.resource_reference) = {
@@ -323,9 +335,12 @@ message DeleteEnvironmentRequest {
323335
message GetEnvironmentHistoryRequest {
324336
// Required. The name of the environment to retrieve history for.
325337
// Supported formats:
338+
//
326339
// - `projects/<Project ID>/agent/environments/<Environment ID>`
327340
// - `projects/<Project ID>/locations/<Location
328341
// ID>/agent/environments/<Environment ID>`
342+
//
343+
// The environment ID for the default environment is `-`.
329344
string parent = 1 [
330345
(google.api.field_behavior) = REQUIRED,
331346
(google.api.resource_reference) = {
@@ -357,9 +372,12 @@ message EnvironmentHistory {
357372

358373
// Output only. The name of the environment this history is for.
359374
// Supported formats:
375+
//
360376
// - `projects/<Project ID>/agent/environments/<Environment ID>`
361377
// - `projects/<Project ID>/locations/<Location
362378
// ID>/agent/environments/<Environment ID>`
379+
//
380+
// The environment ID for the default environment is `-`.
363381
string parent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
364382

365383
// Output only. The list of agent environments. There will be a maximum number of items

google/cloud/dialogflow/v2/session.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ message StreamingRecognitionResult {
584584
// Time offset of the end of this Speech recognition result relative to the
585585
// beginning of the audio. Only populated for `message_type` = `TRANSCRIPT`.
586586
google.protobuf.Duration speech_end_offset = 8;
587+
588+
// Detected language code for the transcript.
589+
string language_code = 10;
587590
}
588591

589592
// Represents the natural language text to be processed.

google/cloud/dialogflow/v2/version.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ message Version {
147147

148148
// Output only. The unique identifier of this agent version.
149149
// Supported formats:
150+
//
150151
// - `projects/<Project ID>/agent/versions/<Version ID>`
151152
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
152153
// ID>`
@@ -172,6 +173,7 @@ message Version {
172173
message ListVersionsRequest {
173174
// Required. The agent to list all versions from.
174175
// Supported formats:
176+
//
175177
// - `projects/<Project ID>/agent`
176178
// - `projects/<Project ID>/locations/<Location ID>/agent`
177179
string parent = 1 [
@@ -204,6 +206,7 @@ message ListVersionsResponse {
204206
message GetVersionRequest {
205207
// Required. The name of the version.
206208
// Supported formats:
209+
//
207210
// - `projects/<Project ID>/agent/versions/<Version ID>`
208211
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
209212
// ID>`
@@ -219,6 +222,7 @@ message GetVersionRequest {
219222
message CreateVersionRequest {
220223
// Required. The agent to create a version for.
221224
// Supported formats:
225+
//
222226
// - `projects/<Project ID>/agent`
223227
// - `projects/<Project ID>/locations/<Location ID>/agent`
224228
string parent = 1 [
@@ -236,6 +240,7 @@ message CreateVersionRequest {
236240
message UpdateVersionRequest {
237241
// Required. The version to update.
238242
// Supported formats:
243+
//
239244
// - `projects/<Project ID>/agent/versions/<Version ID>`
240245
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
241246
// ID>`
@@ -249,6 +254,7 @@ message UpdateVersionRequest {
249254
message DeleteVersionRequest {
250255
// Required. The name of the version to delete.
251256
// Supported formats:
257+
//
252258
// - `projects/<Project ID>/agent/versions/<Version ID>`
253259
// - `projects/<Project ID>/locations/<Location ID>/agent/versions/<Version
254260
// ID>`

0 commit comments

Comments
 (0)