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

Commit 35a77f4

Browse files
feat: added export documentation method
feat: added filter in list documentations request feat: added option to import custom metadata from Google Cloud Storage in reload document request feat: added option to apply partial update to the smart messaging feat: removed OPTIONAL for speech model variant feat: supported the knowledge base in knowledge operation metadata docs: added more docs for speech model variant and improved docs format for participant PiperOrigin-RevId: 417030293 PiperOrigin-RevId: 416079874 Source-Link: googleapis/googleapis@ebef8e6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/13951268b009d98d82355ccd9647f4350590609d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTM5NTEyNjhiMDA5ZDk4ZDgyMzU1Y2NkOTY0N2Y0MzUwNTkwNjA5ZCJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 7df7d27 commit 35a77f4

24 files changed

+1948
-288
lines changed

protos/google/cloud/dialogflow/v2/audio_config.proto

+30-30
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,6 @@ option java_outer_classname = "AudioConfigProto";
3030
option java_package = "com.google.cloud.dialogflow.v2";
3131
option objc_class_prefix = "DF";
3232

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

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

protos/google/cloud/dialogflow/v2/document.proto

+83
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23+
import "google/cloud/dialogflow/v2/gcs.proto";
2324
import "google/longrunning/operations.proto";
2425
import "google/protobuf/field_mask.proto";
2526
import "google/protobuf/timestamp.proto";
@@ -183,6 +184,30 @@ service Documents {
183184
metadata_type: "KnowledgeOperationMetadata"
184185
};
185186
}
187+
188+
// Exports a smart messaging candidate document into the specified
189+
// destination.
190+
//
191+
// This method is a [long-running
192+
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
193+
// The returned `Operation` type has the following method-specific fields:
194+
//
195+
// - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
196+
// - `response`: [Document][google.cloud.dialogflow.v2.Document]
197+
rpc ExportDocument(ExportDocumentRequest) returns (google.longrunning.Operation) {
198+
option (google.api.http) = {
199+
post: "/v2/{name=projects/*/knowledgeBases/*/documents/*}:export"
200+
body: "*"
201+
additional_bindings {
202+
post: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export"
203+
body: "*"
204+
}
205+
};
206+
option (google.longrunning.operation_info) = {
207+
response_type: "Document"
208+
metadata_type: "KnowledgeOperationMetadata"
209+
};
210+
}
186211
}
187212

188213
// A knowledge document to be used by a [KnowledgeBase][google.cloud.dialogflow.v2.KnowledgeBase].
@@ -328,6 +353,29 @@ message ListDocumentsRequest {
328353

329354
// The next_page_token value returned from a previous list request.
330355
string page_token = 3;
356+
357+
// The filter expression used to filter documents returned by the list method.
358+
// The expression has the following syntax:
359+
//
360+
// <field> <operator> <value> [AND <field> <operator> <value>] ...
361+
//
362+
// The following fields and operators are supported:
363+
//
364+
// * knowledge_types with has(:) operator
365+
// * display_name with has(:) operator
366+
// * state with equals(=) operator
367+
//
368+
// Examples:
369+
//
370+
// * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
371+
// * "display_name:customer" matches documents whose display name contains
372+
// "customer".
373+
// * "state=ACTIVE" matches documents with ACTIVE state.
374+
// * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
375+
//
376+
// For more information about filtering, see
377+
// [API Filtering](https://aip.dev/160).
378+
string filter = 4;
331379
}
332380

333381
// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
@@ -403,6 +451,41 @@ message ReloadDocumentRequest {
403451
// the form `gs://<bucket-name>/<object-name>`.
404452
string content_uri = 3 [(google.api.field_behavior) = OPTIONAL];
405453
}
454+
455+
// Optional. Whether to import custom metadata from Google Cloud Storage.
456+
// Only valid when the document source is Google Cloud Storage URI.
457+
bool import_gcs_custom_metadata = 4 [(google.api.field_behavior) = OPTIONAL];
458+
459+
// Optional. When enabled, the reload request is to apply partial update to the smart
460+
// messaging allowlist.
461+
bool smart_messaging_partial_update = 5 [(google.api.field_behavior) = OPTIONAL];
462+
}
463+
464+
// Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
465+
message ExportDocumentRequest {
466+
// Required. The name of the document to export.
467+
// Format: `projects/<Project ID>/locations/<Location
468+
// ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
469+
string name = 1 [
470+
(google.api.field_behavior) = REQUIRED,
471+
(google.api.resource_reference) = {
472+
type: "dialogflow.googleapis.com/Document"
473+
}
474+
];
475+
476+
// Required. The destination for the export.
477+
oneof destination {
478+
// Cloud Storage file path to export the document.
479+
GcsDestination gcs_destination = 2;
480+
}
481+
482+
// When enabled, export the full content of the document including empirical
483+
// probability.
484+
bool export_full_content = 3;
485+
486+
// When enabled, export the smart messaging allowlist document for partial
487+
// update.
488+
bool smart_messaging_partial_update = 5;
406489
}
407490

