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

Commit

Permalink
feat: added option to configure the number of sentences in the sugges…
Browse files Browse the repository at this point in the history
…tion context (#917)

* feat: added option to configure the number of sentences in the suggestion context

PiperOrigin-RevId: 420101041

Source-Link: googleapis/googleapis@549b567

Source-Link: https://github.com/googleapis/googleapis-gen/commit/7d095a8c6a6223dd4ee772c285112483c2afb1c0
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2QwOTVhOGM2YTYyMjNkZDRlZTc3MmMyODUxMTI0ODNjMmFmYjFjMCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot

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 Jan 7, 2022
1 parent b7efcb1 commit 17aa7d6
Show file tree
Hide file tree
Showing 38 changed files with 460 additions and 117 deletions.
60 changes: 30 additions & 30 deletions protos/google/cloud/dialogflow/v2beta1/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,36 @@ option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.v2beta1";
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 @@ -80,36 +110,6 @@ 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
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/v2beta1/conversation.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/v2beta1/audio_config.proto";
import "google/cloud/dialogflow/v2beta1/gcs.proto";
import "google/cloud/dialogflow/v2beta1/participant.proto";
import "google/cloud/dialogflow/v2beta1/session.proto";
Expand Down
10 changes: 10 additions & 0 deletions protos/google/cloud/dialogflow/v2beta1/conversation_profile.proto
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ message HumanAgentAssistantConfig {

// Configs of custom conversation model.
ConversationModelConfig conversation_model_config = 7;

// Configs for processing conversation.
ConversationProcessConfig conversation_process_config = 8;
}

// Detail human agent assistant config.
Expand Down Expand Up @@ -388,6 +391,13 @@ message HumanAgentAssistantConfig {
}];
}

// Config to process conversation.
message ConversationProcessConfig {
// Number of recent non-small-talk sentences to use as context for article
// and FAQ suggestion
int32 recent_sentences_count = 2;
}

// Configuration for analyses to run on each conversation message.
message MessageAnalysisConfig {
// Enable entity extraction in conversation messages on [agent assist
Expand Down
8 changes: 6 additions & 2 deletions protos/google/cloud/dialogflow/v2beta1/participant.proto
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,9 @@ message SmartReplyAnswer {
// The name of answer record, in the format of
// "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
// ID>"
string answer_record = 3;
string answer_record = 3 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/AnswerRecord"
}];
}

// One response of different type of suggestion response which is used in
Expand Down Expand Up @@ -891,7 +893,9 @@ message SuggestSmartRepliesResponse {
//
// Format: `projects/<Project ID>/locations/<Location
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
string latest_message = 2;
string latest_message = 2 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Message"
}];

// Number of messages prior to and including
// [latest_message][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.latest_message] to compile the
Expand Down
122 changes: 109 additions & 13 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 17aa7d6

Please sign in to comment.