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

Commit

Permalink
feat: support document metadata filter in article suggestion (#773)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 410295622

Source-Link: googleapis/googleapis@dfa9d62

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0096968b1fe0d67ca878187436e406b016e27a0d
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA5Njk2OGIxZmUwZDY3Y2E4NzgxODc0MzZlNDA2YjAxNmUyN2EwZCJ9
  • Loading branch information
gcf-owl-bot[bot] authored Nov 17, 2021
1 parent a615d5e commit 24afa13
Show file tree
Hide file tree
Showing 38 changed files with 3,900 additions and 662 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ public final AnalyzeContentResponse analyzeContent(String participant, TextInput
* .toString())
* .setReplyAudioConfig(OutputAudioConfig.newBuilder().build())
* .setQueryParams(QueryParameters.newBuilder().build())
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .setMessageSendTime(Timestamp.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
Expand Down Expand Up @@ -788,6 +789,7 @@ public final AnalyzeContentResponse analyzeContent(AnalyzeContentRequest request
* .toString())
* .setReplyAudioConfig(OutputAudioConfig.newBuilder().build())
* .setQueryParams(QueryParameters.newBuilder().build())
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .setMessageSendTime(Timestamp.newBuilder().build())
* .setRequestId("requestId693933066")
* .build();
Expand Down Expand Up @@ -891,6 +893,7 @@ public final SuggestArticlesResponse suggestArticles(String parent) {
* "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
* .toString())
* .setContextSize(1116903569)
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .build();
* SuggestArticlesResponse response = participantsClient.suggestArticles(request);
* }
Expand Down Expand Up @@ -927,6 +930,7 @@ public final SuggestArticlesResponse suggestArticles(SuggestArticlesRequest requ
* "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
* .toString())
* .setContextSize(1116903569)
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .build();
* ApiFuture<SuggestArticlesResponse> future =
* participantsClient.suggestArticlesCallable().futureCall(request);
Expand Down Expand Up @@ -1014,6 +1018,7 @@ public final SuggestFaqAnswersResponse suggestFaqAnswers(String parent) {
* "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
* .toString())
* .setContextSize(1116903569)
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .build();
* SuggestFaqAnswersResponse response = participantsClient.suggestFaqAnswers(request);
* }
Expand Down Expand Up @@ -1045,6 +1050,7 @@ public final SuggestFaqAnswersResponse suggestFaqAnswers(SuggestFaqAnswersReques
* "[PROJECT]", "[CONVERSATION]", "[MESSAGE]")
* .toString())
* .setContextSize(1116903569)
* .setAssistQueryParams(AssistQueryParameters.newBuilder().build())
* .build();
* ApiFuture<SuggestFaqAnswersResponse> future =
* participantsClient.suggestFaqAnswersCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import javax.annotation.Generated;
Expand Down Expand Up @@ -90,6 +91,7 @@ public void createParticipantTest() throws Exception {
"[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]")
.toString())
.setObfuscatedExternalUserId("obfuscatedExternalUserId1778228693")
.putAllDocumentsMetadataFilters(new HashMap<String, String>())
.build();
mockParticipants.addResponse(expectedResponse);

Expand Down Expand Up @@ -137,6 +139,7 @@ public void createParticipantTest2() throws Exception {
"[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]")
.toString())
.setObfuscatedExternalUserId("obfuscatedExternalUserId1778228693")
.putAllDocumentsMetadataFilters(new HashMap<String, String>())
.build();
mockParticipants.addResponse(expectedResponse);

Expand Down Expand Up @@ -182,6 +185,7 @@ public void getParticipantTest() throws Exception {
"[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]")
.toString())
.setObfuscatedExternalUserId("obfuscatedExternalUserId1778228693")
.putAllDocumentsMetadataFilters(new HashMap<String, String>())
.build();
mockParticipants.addResponse(expectedResponse);

Expand Down Expand Up @@ -228,6 +232,7 @@ public void getParticipantTest2() throws Exception {
"[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]")
.toString())
.setObfuscatedExternalUserId("obfuscatedExternalUserId1778228693")
.putAllDocumentsMetadataFilters(new HashMap<String, String>())
.build();
mockParticipants.addResponse(expectedResponse);