408491
// Metadata in google::longrunning::Operation for Knowledge operations.

protos/google/cloud/dialogflow/v2/gcs.proto

+10
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@ option java_multiple_files = true;
2626
option java_outer_classname = "GcsProto";
2727
option java_package = "com.google.cloud.dialogflow.v2";
2828
option objc_class_prefix = "DF";
29+
30+
// Google Cloud Storage location for the output.
31+
message GcsDestination {
32+
// The Google Cloud Storage URIs for the output. A URI is of the
33+
// form:
34+
// gs://bucket/object-prefix-or-name
35+
// Whether a prefix or name is used depends on the use case. The requesting
36+
// user must have "write-permission" to the bucket.
37+
string uri = 1;
38+
}

protos/google/cloud/dialogflow/v2/knowledge_base.proto

+28
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,34 @@ message ListKnowledgeBasesRequest {
165165

166166
// The next_page_token value returned from a previous list request.
167167
string page_token = 3;
168+
169+
// The filter expression used to filter knowledge bases returned by the list
170+
// method. The expression has the following syntax:
171+
//
172+
// <field> <operator> <value> [AND <field> <operator> <value>] ...
173+
//
174+
// The following fields and operators are supported:
175+
//
176+
// * display_name with has(:) operator
177+
// * language_code with equals(=) operator
178+
//
179+
// Examples:
180+
//
181+
// * 'language_code=en-us' matches knowledge bases with en-us language code.
182+
// * 'display_name:articles' matches knowledge bases whose display name
183+
// contains "articles".
184+
// * 'display_name:"Best Articles"' matches knowledge bases whose display
185+
// name contains "Best Articles".
186+
// * 'language_code=en-gb AND display_name=articles' matches all knowledge
187+
// bases whose display name contains "articles" and whose language code is
188+
// "en-gb".
189+
//
190+
// Note: An empty filter string (i.e. "") is a no-op and will result in no
191+
// filtering.
192+
//
193+
// For more information about filtering, see
194+
// [API Filtering](https://aip.dev/160).
195+
string filter = 4;
168196
}
169197

170198
// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases].

protos/google/cloud/dialogflow/v2/participant.proto

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/v2/audio_config.proto";
24+
import "google/cloud/dialogflow/v2/gcs.proto";
2425
import "google/cloud/dialogflow/v2/session.proto";
2526
import "google/protobuf/any.proto";
2627
import "google/protobuf/duration.proto";

protos/google/cloud/dialogflow/v2/session.proto

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/v2/audio_config.proto";
2424
import "google/cloud/dialogflow/v2/context.proto";
25+
import "google/cloud/dialogflow/v2/gcs.proto";
2526
import "google/cloud/dialogflow/v2/intent.proto";
2627
import "google/cloud/dialogflow/v2/session_entity_type.proto";
2728
import "google/protobuf/duration.proto";

protos/google/cloud/dialogflow/v2beta1/audio_config.proto

+6-3
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,16 @@ enum OutputAudioEncoding {
373373
OUTPUT_AUDIO_ENCODING_MULAW = 5;
374374
}
375375

376-
// Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile].
376+
// Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile].
377377
message SpeechToTextConfig {
378-
// Optional. The speech model used in speech to text.
378+
// The speech model used in speech to text.
379379
// `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as
380380
// `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2beta1.AnalyzeContentRequest] and
381381
// [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2beta1.StreamingAnalyzeContentRequest] request.
382-
SpeechModelVariant speech_model_variant = 1 [(google.api.field_behavior) = OPTIONAL];
382+
// If enhanced model variant is specified and an enhanced
383+
// version of the specified model for the language does not exist, then it
384+
// would emit an error.
385+
SpeechModelVariant speech_model_variant = 1;
383386
}
384387

385388
// [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling)

protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import "google/cloud/dialogflow/v2beta1/audio_config.proto";
2424
import "google/cloud/dialogflow/v2beta1/document.proto";
2525
import "google/cloud/dialogflow/v2beta1/participant.proto";
2626
import "google/longrunning/operations.proto";
27+
import "google/protobuf/duration.proto";
2728
import "google/protobuf/empty.proto";
2829
import "google/protobuf/field_mask.proto";
2930
import "google/protobuf/timestamp.proto";

protos/google/cloud/dialogflow/v2beta1/document.proto

+3
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,9 @@ message KnowledgeOperationMetadata {
540540

541541
// Required. Output only. The current state of this operation.
542542
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
543+
544+
// The name of the knowledge base interacted with during the operation.
545+
string knowledge_base = 3;
543546
}
544547

545548
// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument].

0 commit comments

Comments
 (0)