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

Commit 17aa7d6

Browse files
feat: added option to configure the number of sentences in the suggestion 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>
1 parent b7efcb1 commit 17aa7d6

38 files changed

+460
-117
lines changed

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

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

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

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

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

Lines changed: 1 addition & 0 deletions
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/v2beta1/audio_config.proto";
2324
import "google/cloud/dialogflow/v2beta1/gcs.proto";
2425
import "google/cloud/dialogflow/v2beta1/participant.proto";
2526
import "google/cloud/dialogflow/v2beta1/session.proto";

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ message HumanAgentAssistantConfig {
248248

249249
// Configs of custom conversation model.
250250
ConversationModelConfig conversation_model_config = 7;
251+
252+
// Configs for processing conversation.
253+
ConversationProcessConfig conversation_process_config = 8;
251254
}
252255

253256
// Detail human agent assistant config.
@@ -388,6 +391,13 @@ message HumanAgentAssistantConfig {
388391
}];
389392
}
390393

394+
// Config to process conversation.
395+
message ConversationProcessConfig {
396+
// Number of recent non-small-talk sentences to use as context for article
397+
// and FAQ suggestion
398+
int32 recent_sentences_count = 2;
399+
}
400+
391401
// Configuration for analyses to run on each conversation message.
392402
message MessageAnalysisConfig {
393403
// Enable entity extraction in conversation messages on [agent assist

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,9 @@ message SmartReplyAnswer {
718718
// The name of answer record, in the format of
719719
// "projects/<Project ID>/locations/<Location ID>/answerRecords/<Answer Record
720720
// ID>"
721-
string answer_record = 3;
721+
string answer_record = 3 [(google.api.resource_reference) = {
722+
type: "dialogflow.googleapis.com/AnswerRecord"
723+
}];
722724
}
723725

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

896900
// Number of messages prior to and including
897901
// [latest_message][google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse.latest_message] to compile the

protos/protos.d.ts

Lines changed: 109 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)