Expand Down Expand Up @@ -360,6 +365,7 @@ public void updateParticipantTest() throws Exception {
"[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]")
.toString())
.setObfuscatedExternalUserId("obfuscatedExternalUserId1778228693")
.putAllDocumentsMetadataFilters(new HashMap<String, String>())
.build();
mockParticipants.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
*
*
* <pre>
* Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant].
* Service for managing
* [Participants][google.cloud.dialogflow.v2beta1.Participant].
* </pre>
*/
@javax.annotation.Generated(
Expand Down Expand Up @@ -549,7 +550,8 @@ public ParticipantsFutureStub newStub(
*
*
* <pre>
* Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant].
* Service for managing
* [Participants][google.cloud.dialogflow.v2beta1.Participant].
* </pre>
*/
public abstract static class ParticipantsImplBase implements io.grpc.BindableService {
Expand Down Expand Up @@ -639,9 +641,12 @@ public void analyzeContent(
* <pre>
* Gets suggested articles for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
public void suggestArticles(
Expand Down Expand Up @@ -690,9 +695,9 @@ public void suggestSmartReplies(
* <pre>
* Deprecated: Use inline suggestion, event based suggestion or
* Suggestion* API instead.
* See [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more
* details.
* Removal Date: 2020-09-01.
* See
* [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name]
* for more details. Removal Date: 2020-09-01.
* Retrieves suggestions for live agents.
* This method should be used by human agent client software to fetch auto
* generated suggestions in real-time, while the conversation with an end user
Expand Down Expand Up @@ -721,12 +726,19 @@ public void listSuggestions(
*
*
* <pre>
* Deprecated. use [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles] and [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers] instead.
* Deprecated. use
* [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]
* and
* [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]
* instead.
* Gets suggestions for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
@java.lang.Deprecated
Expand Down Expand Up @@ -819,7 +831,8 @@ public final io.grpc.ServerServiceDefinition bindService() {
*
*
* <pre>
* Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant].
* Service for managing
* [Participants][google.cloud.dialogflow.v2beta1.Participant].
* </pre>
*/
public static final class ParticipantsStub
Expand Down Expand Up @@ -928,9 +941,12 @@ public void analyzeContent(
* <pre>
* Gets suggested articles for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
public void suggestArticles(
Expand Down Expand Up @@ -985,9 +1001,9 @@ public void suggestSmartReplies(
* <pre>
* Deprecated: Use inline suggestion, event based suggestion or
* Suggestion* API instead.
* See [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more
* details.
* Removal Date: 2020-09-01.
* See
* [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name]
* for more details. Removal Date: 2020-09-01.
* Retrieves suggestions for live agents.
* This method should be used by human agent client software to fetch auto
* generated suggestions in real-time, while the conversation with an end user
Expand Down Expand Up @@ -1018,12 +1034,19 @@ public void listSuggestions(
*
*
* <pre>
* Deprecated. use [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles] and [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers] instead.
* Deprecated. use
* [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]
* and
* [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]
* instead.
* Gets suggestions for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
@java.lang.Deprecated
Expand All @@ -1042,7 +1065,8 @@ public void compileSuggestion(
*
*
* <pre>
* Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant].
* Service for managing
* [Participants][google.cloud.dialogflow.v2beta1.Participant].
* </pre>
*/
public static final class ParticipantsBlockingStub
Expand Down Expand Up @@ -1132,9 +1156,12 @@ public com.google.cloud.dialogflow.v2beta1.AnalyzeContentResponse analyzeContent
* <pre>
* Gets suggested articles for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
public com.google.cloud.dialogflow.v2beta1.SuggestArticlesResponse suggestArticles(
Expand Down Expand Up @@ -1177,9 +1204,9 @@ public com.google.cloud.dialogflow.v2beta1.SuggestSmartRepliesResponse suggestSm
* <pre>
* Deprecated: Use inline suggestion, event based suggestion or
* Suggestion* API instead.
* See [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more
* details.
* Removal Date: 2020-09-01.
* See
* [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name]
* for more details. Removal Date: 2020-09-01.
* Retrieves suggestions for live agents.
* This method should be used by human agent client software to fetch auto
* generated suggestions in real-time, while the conversation with an end user
Expand All @@ -1206,12 +1233,19 @@ public com.google.cloud.dialogflow.v2beta1.ListSuggestionsResponse listSuggestio
*
*
* <pre>
* Deprecated. use [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles] and [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers] instead.
* Deprecated. use
* [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]
* and
* [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]
* instead.
* Gets suggestions for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
@java.lang.Deprecated
Expand All @@ -1226,7 +1260,8 @@ public com.google.cloud.dialogflow.v2beta1.CompileSuggestionResponse compileSugg
*
*
* <pre>
* Service for managing [Participants][google.cloud.dialogflow.v2beta1.Participant].
* Service for managing
* [Participants][google.cloud.dialogflow.v2beta1.Participant].
* </pre>
*/
public static final class ParticipantsFutureStub
Expand Down Expand Up @@ -1321,9 +1356,12 @@ protected ParticipantsFutureStub build(
* <pre>
* Gets suggested articles for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<
Expand Down Expand Up @@ -1370,9 +1408,9 @@ protected ParticipantsFutureStub build(
* <pre>
* Deprecated: Use inline suggestion, event based suggestion or
* Suggestion* API instead.
* See [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name] for more
* details.
* Removal Date: 2020-09-01.
* See
* [HumanAgentAssistantConfig.name][google.cloud.dialogflow.v2beta1.HumanAgentAssistantConfig.name]
* for more details. Removal Date: 2020-09-01.
* Retrieves suggestions for live agents.
* This method should be used by human agent client software to fetch auto
* generated suggestions in real-time, while the conversation with an end user
Expand Down Expand Up @@ -1400,12 +1438,19 @@ protected ParticipantsFutureStub build(
*
*
* <pre>
* Deprecated. use [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles] and [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers] instead.
* Deprecated. use
* [SuggestArticles][google.cloud.dialogflow.v2beta1.Participants.SuggestArticles]
* and
* [SuggestFaqAnswers][google.cloud.dialogflow.v2beta1.Participants.SuggestFaqAnswers]
* instead.
* Gets suggestions for a participant based on specific historical
* messages.
* Note that [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions] will only list the auto-generated
* suggestions, while [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion] will try to compile suggestion
* based on the provided conversation context in the real time.
* Note that
* [ListSuggestions][google.cloud.dialogflow.v2beta1.Participants.ListSuggestions]
* will only list the auto-generated suggestions, while
* [CompileSuggestion][google.cloud.dialogflow.v2beta1.Participants.CompileSuggestion]
* will try to compile suggestion based on the provided conversation context
* in the real time.
* </pre>
*/
@java.lang.Deprecated
Expand Down
Loading

0 comments on commit 24afa13

Please sign in to comment.