@google-cloud/discoveryengine 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +5356 -981
- package/build/protos/protos.js +32266 -20956
- package/build/protos/protos.json +1391 -74
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/completion_service_client.d.ts +238 -1
- package/build/src/v1/completion_service_client.js +341 -5
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +237 -0
- package/build/src/v1/control_service_client.js +347 -7
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +213 -6
- package/build/src/v1/conversational_search_service_client.js +316 -22
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +238 -1
- package/build/src/v1/data_store_service_client.js +347 -7
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +245 -2
- package/build/src/v1/document_service_client.js +356 -10
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +238 -1
- package/build/src/v1/engine_service_client.js +347 -7
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +238 -3
- package/build/src/v1/grounded_generation_service_client.js +335 -3
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +238 -1
- package/build/src/v1/project_service_client.js +329 -1
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +238 -1
- package/build/src/v1/rank_service_client.js +329 -1
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +95 -2
- package/build/src/v1/recommendation_service_client.js +131 -1
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +238 -1
- package/build/src/v1/schema_service_client.js +347 -7
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +219 -30
- package/build/src/v1/search_service_client.js +230 -26
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +238 -1
- package/build/src/v1/search_tuning_service_client.js +332 -2
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2653 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +357 -4
- package/build/src/v1/site_search_engine_service_client.js +521 -16
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +259 -10
- package/build/src/v1/user_event_service_client.js +338 -4
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.js +6 -2
- package/build/src/v1alpha/chunk_service_client.js +12 -4
- package/build/src/v1alpha/completion_service_client.d.ts +1 -1
- package/build/src/v1alpha/completion_service_client.js +15 -5
- package/build/src/v1alpha/control_service_client.js +21 -7
- package/build/src/v1alpha/conversational_search_service_client.js +51 -17
- package/build/src/v1alpha/data_store_service_client.d.ts +1 -1
- package/build/src/v1alpha/data_store_service_client.js +27 -9
- package/build/src/v1alpha/document_service_client.d.ts +1 -1
- package/build/src/v1alpha/document_service_client.js +33 -11
- package/build/src/v1alpha/engine_service_client.d.ts +1 -1
- package/build/src/v1alpha/engine_service_client.js +30 -10
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +1 -1
- package/build/src/v1alpha/estimate_billing_service_client.js +3 -1
- package/build/src/v1alpha/evaluation_service_client.d.ts +1 -1
- package/build/src/v1alpha/evaluation_service_client.js +24 -8
- package/build/src/v1alpha/grounded_generation_service_client.js +3 -1
- package/build/src/v1alpha/project_service_client.d.ts +1 -1
- package/build/src/v1alpha/project_service_client.js +9 -3
- package/build/src/v1alpha/rank_service_client.js +3 -1
- package/build/src/v1alpha/recommendation_service_client.js +3 -1
- package/build/src/v1alpha/sample_query_service_client.d.ts +1 -1
- package/build/src/v1alpha/sample_query_service_client.js +24 -8
- package/build/src/v1alpha/sample_query_set_service_client.js +21 -7
- package/build/src/v1alpha/schema_service_client.d.ts +1 -1
- package/build/src/v1alpha/schema_service_client.js +21 -7
- package/build/src/v1alpha/search_service_client.js +9 -3
- package/build/src/v1alpha/search_tuning_service_client.d.ts +1 -1
- package/build/src/v1alpha/search_tuning_service_client.js +6 -2
- package/build/src/v1alpha/serving_config_service_client.js +15 -5
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +1 -1
- package/build/src/v1alpha/site_search_engine_service_client.js +54 -18
- package/build/src/v1alpha/user_event_service_client.d.ts +1 -1
- package/build/src/v1alpha/user_event_service_client.js +12 -4
- package/build/src/v1beta/completion_service_client.d.ts +1 -1
- package/build/src/v1beta/completion_service_client.js +18 -6
- package/build/src/v1beta/control_service_client.js +21 -7
- package/build/src/v1beta/conversational_search_service_client.js +51 -17
- package/build/src/v1beta/data_store_service_client.d.ts +1 -1
- package/build/src/v1beta/data_store_service_client.js +21 -7
- package/build/src/v1beta/document_service_client.d.ts +1 -1
- package/build/src/v1beta/document_service_client.js +30 -10
- package/build/src/v1beta/engine_service_client.d.ts +1 -1
- package/build/src/v1beta/engine_service_client.js +30 -10
- package/build/src/v1beta/evaluation_service_client.d.ts +1 -1
- package/build/src/v1beta/evaluation_service_client.js +24 -8
- package/build/src/v1beta/grounded_generation_service_client.js +9 -3
- package/build/src/v1beta/project_service_client.d.ts +1 -1
- package/build/src/v1beta/project_service_client.js +3 -1
- package/build/src/v1beta/rank_service_client.js +3 -1
- package/build/src/v1beta/recommendation_service_client.js +3 -1
- package/build/src/v1beta/sample_query_service_client.d.ts +1 -1
- package/build/src/v1beta/sample_query_service_client.js +24 -8
- package/build/src/v1beta/sample_query_set_service_client.js +21 -7
- package/build/src/v1beta/schema_service_client.d.ts +1 -1
- package/build/src/v1beta/schema_service_client.js +21 -7
- package/build/src/v1beta/search_service_client.js +18 -6
- package/build/src/v1beta/search_tuning_service_client.d.ts +1 -1
- package/build/src/v1beta/search_tuning_service_client.js +6 -2
- package/build/src/v1beta/serving_config_service_client.js +15 -5
- package/build/src/v1beta/site_search_engine_service_client.d.ts +1 -1
- package/build/src/v1beta/site_search_engine_service_client.js +57 -19
- package/build/src/v1beta/user_event_service_client.d.ts +1 -1
- package/build/src/v1beta/user_event_service_client.js +12 -4
- package/package.json +5 -5
@@ -116,6 +116,11 @@ message SearchRequest {
|
|
116
116
|
// specified by data_store field. For more information on filtering, see
|
117
117
|
// [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
118
118
|
string filter = 5 [(google.api.field_behavior) = OPTIONAL];
|
119
|
+
|
120
|
+
// Optional. Boost specification to boost certain documents.
|
121
|
+
// For more information on boosting, see
|
122
|
+
// [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
123
|
+
BoostSpec boost_spec = 6 [(google.api.field_behavior) = OPTIONAL];
|
119
124
|
}
|
120
125
|
|
121
126
|
// A facet specification to perform faceted search.
|
@@ -369,7 +374,7 @@ message SearchRequest {
|
|
369
374
|
}
|
370
375
|
|
371
376
|
// Condition boost specifications. If a document matches multiple conditions
|
372
|
-
// in the
|
377
|
+
// in the specifications, boost scores from these specifications are all
|
373
378
|
// applied and combined in a non-linear way. Maximum number of
|
374
379
|
// specifications is 20.
|
375
380
|
repeated ConditionBoostSpec condition_boost_specs = 1;
|
@@ -656,7 +661,8 @@ message SearchRequest {
|
|
656
661
|
DOCUMENTS = 1;
|
657
662
|
|
658
663
|
// Returns chunks in the search result. Only available if the
|
659
|
-
// [
|
664
|
+
// [DocumentProcessingConfig.chunking_config][google.cloud.discoveryengine.v1.DocumentProcessingConfig.chunking_config]
|
665
|
+
// is specified.
|
660
666
|
CHUNKS = 2;
|
661
667
|
}
|
662
668
|
|
@@ -697,6 +703,10 @@ message SearchRequest {
|
|
697
703
|
|
698
704
|
// Enables Search As You Type.
|
699
705
|
ENABLED = 2;
|
706
|
+
|
707
|
+
// Automatic switching between search-as-you-type and standard search
|
708
|
+
// modes, ideal for single-API implementations (e.g., debouncing).
|
709
|
+
AUTO = 3;
|
700
710
|
}
|
701
711
|
|
702
712
|
// The condition under which search as you type should occur.
|
@@ -705,6 +715,24 @@ message SearchRequest {
|
|
705
715
|
Condition condition = 1;
|
706
716
|
}
|
707
717
|
|
718
|
+
// Specifies features for display, like match highlighting.
|
719
|
+
message DisplaySpec {
|
720
|
+
// Enum describing under which condition match highlighting should occur.
|
721
|
+
enum MatchHighlightingCondition {
|
722
|
+
// Server behavior is the same as `MATCH_HIGHLIGHTING_DISABLED`.
|
723
|
+
MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED = 0;
|
724
|
+
|
725
|
+
// Disables match highlighting on all documents.
|
726
|
+
MATCH_HIGHLIGHTING_DISABLED = 1;
|
727
|
+
|
728
|
+
// Enables match highlighting on all documents.
|
729
|
+
MATCH_HIGHLIGHTING_ENABLED = 2;
|
730
|
+
}
|
731
|
+
|
732
|
+
// The condition under which match highlighting should occur.
|
733
|
+
MatchHighlightingCondition match_highlighting_condition = 1;
|
734
|
+
}
|
735
|
+
|
708
736
|
// Session specification.
|
709
737
|
//
|
710
738
|
// Multi-turn Search feature is currently at private GA stage. Please use
|
@@ -741,13 +769,41 @@ message SearchRequest {
|
|
741
769
|
// The number of top search results to persist. The persisted search results
|
742
770
|
// can be used for the subsequent /answer api call.
|
743
771
|
//
|
744
|
-
// This field is
|
772
|
+
// This field is similar to the `summary_result_count` field in
|
745
773
|
// [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
|
746
774
|
//
|
747
775
|
// At most 10 results for documents mode, or 50 for chunks mode.
|
748
776
|
optional int32 search_result_persistence_count = 2;
|
749
777
|
}
|
750
778
|
|
779
|
+
// The specification for returning the document relevance score.
|
780
|
+
message RelevanceScoreSpec {
|
781
|
+
// Optional. Whether to return the relevance score for search results.
|
782
|
+
// The higher the score, the more relevant the document is to the query.
|
783
|
+
bool return_relevance_score = 1 [(google.api.field_behavior) = OPTIONAL];
|
784
|
+
}
|
785
|
+
|
786
|
+
// The relevance threshold of the search results. The higher relevance
|
787
|
+
// threshold is, the higher relevant results are shown and the less number of
|
788
|
+
// results are returned.
|
789
|
+
enum RelevanceThreshold {
|
790
|
+
// Default value. In this case, server behavior defaults to Google defined
|
791
|
+
// threshold.
|
792
|
+
RELEVANCE_THRESHOLD_UNSPECIFIED = 0;
|
793
|
+
|
794
|
+
// Lowest relevance threshold.
|
795
|
+
LOWEST = 1;
|
796
|
+
|
797
|
+
// Low relevance threshold.
|
798
|
+
LOW = 2;
|
799
|
+
|
800
|
+
// Medium relevance threshold.
|
801
|
+
MEDIUM = 3;
|
802
|
+
|
803
|
+
// High relevance threshold.
|
804
|
+
HIGH = 4;
|
805
|
+
}
|
806
|
+
|
751
807
|
// Required. The resource name of the Search serving config, such as
|
752
808
|
// `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
753
809
|
// or
|
@@ -812,10 +868,13 @@ message SearchRequest {
|
|
812
868
|
// Default number is 10.
|
813
869
|
int32 one_box_page_size = 47;
|
814
870
|
|
815
|
-
//
|
816
|
-
//
|
817
|
-
//
|
818
|
-
//
|
871
|
+
// Specifications that define the specific
|
872
|
+
// [DataStore][google.cloud.discoveryengine.v1.DataStore]s to be searched,
|
873
|
+
// along with configurations for those data stores. This is only considered
|
874
|
+
// for [Engine][google.cloud.discoveryengine.v1.Engine]s with multiple data
|
875
|
+
// stores. For engines with a single data store, the specs directly under
|
876
|
+
// [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] should be
|
877
|
+
// used.
|
819
878
|
repeated DataStoreSpec data_store_specs = 32;
|
820
879
|
|
821
880
|
// The filter syntax consists of an expression language for constructing a
|
@@ -864,7 +923,7 @@ message SearchRequest {
|
|
864
923
|
string order_by = 8;
|
865
924
|
|
866
925
|
// Information about the end user.
|
867
|
-
// Highly recommended for analytics.
|
926
|
+
// Highly recommended for analytics and personalization.
|
868
927
|
// [UserInfo.user_agent][google.cloud.discoveryengine.v1.UserInfo.user_agent]
|
869
928
|
// is used to deduce `device_type` for analytics.
|
870
929
|
UserInfo user_info = 21;
|
@@ -959,6 +1018,10 @@ message SearchRequest {
|
|
959
1018
|
// vertical.
|
960
1019
|
SearchAsYouTypeSpec search_as_you_type_spec = 31;
|
961
1020
|
|
1021
|
+
// Optional. Config for display feature, like match highlighting on search
|
1022
|
+
// results.
|
1023
|
+
DisplaySpec display_spec = 38 [(google.api.field_behavior) = OPTIONAL];
|
1024
|
+
|
962
1025
|
// The session resource name. Optional.
|
963
1026
|
//
|
964
1027
|
// Session allows users to do multi-turn /search API calls or coordination
|
@@ -993,6 +1056,19 @@ message SearchRequest {
|
|
993
1056
|
//
|
994
1057
|
// Can be used only when `session` is set.
|
995
1058
|
SessionSpec session_spec = 42;
|
1059
|
+
|
1060
|
+
// The relevance threshold of the search results.
|
1061
|
+
//
|
1062
|
+
// Default to Google defined threshold, leveraging a balance of
|
1063
|
+
// precision and recall to deliver both highly accurate results and
|
1064
|
+
// comprehensive coverage of relevant information.
|
1065
|
+
//
|
1066
|
+
// This feature is not supported for healthcare search.
|
1067
|
+
RelevanceThreshold relevance_threshold = 44;
|
1068
|
+
|
1069
|
+
// Optional. The specification for returning the relevance score.
|
1070
|
+
RelevanceScoreSpec relevance_score_spec = 52
|
1071
|
+
[(google.api.field_behavior) = OPTIONAL];
|
996
1072
|
}
|
997
1073
|
|
998
1074
|
// Response message for
|
@@ -1014,6 +1090,10 @@ message SearchResponse {
|
|
1014
1090
|
// is set to
|
1015
1091
|
// [CHUNKS][google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
|
1016
1092
|
Chunk chunk = 18;
|
1093
|
+
|
1094
|
+
// Output only. Google provided available scores.
|
1095
|
+
map<string, DoubleList> model_scores = 4
|
1096
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
1017
1097
|
}
|
1018
1098
|
|
1019
1099
|
// A facet result.
|
@@ -1194,6 +1274,11 @@ message SearchResponse {
|
|
1194
1274
|
// [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
|
1195
1275
|
// is set to `true`.
|
1196
1276
|
NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9;
|
1277
|
+
|
1278
|
+
// The time out case.
|
1279
|
+
//
|
1280
|
+
// Google skips the summary if the time out.
|
1281
|
+
TIME_OUT = 10;
|
1197
1282
|
}
|
1198
1283
|
|
1199
1284
|
// The summary content.
|
@@ -1295,4 +1380,7 @@ message SearchResponse {
|
|
1295
1380
|
// [SearchRequest.session][google.cloud.discoveryengine.v1.SearchRequest.session]
|
1296
1381
|
// is provided. See its description for more details.
|
1297
1382
|
SessionInfo session_info = 19;
|
1383
|
+
|
1384
|
+
// Promotions for site search.
|
1385
|
+
repeated SearchLinkPromotion search_link_promotions = 23;
|
1298
1386
|
}
|
@@ -0,0 +1,271 @@
|
|
1
|
+
// Copyright 2025 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1;
|
18
|
+
|
19
|
+
import "google/api/field_behavior.proto";
|
20
|
+
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1/common.proto";
|
22
|
+
import "google/cloud/discoveryengine/v1/search_service.proto";
|
23
|
+
import "google/protobuf/timestamp.proto";
|
24
|
+
|
25
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
26
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
27
|
+
option java_multiple_files = true;
|
28
|
+
option java_outer_classname = "ServingConfigProto";
|
29
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
30
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
31
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
32
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
33
|
+
|
34
|
+
// Configures metadata that is used to generate serving time results (e.g.
|
35
|
+
// search results or recommendation predictions).
|
36
|
+
// The ServingConfig is passed in the search and predict request and generates
|
37
|
+
// results.
|
38
|
+
message ServingConfig {
|
39
|
+
option (google.api.resource) = {
|
40
|
+
type: "discoveryengine.googleapis.com/ServingConfig"
|
41
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
42
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
43
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"
|
44
|
+
};
|
45
|
+
|
46
|
+
// Specifies the configurations needed for Media Discovery. Currently we
|
47
|
+
// support:
|
48
|
+
//
|
49
|
+
// * `demote_content_watched`: Threshold for watched content demotion.
|
50
|
+
// Customers can specify if using watched content demotion or use viewed
|
51
|
+
// detail page. Using the content watched demotion, customers need to specify
|
52
|
+
// the watched minutes or percentage exceeds the threshold, the content will
|
53
|
+
// be demoted in the recommendation result.
|
54
|
+
// * `promote_fresh_content`: cutoff days for fresh content promotion.
|
55
|
+
// Customers can specify if using content freshness promotion. If the content
|
56
|
+
// was published within the cutoff days, the content will be promoted in the
|
57
|
+
// recommendation result.
|
58
|
+
// Can only be set if
|
59
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
60
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
61
|
+
message MediaConfig {
|
62
|
+
// Specify the threshold for demoting watched content, the threshold can be
|
63
|
+
// either percentage or minutes value.
|
64
|
+
// This must be set for `media-complete` event type.
|
65
|
+
oneof demote_content_watched {
|
66
|
+
// Specifies the content watched percentage threshold for demotion.
|
67
|
+
// Threshold value must be between [0, 1.0] inclusive.
|
68
|
+
float content_watched_percentage_threshold = 2;
|
69
|
+
|
70
|
+
// Specifies the content watched minutes threshold for demotion.
|
71
|
+
float content_watched_seconds_threshold = 5;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Specifies the event type used for demoting recommendation result.
|
75
|
+
// Currently supported values:
|
76
|
+
//
|
77
|
+
// * `view-item`: Item viewed.
|
78
|
+
// * `media-play`: Start/resume watching a video, playing a song, etc.
|
79
|
+
// * `media-complete`: Finished or stopped midway through a video, song,
|
80
|
+
// etc.
|
81
|
+
//
|
82
|
+
// If unset, watch history demotion will not be applied. Content freshness
|
83
|
+
// demotion will still be applied.
|
84
|
+
string demotion_event_type = 1;
|
85
|
+
|
86
|
+
// Optional. Specifies the number of days to look back for demoting watched
|
87
|
+
// content. If set to zero or unset, defaults to the maximum of 365 days.
|
88
|
+
int32 demote_content_watched_past_days = 37
|
89
|
+
[(google.api.field_behavior) = OPTIONAL];
|
90
|
+
|
91
|
+
// Specifies the content freshness used for recommendation result.
|
92
|
+
// Contents will be demoted if contents were published for more than content
|
93
|
+
// freshness cutoff days.
|
94
|
+
int32 content_freshness_cutoff_days = 4;
|
95
|
+
}
|
96
|
+
|
97
|
+
// Specifies the configurations needed for Generic Discovery.Currently we
|
98
|
+
// support:
|
99
|
+
//
|
100
|
+
// * `content_search_spec`: configuration for generic content search.
|
101
|
+
message GenericConfig {
|
102
|
+
// Specifies the expected behavior of content search.
|
103
|
+
// Only valid for content-search enabled data store.
|
104
|
+
SearchRequest.ContentSearchSpec content_search_spec = 1;
|
105
|
+
}
|
106
|
+
|
107
|
+
// Industry vertical specific config.
|
108
|
+
oneof vertical_config {
|
109
|
+
// The MediaConfig of the serving configuration.
|
110
|
+
MediaConfig media_config = 7;
|
111
|
+
|
112
|
+
// The GenericConfig of the serving configuration.
|
113
|
+
GenericConfig generic_config = 10;
|
114
|
+
}
|
115
|
+
|
116
|
+
// Immutable. Fully qualified name
|
117
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
|
118
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
119
|
+
|
120
|
+
// Required. The human readable serving config display name. Used in Discovery
|
121
|
+
// UI.
|
122
|
+
//
|
123
|
+
// This field must be a UTF-8 encoded string with a length limit of 128
|
124
|
+
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
125
|
+
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
|
126
|
+
|
127
|
+
// Required. Immutable. Specifies the solution type that a serving config can
|
128
|
+
// be associated with.
|
129
|
+
SolutionType solution_type = 3 [
|
130
|
+
(google.api.field_behavior) = REQUIRED,
|
131
|
+
(google.api.field_behavior) = IMMUTABLE
|
132
|
+
];
|
133
|
+
|
134
|
+
// The id of the model to use at serving time.
|
135
|
+
// Currently only RecommendationModels are supported.
|
136
|
+
// Can be changed but only to a compatible model (e.g.
|
137
|
+
// others-you-may-like CTR to others-you-may-like CVR).
|
138
|
+
//
|
139
|
+
// Required when [SolutionType][google.cloud.discoveryengine.v1.SolutionType]
|
140
|
+
// is
|
141
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
142
|
+
string model_id = 4;
|
143
|
+
|
144
|
+
// How much diversity to use in recommendation model results e.g.
|
145
|
+
// `medium-diversity` or `high-diversity`. Currently supported values:
|
146
|
+
//
|
147
|
+
// * `no-diversity`
|
148
|
+
// * `low-diversity`
|
149
|
+
// * `medium-diversity`
|
150
|
+
// * `high-diversity`
|
151
|
+
// * `auto-diversity`
|
152
|
+
//
|
153
|
+
// If not specified, we choose default based on recommendation model
|
154
|
+
// type. Default value: `no-diversity`.
|
155
|
+
//
|
156
|
+
// Can only be set if
|
157
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
158
|
+
// [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
|
159
|
+
string diversity_level = 5;
|
160
|
+
|
161
|
+
// The ranking expression controls the customized ranking on retrieval
|
162
|
+
// documents. To leverage this, document embedding is required. The ranking
|
163
|
+
// expression setting in ServingConfig applies to all search requests served
|
164
|
+
// by the serving config. However, if `SearchRequest.ranking_expression` is
|
165
|
+
// specified, it overrides the ServingConfig ranking expression.
|
166
|
+
//
|
167
|
+
// The ranking expression is a single function or multiple functions that are
|
168
|
+
// joined by "+".
|
169
|
+
//
|
170
|
+
// * ranking_expression = function, { " + ", function };
|
171
|
+
//
|
172
|
+
// Supported functions:
|
173
|
+
//
|
174
|
+
// * double * relevance_score
|
175
|
+
// * double * dotProduct(embedding_field_path)
|
176
|
+
//
|
177
|
+
// Function variables:
|
178
|
+
//
|
179
|
+
// * `relevance_score`: pre-defined keywords, used for measure relevance
|
180
|
+
// between query and document.
|
181
|
+
// * `embedding_field_path`: the document embedding field
|
182
|
+
// used with query embedding vector.
|
183
|
+
// * `dotProduct`: embedding function between embedding_field_path and query
|
184
|
+
// embedding vector.
|
185
|
+
//
|
186
|
+
// Example ranking expression:
|
187
|
+
//
|
188
|
+
// If document has an embedding field doc_embedding, the ranking expression
|
189
|
+
// could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
190
|
+
string ranking_expression = 21;
|
191
|
+
|
192
|
+
// Output only. ServingConfig created timestamp.
|
193
|
+
google.protobuf.Timestamp create_time = 8
|
194
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
195
|
+
|
196
|
+
// Output only. ServingConfig updated timestamp.
|
197
|
+
google.protobuf.Timestamp update_time = 9
|
198
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
199
|
+
|
200
|
+
// Filter controls to use in serving path.
|
201
|
+
// All triggered filter controls will be applied.
|
202
|
+
// Filter controls must be in the same data store as the serving config.
|
203
|
+
// Maximum of 20 filter controls.
|
204
|
+
repeated string filter_control_ids = 11;
|
205
|
+
|
206
|
+
// Boost controls to use in serving path.
|
207
|
+
// All triggered boost controls will be applied.
|
208
|
+
// Boost controls must be in the same data store as the serving config.
|
209
|
+
// Maximum of 20 boost controls.
|
210
|
+
repeated string boost_control_ids = 12;
|
211
|
+
|
212
|
+
// IDs of the redirect controls. Only the first triggered redirect
|
213
|
+
// action is applied, even if multiple apply. Maximum number of
|
214
|
+
// specifications is 100.
|
215
|
+
//
|
216
|
+
// Can only be set if
|
217
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
218
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
|
219
|
+
repeated string redirect_control_ids = 14;
|
220
|
+
|
221
|
+
// Condition synonyms specifications. If multiple synonyms conditions
|
222
|
+
// match, all matching synonyms controls in the list will execute.
|
223
|
+
// Maximum number of specifications is 100.
|
224
|
+
//
|
225
|
+
// Can only be set if
|
226
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
227
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
|
228
|
+
repeated string synonyms_control_ids = 15;
|
229
|
+
|
230
|
+
// Condition oneway synonyms specifications. If multiple oneway synonyms
|
231
|
+
// conditions match, all matching oneway synonyms controls in the list
|
232
|
+
// will execute. Maximum number of specifications is 100.
|
233
|
+
//
|
234
|
+
// Can only be set if
|
235
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
236
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
|
237
|
+
repeated string oneway_synonyms_control_ids = 16;
|
238
|
+
|
239
|
+
// Condition do not associate specifications. If multiple do not
|
240
|
+
// associate conditions match, all matching do not associate controls in
|
241
|
+
// the list will execute.
|
242
|
+
// Order does not matter.
|
243
|
+
// Maximum number of specifications is 100.
|
244
|
+
//
|
245
|
+
// Can only be set if
|
246
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
247
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
|
248
|
+
repeated string dissociate_control_ids = 17;
|
249
|
+
|
250
|
+
// Condition replacement specifications.
|
251
|
+
// Applied according to the order in the list.
|
252
|
+
// A previously replaced term can not be re-replaced.
|
253
|
+
// Maximum number of specifications is 100.
|
254
|
+
//
|
255
|
+
// Can only be set if
|
256
|
+
// [SolutionType][google.cloud.discoveryengine.v1.SolutionType] is
|
257
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_SEARCH].
|
258
|
+
repeated string replacement_control_ids = 18;
|
259
|
+
|
260
|
+
// Condition ignore specifications. If multiple ignore
|
261
|
+
// conditions match, all matching ignore controls in the list will
|
262
|
+
// execute.
|
263
|
+
// Order does not matter.
|
264
|
+
// Maximum number of specifications is 100.
|
265
|
+
repeated string ignore_control_ids = 19;
|
266
|
+
|
267
|
+
// Condition promote specifications.
|
268
|
+
//
|
269
|
+
// Maximum number of specifications is 100.
|
270
|
+
repeated string promote_control_ids = 26;
|
271
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
// Copyright 2025 Google LLC
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
|
15
|
+
syntax = "proto3";
|
16
|
+
|
17
|
+
package google.cloud.discoveryengine.v1;
|
18
|
+
|
19
|
+
import "google/api/annotations.proto";
|
20
|
+
import "google/api/client.proto";
|
21
|
+
import "google/api/field_behavior.proto";
|
22
|
+
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1/serving_config.proto";
|
24
|
+
import "google/protobuf/field_mask.proto";
|
25
|
+
|
26
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
27
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
28
|
+
option java_multiple_files = true;
|
29
|
+
option java_outer_classname = "ServingConfigServiceProto";
|
30
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
31
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
32
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
33
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
34
|
+
|
35
|
+
// Service for operations related to
|
36
|
+
// [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig].
|
37
|
+
service ServingConfigService {
|
38
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
39
|
+
option (google.api.oauth_scopes) =
|
40
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
41
|
+
|
42
|
+
// Updates a ServingConfig.
|
43
|
+
//
|
44
|
+
// Returns a NOT_FOUND error if the ServingConfig does not exist.
|
45
|
+
rpc UpdateServingConfig(UpdateServingConfigRequest) returns (ServingConfig) {
|
46
|
+
option (google.api.http) = {
|
47
|
+
patch: "/v1/{serving_config.name=projects/*/locations/*/dataStores/*/servingConfigs/*}"
|
48
|
+
body: "serving_config"
|
49
|
+
additional_bindings {
|
50
|
+
patch: "/v1/{serving_config.name=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}"
|
51
|
+
body: "serving_config"
|
52
|
+
}
|
53
|
+
additional_bindings {
|
54
|
+
patch: "/v1/{serving_config.name=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}"
|
55
|
+
body: "serving_config"
|
56
|
+
}
|
57
|
+
};
|
58
|
+
option (google.api.method_signature) = "serving_config,update_mask";
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
// Request for UpdateServingConfig method.
|
63
|
+
message UpdateServingConfigRequest {
|
64
|
+
// Required. The ServingConfig to update.
|
65
|
+
ServingConfig serving_config = 1 [(google.api.field_behavior) = REQUIRED];
|
66
|
+
|
67
|
+
// Indicates which fields in the provided
|
68
|
+
// [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig] to update.
|
69
|
+
// The following are NOT supported:
|
70
|
+
//
|
71
|
+
// * [ServingConfig.name][google.cloud.discoveryengine.v1.ServingConfig.name]
|
72
|
+
//
|
73
|
+
// If not set, all supported fields are updated.
|
74
|
+
google.protobuf.FieldMask update_mask = 2;
|
75
|
+
}
|
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1;
|
|
18
18
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1/answer.proto";
|
21
22
|
import "google/protobuf/timestamp.proto";
|
22
23
|
|
23
24
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
@@ -51,6 +52,14 @@ message Session {
|
|
51
52
|
string answer = 2 [(google.api.resource_reference) = {
|
52
53
|
type: "discoveryengine.googleapis.com/Answer"
|
53
54
|
}];
|
55
|
+
|
56
|
+
// Output only. In
|
57
|
+
// [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
|
58
|
+
// API, if
|
59
|
+
// [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
|
60
|
+
// is set to true, this field will be populated when getting answer query
|
61
|
+
// session.
|
62
|
+
Answer detailed_answer = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
54
63
|
}
|
55
64
|
|
56
65
|
// Enumeration of the state of the session.
|
@@ -66,6 +75,12 @@ message Session {
|
|
66
75
|
// `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
|
67
76
|
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
68
77
|
|
78
|
+
// Optional. The display name of the session.
|
79
|
+
//
|
80
|
+
// This field is used to identify the session in the UI.
|
81
|
+
// By default, the display name is the first turn query text in the session.
|
82
|
+
string display_name = 7 [(google.api.field_behavior) = OPTIONAL];
|
83
|
+
|
69
84
|
// The state of the session.
|
70
85
|
State state = 2;
|
71
86
|
|
@@ -82,6 +97,10 @@ message Session {
|
|
82
97
|
// Output only. The time the session finished.
|
83
98
|
google.protobuf.Timestamp end_time = 6
|
84
99
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
100
|
+
|
101
|
+
// Optional. Whether the session is pinned, pinned session will be displayed
|
102
|
+
// on the top of the session list.
|
103
|
+
bool is_pinned = 8 [(google.api.field_behavior) = OPTIONAL];
|
85
104
|
}
|
86
105
|
|
87
106
|
// Defines a user inputed query.
|
@@ -118,13 +118,13 @@ message TargetSite {
|
|
118
118
|
// excluded.
|
119
119
|
Type type = 3;
|
120
120
|
|
121
|
-
//
|
122
|
-
//
|
121
|
+
// Immutable. If set to false, a uri_pattern is generated to include all pages
|
122
|
+
// whose address contains the provided_uri_pattern. If set to true, an
|
123
123
|
// uri_pattern is generated to try to be an exact match of the
|
124
124
|
// provided_uri_pattern or just the specific page if the provided_uri_pattern
|
125
125
|
// is a specific one. provided_uri_pattern is always normalized to
|
126
126
|
// generate the URI pattern to be used by the search engine.
|
127
|
-
bool exact_match = 6 [(google.api.field_behavior) =
|
127
|
+
bool exact_match = 6 [(google.api.field_behavior) = IMMUTABLE];
|
128
128
|
|
129
129
|
// Output only. This is system-generated based on the provided_uri_pattern.
|
130
130
|
string generated_uri_pattern = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
@@ -171,3 +171,27 @@ message SiteVerificationInfo {
|
|
171
171
|
// Latest site verification time.
|
172
172
|
google.protobuf.Timestamp verify_time = 2;
|
173
173
|
}
|
174
|
+
|
175
|
+
// A sitemap for the SiteSearchEngine.
|
176
|
+
message Sitemap {
|
177
|
+
option (google.api.resource) = {
|
178
|
+
type: "discoveryengine.googleapis.com/Sitemap"
|
179
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}"
|
180
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}"
|
181
|
+
};
|
182
|
+
|
183
|
+
// Supported feed sources.
|
184
|
+
oneof feed {
|
185
|
+
// Public URI for the sitemap, e.g. `www.example.com/sitemap.xml`.
|
186
|
+
string uri = 2;
|
187
|
+
}
|
188
|
+
|
189
|
+
// Output only. The fully qualified resource name of the sitemap.
|
190
|
+
// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/sitemaps/*`
|
191
|
+
// The `sitemap_id` suffix is system-generated.
|
192
|
+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
193
|
+
|
194
|
+
// Output only. The sitemap's creation time.
|
195
|
+
google.protobuf.Timestamp create_time = 3
|
196
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
197
|
+
}
|