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

Commit

Permalink
feat: added export documentation method
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Dec 20, 2021
1 parent 7df7d27 commit 35a77f4
Show file tree
Hide file tree
Showing 24 changed files with 1,948 additions and 288 deletions.
60 changes: 30 additions & 30 deletions protos/google/cloud/dialogflow/v2/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,36 +30,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
Expand Down Expand Up @@ -109,6 +79,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.
Expand Down
83 changes: 83 additions & 0 deletions protos/google/cloud/dialogflow/v2/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/v2/gcs.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
Expand Down Expand Up @@ -183,6 +184,30 @@ service Documents {
metadata_type: "KnowledgeOperationMetadata"
};
}

// Exports a smart messaging candidate document into the specified
// destination.
//
// This method is a [long-running
// operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation).
// The returned `Operation` type has the following method-specific fields:
//
// - `metadata`: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2.KnowledgeOperationMetadata]
// - `response`: [Document][google.cloud.dialogflow.v2.Document]
rpc ExportDocument(ExportDocumentRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v2/{name=projects/*/knowledgeBases/*/documents/*}:export"
body: "*"
additional_bindings {
post: "/v2/{name=projects/*/locations/*/knowledgeBases/*/documents/*}:export"
body: "*"
}
};
option (google.longrunning.operation_info) = {
response_type: "Document"
metadata_type: "KnowledgeOperationMetadata"
};
}
}

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

// The next_page_token value returned from a previous list request.
string page_token = 3;

// The filter expression used to filter documents returned by the list method.
// The expression has the following syntax:
//
// <field> <operator> <value> [AND <field> <operator> <value>] ...
//
// The following fields and operators are supported:
//
// * knowledge_types with has(:) operator
// * display_name with has(:) operator
// * state with equals(=) operator
//
// Examples:
//
// * "knowledge_types:FAQ" matches documents with FAQ knowledge type.
// * "display_name:customer" matches documents whose display name contains
// "customer".
// * "state=ACTIVE" matches documents with ACTIVE state.
// * "knowledge_types:FAQ AND state=ACTIVE" matches all active FAQ documents.
//
// For more information about filtering, see
// [API Filtering](https://aip.dev/160).
string filter = 4;
}

// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2.Documents.ListDocuments].
Expand Down Expand Up @@ -403,6 +451,41 @@ message ReloadDocumentRequest {
// the form `gs://<bucket-name>/<object-name>`.
string content_uri = 3 [(google.api.field_behavior) = OPTIONAL];
}

// Optional. Whether to import custom metadata from Google Cloud Storage.
// Only valid when the document source is Google Cloud Storage URI.
bool import_gcs_custom_metadata = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. When enabled, the reload request is to apply partial update to the smart
// messaging allowlist.
bool smart_messaging_partial_update = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for [Documents.ExportDocument][google.cloud.dialogflow.v2.Documents.ExportDocument].
message ExportDocumentRequest {
// Required. The name of the document to export.
// Format: `projects/<Project ID>/locations/<Location
// ID>/knowledgeBases/<Knowledge Base ID>/documents/<Document ID>`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Document"
}
];

// Required. The destination for the export.
oneof destination {
// Cloud Storage file path to export the document.
GcsDestination gcs_destination = 2;
}

// When enabled, export the full content of the document including empirical
// probability.
bool export_full_content = 3;

// When enabled, export the smart messaging allowlist document for partial
// update.
bool smart_messaging_partial_update = 5;
}

// Metadata in google::longrunning::Operation for Knowledge operations.
Expand Down
10 changes: 10 additions & 0 deletions protos/google/cloud/dialogflow/v2/gcs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ option java_multiple_files = true;
option java_outer_classname = "GcsProto";
option java_package = "com.google.cloud.dialogflow.v2";
option objc_class_prefix = "DF";

// Google Cloud Storage location for the output.
message GcsDestination {
// The Google Cloud Storage URIs for the output. A URI is of the
// form:
// gs://bucket/object-prefix-or-name
// Whether a prefix or name is used depends on the use case. The requesting
// user must have "write-permission" to the bucket.
string uri = 1;
}
28 changes: 28 additions & 0 deletions protos/google/cloud/dialogflow/v2/knowledge_base.proto
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,34 @@ message ListKnowledgeBasesRequest {

// The next_page_token value returned from a previous list request.
string page_token = 3;

// The filter expression used to filter knowledge bases returned by the list
// method. The expression has the following syntax:
//
// <field> <operator> <value> [AND <field> <operator> <value>] ...
//
// The following fields and operators are supported:
//
// * display_name with has(:) operator
// * language_code with equals(=) operator
//
// Examples:
//
// * 'language_code=en-us' matches knowledge bases with en-us language code.
// * 'display_name:articles' matches knowledge bases whose display name
// contains "articles".
// * 'display_name:"Best Articles"' matches knowledge bases whose display
// name contains "Best Articles".
// * 'language_code=en-gb AND display_name=articles' matches all knowledge
// bases whose display name contains "articles" and whose language code is
// "en-gb".
//
// Note: An empty filter string (i.e. "") is a no-op and will result in no
// filtering.
//
// For more information about filtering, see
// [API Filtering](https://aip.dev/160).
string filter = 4;
}

// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2.KnowledgeBases.ListKnowledgeBases].
Expand Down
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/v2/participant.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/v2/audio_config.proto";
import "google/cloud/dialogflow/v2/gcs.proto";
import "google/cloud/dialogflow/v2/session.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
Expand Down
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/v2/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/v2/audio_config.proto";
import "google/cloud/dialogflow/v2/context.proto";
import "google/cloud/dialogflow/v2/gcs.proto";
import "google/cloud/dialogflow/v2/intent.proto";
import "google/cloud/dialogflow/v2/session_entity_type.proto";
import "google/protobuf/duration.proto";
Expand Down
9 changes: 6 additions & 3 deletions protos/google/cloud/dialogflow/v2beta1/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,16 @@ enum OutputAudioEncoding {
OUTPUT_AUDIO_ENCODING_MULAW = 5;
}

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

// [DTMF](https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "google/cloud/dialogflow/v2beta1/audio_config.proto";
import "google/cloud/dialogflow/v2beta1/document.proto";
import "google/cloud/dialogflow/v2beta1/participant.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
Expand Down
3 changes: 3 additions & 0 deletions protos/google/cloud/dialogflow/v2beta1/document.proto
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ message KnowledgeOperationMetadata {

// Required. Output only. The current state of this operation.
State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// The name of the knowledge base interacted with during the operation.
string knowledge_base = 3;
}

// Request message for [Documents.ReloadDocument][google.cloud.dialogflow.v2beta1.Documents.ReloadDocument].
Expand Down
Loading

0 comments on commit 35a77f4

Please sign in to comment.