@google-cloud/discoveryengine 1.8.0 → 1.9.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 +8 -0
- package/README.md +33 -4
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +337 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +33 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +214 -0
- package/build/protos/google/cloud/discoveryengine/v1/control_service.proto +236 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +569 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +4 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +92 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -6
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +149 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +58 -0
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1/project.proto +103 -0
- package/build/protos/google/cloud/discoveryengine/v1/project_service.proto +90 -0
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +131 -0
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +20 -19
- package/build/protos/google/cloud/discoveryengine/v1/schema_service.proto +5 -5
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +23 -18
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +97 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +28 -3
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +18 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +7 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +16 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +217 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/control_service.proto +236 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +19 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +87 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +1 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +12 -9
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +1 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +2 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +20 -19
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +37 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +6 -6
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +28 -31
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +39 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +29 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +18 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +10 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +16 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +216 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/control_service.proto +236 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +87 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +1 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +7 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +30 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +4 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/project.proto +103 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/project_service.proto +90 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +20 -19
- package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +5 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +30 -24
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +39 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +4 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +28 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +18 -2
- package/build/protos/protos.d.ts +52350 -38733
- package/build/protos/protos.js +136479 -103212
- package/build/protos/protos.json +9460 -5916
- package/build/src/index.d.ts +13 -1
- package/build/src/index.js +13 -1
- package/build/src/v1/completion_service_client.d.ts +549 -0
- package/build/src/v1/completion_service_client.js +771 -0
- package/build/src/v1/control_service_client.d.ts +1623 -0
- package/build/src/v1/control_service_client.js +2218 -0
- package/build/src/v1/control_service_client_config.json +63 -0
- package/build/src/v1/conversational_search_service_client.d.ts +893 -0
- package/build/src/v1/conversational_search_service_client.js +1040 -14
- package/build/src/v1/conversational_search_service_client_config.json +35 -0
- package/build/src/v1/data_store_service_client.d.ts +555 -6
- package/build/src/v1/data_store_service_client.js +775 -4
- package/build/src/v1/document_service_client.d.ts +557 -8
- package/build/src/v1/document_service_client.js +773 -2
- package/build/src/v1/engine_service_client.d.ts +549 -0
- package/build/src/v1/engine_service_client.js +771 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +1439 -0
- package/build/src/v1/grounded_generation_service_client.js +2036 -0
- package/build/src/v1/grounded_generation_service_client_config.json +43 -0
- package/build/src/v1/index.d.ts +4 -0
- package/build/src/v1/index.js +9 -1
- package/build/src/v1/project_service_client.d.ts +1533 -0
- package/build/src/v1/project_service_client.js +2255 -0
- package/build/src/v1/project_service_client_config.json +43 -0
- package/build/src/v1/rank_service_client.d.ts +1449 -0
- package/build/src/v1/rank_service_client.js +2037 -0
- package/build/src/v1/rank_service_client_config.json +43 -0
- package/build/src/v1/recommendation_service_client.d.ts +568 -18
- package/build/src/v1/recommendation_service_client.js +756 -0
- package/build/src/v1/schema_service_client.d.ts +558 -9
- package/build/src/v1/schema_service_client.js +775 -4
- package/build/src/v1/search_service_client.d.ts +579 -21
- package/build/src/v1/search_service_client.js +776 -14
- package/build/src/v1/site_search_engine_service_client.d.ts +549 -0
- package/build/src/v1/site_search_engine_service_client.js +771 -0
- package/build/src/v1/user_event_service_client.d.ts +562 -2
- package/build/src/v1/user_event_service_client.js +771 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +237 -0
- package/build/src/v1alpha/acl_config_service_client.js +326 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +237 -0
- package/build/src/v1alpha/chunk_service_client.js +326 -0
- package/build/src/v1alpha/completion_service_client.d.ts +237 -0
- package/build/src/v1alpha/completion_service_client.js +340 -0
- package/build/src/v1alpha/control_service_client.d.ts +2013 -0
- package/build/src/v1alpha/control_service_client.js +2757 -0
- package/build/src/v1alpha/control_service_client_config.json +63 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +239 -2
- package/build/src/v1alpha/conversational_search_service_client.js +326 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +243 -6
- package/build/src/v1alpha/data_store_service_client.js +344 -4
- package/build/src/v1alpha/document_service_client.d.ts +246 -9
- package/build/src/v1alpha/document_service_client.js +342 -2
- package/build/src/v1alpha/engine_service_client.d.ts +237 -0
- package/build/src/v1alpha/engine_service_client.js +340 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +237 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +340 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +256 -1
- package/build/src/v1alpha/grounded_generation_service_client.js +326 -0
- package/build/src/v1alpha/index.d.ts +1 -0
- package/build/src/v1alpha/index.js +3 -1
- package/build/src/v1alpha/project_service_client.d.ts +239 -0
- package/build/src/v1alpha/project_service_client.js +340 -0
- package/build/src/v1alpha/project_service_client_config.json +21 -6
- package/build/src/v1alpha/rank_service_client.d.ts +255 -0
- package/build/src/v1alpha/rank_service_client.js +326 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +256 -18
- package/build/src/v1alpha/recommendation_service_client.js +326 -0
- package/build/src/v1alpha/schema_service_client.d.ts +247 -10
- package/build/src/v1alpha/schema_service_client.js +344 -4
- package/build/src/v1alpha/search_service_client.d.ts +267 -21
- package/build/src/v1alpha/search_service_client.js +346 -14
- package/build/src/v1alpha/search_tuning_service_client.d.ts +265 -0
- package/build/src/v1alpha/search_tuning_service_client.js +365 -1
- package/build/src/v1alpha/search_tuning_service_client_config.json +4 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +237 -0
- package/build/src/v1alpha/serving_config_service_client.js +326 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +237 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +340 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +250 -2
- package/build/src/v1alpha/user_event_service_client.js +340 -0
- package/build/src/v1beta/completion_service_client.d.ts +252 -0
- package/build/src/v1beta/completion_service_client.js +359 -0
- package/build/src/v1beta/control_service_client.d.ts +1860 -0
- package/build/src/v1beta/control_service_client.js +2545 -0
- package/build/src/v1beta/control_service_client_config.json +63 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +254 -2
- package/build/src/v1beta/conversational_search_service_client.js +348 -0
- package/build/src/v1beta/data_store_service_client.d.ts +258 -6
- package/build/src/v1beta/data_store_service_client.js +363 -4
- package/build/src/v1beta/document_service_client.d.ts +261 -10
- package/build/src/v1beta/document_service_client.js +361 -2
- package/build/src/v1beta/engine_service_client.d.ts +252 -0
- package/build/src/v1beta/engine_service_client.js +359 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +271 -1
- package/build/src/v1beta/grounded_generation_service_client.js +348 -0
- package/build/src/v1beta/index.d.ts +2 -0
- package/build/src/v1beta/index.js +5 -1
- package/build/src/v1beta/project_service_client.d.ts +1770 -0
- package/build/src/v1beta/project_service_client.js +2576 -0
- package/build/src/v1beta/project_service_client_config.json +43 -0
- package/build/src/v1beta/rank_service_client.d.ts +270 -0
- package/build/src/v1beta/rank_service_client.js +348 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +271 -18
- package/build/src/v1beta/recommendation_service_client.js +348 -0
- package/build/src/v1beta/schema_service_client.d.ts +261 -9
- package/build/src/v1beta/schema_service_client.js +363 -4
- package/build/src/v1beta/search_service_client.d.ts +282 -21
- package/build/src/v1beta/search_service_client.js +368 -14
- package/build/src/v1beta/search_tuning_service_client.d.ts +280 -0
- package/build/src/v1beta/search_tuning_service_client.js +384 -1
- package/build/src/v1beta/search_tuning_service_client_config.json +4 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
- package/build/src/v1beta/serving_config_service_client.js +326 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +252 -0
- package/build/src/v1beta/site_search_engine_service_client.js +359 -0
- package/build/src/v1beta/user_event_service_client.d.ts +265 -2
- package/build/src/v1beta/user_event_service_client.js +359 -0
- package/package.json +2 -2
@@ -0,0 +1,131 @@
|
|
1
|
+
// Copyright 2024 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
|
+
|
24
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
25
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
26
|
+
option java_multiple_files = true;
|
27
|
+
option java_outer_classname = "RankServiceProto";
|
28
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
29
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
30
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
31
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
32
|
+
|
33
|
+
// Service for ranking text records.
|
34
|
+
service RankService {
|
35
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
36
|
+
option (google.api.oauth_scopes) =
|
37
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
38
|
+
|
39
|
+
// Ranks a list of text records based on the given input query.
|
40
|
+
rpc Rank(RankRequest) returns (RankResponse) {
|
41
|
+
option (google.api.http) = {
|
42
|
+
post: "/v1/{ranking_config=projects/*/locations/*/rankingConfigs/*}:rank"
|
43
|
+
body: "*"
|
44
|
+
};
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
// Record message for
|
49
|
+
// [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] method.
|
50
|
+
message RankingRecord {
|
51
|
+
// The unique ID to represent the record.
|
52
|
+
string id = 1;
|
53
|
+
|
54
|
+
// The title of the record. Empty by default.
|
55
|
+
// At least one of
|
56
|
+
// [title][google.cloud.discoveryengine.v1.RankingRecord.title] or
|
57
|
+
// [content][google.cloud.discoveryengine.v1.RankingRecord.content] should be
|
58
|
+
// set otherwise an INVALID_ARGUMENT error is thrown.
|
59
|
+
string title = 2;
|
60
|
+
|
61
|
+
// The content of the record. Empty by default.
|
62
|
+
// At least one of
|
63
|
+
// [title][google.cloud.discoveryengine.v1.RankingRecord.title] or
|
64
|
+
// [content][google.cloud.discoveryengine.v1.RankingRecord.content] should be
|
65
|
+
// set otherwise an INVALID_ARGUMENT error is thrown.
|
66
|
+
string content = 3;
|
67
|
+
|
68
|
+
// The score of this record based on the given query and selected model.
|
69
|
+
float score = 4;
|
70
|
+
}
|
71
|
+
|
72
|
+
// Request message for
|
73
|
+
// [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] method.
|
74
|
+
message RankRequest {
|
75
|
+
// Required. The resource name of the rank service config, such as
|
76
|
+
// `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
|
77
|
+
string ranking_config = 1 [
|
78
|
+
(google.api.field_behavior) = REQUIRED,
|
79
|
+
(google.api.resource_reference) = {
|
80
|
+
type: "discoveryengine.googleapis.com/RankingConfig"
|
81
|
+
}
|
82
|
+
];
|
83
|
+
|
84
|
+
// The identifier of the model to use. It is one of:
|
85
|
+
//
|
86
|
+
// * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input
|
87
|
+
// token size 512.
|
88
|
+
//
|
89
|
+
// It is set to `semantic-ranker-512@latest` by default if unspecified.
|
90
|
+
string model = 2;
|
91
|
+
|
92
|
+
// The number of results to return. If this is unset or no bigger than zero,
|
93
|
+
// returns all results.
|
94
|
+
int32 top_n = 3;
|
95
|
+
|
96
|
+
// The query to use.
|
97
|
+
string query = 4;
|
98
|
+
|
99
|
+
// Required. A list of records to rank. At most 200 records to rank.
|
100
|
+
repeated RankingRecord records = 5 [(google.api.field_behavior) = REQUIRED];
|
101
|
+
|
102
|
+
// If true, the response will contain only record ID and score. By default, it
|
103
|
+
// is false, the response will contain record details.
|
104
|
+
bool ignore_record_details_in_response = 6;
|
105
|
+
|
106
|
+
// The user labels applied to a resource must meet the following requirements:
|
107
|
+
//
|
108
|
+
// * Each resource can have multiple labels, up to a maximum of 64.
|
109
|
+
// * Each label must be a key-value pair.
|
110
|
+
// * Keys have a minimum length of 1 character and a maximum length of 63
|
111
|
+
// characters and cannot be empty. Values can be empty and have a maximum
|
112
|
+
// length of 63 characters.
|
113
|
+
// * Keys and values can contain only lowercase letters, numeric characters,
|
114
|
+
// underscores, and dashes. All characters must use UTF-8 encoding, and
|
115
|
+
// international characters are allowed.
|
116
|
+
// * The key portion of a label must be unique. However, you can use the same
|
117
|
+
// key with multiple resources.
|
118
|
+
// * Keys must start with a lowercase letter or international character.
|
119
|
+
//
|
120
|
+
// See [Google Cloud
|
121
|
+
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
122
|
+
// for more details.
|
123
|
+
map<string, string> user_labels = 7;
|
124
|
+
}
|
125
|
+
|
126
|
+
// Response message for
|
127
|
+
// [RankService.Rank][google.cloud.discoveryengine.v1.RankService.Rank] method.
|
128
|
+
message RankResponse {
|
129
|
+
// A list of records sorted by descending score.
|
130
|
+
repeated RankingRecord records = 5;
|
131
|
+
}
|
@@ -63,7 +63,7 @@ message RecommendRequest {
|
|
63
63
|
// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
64
64
|
//
|
65
65
|
// One default serving config is created along with your recommendation engine
|
66
|
-
// creation. The engine ID
|
66
|
+
// creation. The engine ID is used as the ID of the default serving
|
67
67
|
// config. For example, for Engine
|
68
68
|
// `projects/*/locations/global/collections/*/engines/my-engine`, you can use
|
69
69
|
// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine`
|
@@ -96,9 +96,9 @@ message RecommendRequest {
|
|
96
96
|
UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
|
97
97
|
|
98
98
|
// Maximum number of results to return. Set this property
|
99
|
-
// to the number of recommendation results needed. If zero, the service
|
100
|
-
//
|
101
|
-
// above 100
|
99
|
+
// to the number of recommendation results needed. If zero, the service
|
100
|
+
// chooses a reasonable default. The maximum allowed value is 100. Values
|
101
|
+
// above 100 are set to 100.
|
102
102
|
int32 page_size = 3;
|
103
103
|
|
104
104
|
// Filter for restricting recommendation results with a length limit of 5,000
|
@@ -119,19 +119,19 @@ message RecommendRequest {
|
|
119
119
|
// * (available: true) AND
|
120
120
|
// (launguage: ANY("en", "es")) OR (categories: ANY("Movie"))
|
121
121
|
//
|
122
|
-
// If your filter blocks all results, the API
|
122
|
+
// If your filter blocks all results, the API returns generic
|
123
123
|
// (unfiltered) popular Documents. If you only want results strictly matching
|
124
|
-
// the filters, set `strictFiltering` to
|
124
|
+
// the filters, set `strictFiltering` to `true` in
|
125
125
|
// [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]
|
126
126
|
// to receive empty results instead.
|
127
127
|
//
|
128
|
-
// Note that the API
|
128
|
+
// Note that the API never returns
|
129
129
|
// [Document][google.cloud.discoveryengine.v1.Document]s with `storageStatus`
|
130
|
-
//
|
130
|
+
// as `EXPIRED` or `DELETED` regardless of filter choices.
|
131
131
|
string filter = 4;
|
132
132
|
|
133
|
-
// Use validate only mode for this recommendation query. If set to true
|
134
|
-
// fake model
|
133
|
+
// Use validate only mode for this recommendation query. If set to `true`, a
|
134
|
+
// fake model is used that returns arbitrary Document IDs.
|
135
135
|
// Note that the validate only mode should only be used for testing the API,
|
136
136
|
// or if the model is not ready.
|
137
137
|
bool validate_only = 5;
|
@@ -140,16 +140,17 @@ message RecommendRequest {
|
|
140
140
|
//
|
141
141
|
// Allowed values:
|
142
142
|
//
|
143
|
-
// * `returnDocument`: Boolean. If set to true
|
144
|
-
// object
|
143
|
+
// * `returnDocument`: Boolean. If set to `true`, the associated Document
|
144
|
+
// object is returned in
|
145
145
|
// [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.document].
|
146
|
-
// * `returnScore`: Boolean. If set to true, the recommendation
|
147
|
-
// corresponding to each returned Document
|
146
|
+
// * `returnScore`: Boolean. If set to true, the recommendation score
|
147
|
+
// corresponding to each returned Document is set in
|
148
148
|
// [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.metadata].
|
149
|
-
// The given
|
150
|
-
//
|
151
|
-
// * `strictFiltering`: Boolean. True by default. If set to false
|
152
|
-
//
|
149
|
+
// The given score indicates the probability of a Document conversion given
|
150
|
+
// the user's context and history.
|
151
|
+
// * `strictFiltering`: Boolean. True by default. If set to `false`, the
|
152
|
+
// service
|
153
|
+
// returns generic (unfiltered) popular Documents instead of empty if
|
153
154
|
// your filter blocks all recommendation results.
|
154
155
|
// * `diversityLevel`: String. Default empty. If set to be non-empty, then
|
155
156
|
// it needs to be one of:
|
@@ -197,7 +198,7 @@ message RecommendResponse {
|
|
197
198
|
// [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params].
|
198
199
|
Document document = 2;
|
199
200
|
|
200
|
-
// Additional Document metadata
|
201
|
+
// Additional Document metadata or annotations.
|
201
202
|
//
|
202
203
|
// Possible values:
|
203
204
|
//
|
@@ -142,9 +142,9 @@ message ListSchemasRequest {
|
|
142
142
|
// return. The service may return fewer than this value.
|
143
143
|
//
|
144
144
|
// If unspecified, at most 100
|
145
|
-
// [Schema][google.cloud.discoveryengine.v1.Schema]s
|
145
|
+
// [Schema][google.cloud.discoveryengine.v1.Schema]s are returned.
|
146
146
|
//
|
147
|
-
// The maximum value is 1000; values above 1000
|
147
|
+
// The maximum value is 1000; values above 1000 are set to 1000.
|
148
148
|
int32 page_size = 2;
|
149
149
|
|
150
150
|
// A page token, received from a previous
|
@@ -188,8 +188,8 @@ message CreateSchemaRequest {
|
|
188
188
|
Schema schema = 2 [(google.api.field_behavior) = REQUIRED];
|
189
189
|
|
190
190
|
// Required. The ID to use for the
|
191
|
-
// [Schema][google.cloud.discoveryengine.v1.Schema], which
|
192
|
-
//
|
191
|
+
// [Schema][google.cloud.discoveryengine.v1.Schema], which becomes the final
|
192
|
+
// component of the
|
193
193
|
// [Schema.name][google.cloud.discoveryengine.v1.Schema.name].
|
194
194
|
//
|
195
195
|
// This field should conform to
|
@@ -206,7 +206,7 @@ message UpdateSchemaRequest {
|
|
206
206
|
Schema schema = 1 [(google.api.field_behavior) = REQUIRED];
|
207
207
|
|
208
208
|
// If set to true, and the [Schema][google.cloud.discoveryengine.v1.Schema] is
|
209
|
-
// not found, a new [Schema][google.cloud.discoveryengine.v1.Schema]
|
209
|
+
// not found, a new [Schema][google.cloud.discoveryengine.v1.Schema] is
|
210
210
|
// created. In this situation, `update_mask` is ignored.
|
211
211
|
bool allow_missing = 3;
|
212
212
|
}
|
@@ -69,7 +69,9 @@ message SearchRequest {
|
|
69
69
|
}
|
70
70
|
}
|
71
71
|
|
72
|
-
// A struct to define data stores to filter on in a search call
|
72
|
+
// A struct to define data stores to filter on in a search call and
|
73
|
+
// configurations for those data stores. A maximum of 1 DataStoreSpec per
|
74
|
+
// data_store is allowed. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
73
75
|
message DataStoreSpec {
|
74
76
|
// Required. Full resource name of
|
75
77
|
// [DataStore][google.cloud.discoveryengine.v1.DataStore], such as
|
@@ -111,7 +113,7 @@ message SearchRequest {
|
|
111
113
|
// Only supported on textual fields. Maximum is 10.
|
112
114
|
repeated string prefixes = 4;
|
113
115
|
|
114
|
-
// Only get facet values that
|
116
|
+
// Only get facet values that contain the given strings. For example,
|
115
117
|
// suppose "category" has three values "Action > 2022",
|
116
118
|
// "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
|
117
119
|
// "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
|
@@ -145,7 +147,7 @@ message SearchRequest {
|
|
145
147
|
// Required. The facet key specification.
|
146
148
|
FacetKey facet_key = 1 [(google.api.field_behavior) = REQUIRED];
|
147
149
|
|
148
|
-
// Maximum
|
150
|
+
// Maximum facet values that are returned for this facet. If
|
149
151
|
// unspecified, defaults to 20. The maximum allowed value is 300. Values
|
150
152
|
// above 300 are coerced to 300.
|
151
153
|
//
|
@@ -296,10 +298,10 @@ message SearchRequest {
|
|
296
298
|
// [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
|
297
299
|
MODE_UNSPECIFIED = 0;
|
298
300
|
|
299
|
-
// Search API
|
300
|
-
//
|
301
|
+
// Search API tries to find a spelling suggestion. If a suggestion is
|
302
|
+
// found, it is put in the
|
301
303
|
// [SearchResponse.corrected_query][google.cloud.discoveryengine.v1.SearchResponse.corrected_query].
|
302
|
-
// The
|
304
|
+
// The spelling suggestion won't be used as the search query.
|
303
305
|
SUGGESTION_ONLY = 1;
|
304
306
|
|
305
307
|
// Automatic spell correction built by the Search API. Search will
|
@@ -307,8 +309,8 @@ message SearchRequest {
|
|
307
309
|
AUTO = 2;
|
308
310
|
}
|
309
311
|
|
310
|
-
// The mode under which spell correction
|
311
|
-
//
|
312
|
+
// The mode under which spell correction
|
313
|
+
// replaces the original search query. Defaults to
|
312
314
|
// [Mode.AUTO][google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec.Mode.AUTO].
|
313
315
|
Mode mode = 1;
|
314
316
|
}
|
@@ -561,7 +563,10 @@ message SearchRequest {
|
|
561
563
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
562
564
|
int32 offset = 6;
|
563
565
|
|
564
|
-
//
|
566
|
+
// Specs defining dataStores to filter on in a search call and configurations
|
567
|
+
// for those dataStores. This is only considered for engines with multiple
|
568
|
+
// dataStores use case. For single dataStore within an engine, they should
|
569
|
+
// use the specs at the top level.
|
565
570
|
repeated DataStoreSpec data_store_specs = 32;
|
566
571
|
|
567
572
|
// The filter syntax consists of an expression language for constructing a
|
@@ -598,7 +603,9 @@ message SearchRequest {
|
|
598
603
|
// The order in which documents are returned. Documents can be ordered by
|
599
604
|
// a field in an [Document][google.cloud.discoveryengine.v1.Document] object.
|
600
605
|
// Leave it unset if ordered by relevance. `order_by` expression is
|
601
|
-
// case-sensitive.
|
606
|
+
// case-sensitive.
|
607
|
+
//
|
608
|
+
// For more information on ordering for retail search, see
|
602
609
|
// [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
603
610
|
//
|
604
611
|
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
@@ -618,7 +625,7 @@ message SearchRequest {
|
|
618
625
|
|
619
626
|
// Boost specification to boost certain documents.
|
620
627
|
// For more information on boosting, see
|
621
|
-
// [Boosting](https://cloud.google.com/
|
628
|
+
// [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
622
629
|
BoostSpec boost_spec = 10;
|
623
630
|
|
624
631
|
// Additional search parameters.
|
@@ -627,8 +634,7 @@ message SearchRequest {
|
|
627
634
|
//
|
628
635
|
// * `user_country_code`: string. Default empty. If set to non-empty, results
|
629
636
|
// are restricted or boosted based on the location provided.
|
630
|
-
//
|
631
|
-
// user_country_code: "au"
|
637
|
+
// For example, `user_country_code: "au"`
|
632
638
|
//
|
633
639
|
// For available codes see [Country
|
634
640
|
// Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
@@ -636,8 +642,7 @@ message SearchRequest {
|
|
636
642
|
// * `search_type`: double. Default empty. Enables non-webpage searching
|
637
643
|
// depending on the value. The only valid non-default value is 1,
|
638
644
|
// which enables image searching.
|
639
|
-
//
|
640
|
-
// search_type: 1
|
645
|
+
// For example, `search_type: 1`
|
641
646
|
map<string, google.protobuf.Value> params = 11;
|
642
647
|
|
643
648
|
// The query expansion specification that specifies the conditions under which
|
@@ -702,7 +707,7 @@ message SearchResponse {
|
|
702
707
|
string id = 1;
|
703
708
|
|
704
709
|
// The document data snippet in the search response. Only fields that are
|
705
|
-
// marked as retrievable are populated.
|
710
|
+
// marked as `retrievable` are populated.
|
706
711
|
Document document = 2;
|
707
712
|
}
|
708
713
|
|
@@ -725,7 +730,7 @@ message SearchResponse {
|
|
725
730
|
int64 count = 3;
|
726
731
|
}
|
727
732
|
|
728
|
-
// The key for this facet.
|
733
|
+
// The key for this facet. For example, `"colors"` or `"price"`. It matches
|
729
734
|
// [SearchRequest.FacetSpec.FacetKey.key][google.cloud.discoveryengine.v1.SearchRequest.FacetSpec.FacetKey.key].
|
730
735
|
string key = 1;
|
731
736
|
|
@@ -736,7 +741,7 @@ message SearchResponse {
|
|
736
741
|
bool dynamic_facet = 3;
|
737
742
|
}
|
738
743
|
|
739
|
-
// Summary of the top N search
|
744
|
+
// Summary of the top N search results specified by the summary spec.
|
740
745
|
message Summary {
|
741
746
|
// Safety Attribute categories and their associated confidence scores.
|
742
747
|
message SafetyAttributes {
|
@@ -0,0 +1,97 @@
|
|
1
|
+
// Copyright 2024 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/protobuf/timestamp.proto";
|
22
|
+
|
23
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1";
|
24
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1/discoveryenginepb;discoveryenginepb";
|
25
|
+
option java_multiple_files = true;
|
26
|
+
option java_outer_classname = "SessionProto";
|
27
|
+
option java_package = "com.google.cloud.discoveryengine.v1";
|
28
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
29
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
30
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
31
|
+
|
32
|
+
// External session proto definition.
|
33
|
+
message Session {
|
34
|
+
option (google.api.resource) = {
|
35
|
+
type: "discoveryengine.googleapis.com/Session"
|
36
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}"
|
37
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}"
|
38
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}"
|
39
|
+
};
|
40
|
+
|
41
|
+
// Represents a turn, including a query from the user and a
|
42
|
+
// answer from service.
|
43
|
+
message Turn {
|
44
|
+
// The user query.
|
45
|
+
Query query = 1;
|
46
|
+
|
47
|
+
// The resource name of the answer to the user query.
|
48
|
+
//
|
49
|
+
// Only set if the answer generation (/answer API call) happened in this
|
50
|
+
// turn.
|
51
|
+
string answer = 2 [(google.api.resource_reference) = {
|
52
|
+
type: "discoveryengine.googleapis.com/Answer"
|
53
|
+
}];
|
54
|
+
}
|
55
|
+
|
56
|
+
// Enumeration of the state of the session.
|
57
|
+
enum State {
|
58
|
+
// State is unspecified.
|
59
|
+
STATE_UNSPECIFIED = 0;
|
60
|
+
|
61
|
+
// The session is currently open.
|
62
|
+
IN_PROGRESS = 1;
|
63
|
+
}
|
64
|
+
|
65
|
+
// Immutable. Fully qualified name
|
66
|
+
// `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
|
67
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
68
|
+
|
69
|
+
// The state of the session.
|
70
|
+
State state = 2;
|
71
|
+
|
72
|
+
// A unique identifier for tracking users.
|
73
|
+
string user_pseudo_id = 3;
|
74
|
+
|
75
|
+
// Turns.
|
76
|
+
repeated Turn turns = 4;
|
77
|
+
|
78
|
+
// Output only. The time the session started.
|
79
|
+
google.protobuf.Timestamp start_time = 5
|
80
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
81
|
+
|
82
|
+
// Output only. The time the session finished.
|
83
|
+
google.protobuf.Timestamp end_time = 6
|
84
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
85
|
+
}
|
86
|
+
|
87
|
+
// Defines a user inputed query.
|
88
|
+
message Query {
|
89
|
+
// Query content.
|
90
|
+
oneof content {
|
91
|
+
// Plain text.
|
92
|
+
string text = 2;
|
93
|
+
}
|
94
|
+
|
95
|
+
// Unique Id for the query.
|
96
|
+
string query_id = 1;
|
97
|
+
}
|
@@ -129,6 +129,9 @@ message TargetSite {
|
|
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];
|
131
131
|
|
132
|
+
// Output only. Root domain of the provided_uri_pattern.
|
133
|
+
string root_domain_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
|
134
|
+
|
132
135
|
// Output only. Site ownership and validity verification status.
|
133
136
|
SiteVerificationInfo site_verification_info = 7
|
134
137
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
@@ -32,7 +32,7 @@ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1";
|
|
32
32
|
option ruby_package = "Google::Cloud::DiscoveryEngine::V1";
|
33
33
|
|
34
34
|
// UserEvent captures all metadata information Discovery Engine API needs to
|
35
|
-
// know about how end users interact with
|
35
|
+
// know about how end users interact with your website.
|
36
36
|
message UserEvent {
|
37
37
|
// Required. User event type. Allowed values are:
|
38
38
|
//
|
@@ -74,6 +74,31 @@ message UserEvent {
|
|
74
74
|
// for this field.
|
75
75
|
string user_pseudo_id = 2 [(google.api.field_behavior) = REQUIRED];
|
76
76
|
|
77
|
+
// The [Engine][google.cloud.discoveryengine.v1.Engine] resource name, in the
|
78
|
+
// form of
|
79
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
|
80
|
+
//
|
81
|
+
// Optional. Only required for
|
82
|
+
// [Engine][google.cloud.discoveryengine.v1.Engine] produced user events. For
|
83
|
+
// example, user events from blended search.
|
84
|
+
string engine = 19 [(google.api.resource_reference) = {
|
85
|
+
type: "discoveryengine.googleapis.com/Engine"
|
86
|
+
}];
|
87
|
+
|
88
|
+
// The [DataStore][google.cloud.discoveryengine.v1.DataStore] resource full
|
89
|
+
// name, of the form
|
90
|
+
// `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
|
91
|
+
//
|
92
|
+
// Optional. Only required for user events whose data store can't by
|
93
|
+
// determined by
|
94
|
+
// [UserEvent.engine][google.cloud.discoveryengine.v1.UserEvent.engine] or
|
95
|
+
// [UserEvent.documents][google.cloud.discoveryengine.v1.UserEvent.documents].
|
96
|
+
// If data store is set in the parent of write/import/collect user event
|
97
|
+
// requests, this field can be omitted.
|
98
|
+
string data_store = 20 [(google.api.resource_reference) = {
|
99
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
100
|
+
}];
|
101
|
+
|
77
102
|
// Only required for
|
78
103
|
// [UserEventService.ImportUserEvents][google.cloud.discoveryengine.v1.UserEventService.ImportUserEvents]
|
79
104
|
// method. Timestamp of when the user event happened.
|
@@ -196,7 +221,7 @@ message UserEvent {
|
|
196
221
|
|
197
222
|
// A list of identifiers for the independent experiment groups this user event
|
198
223
|
// belongs to. This is used to distinguish between user events associated with
|
199
|
-
// different experiment setups
|
224
|
+
// different experiment setups.
|
200
225
|
repeated string tag_ids = 15;
|
201
226
|
|
202
227
|
// The promotion IDs if this is an event associated with promotions.
|
@@ -416,7 +441,7 @@ message DocumentInfo {
|
|
416
441
|
|
417
442
|
// Quantity of the Document associated with the user event. Defaults to 1.
|
418
443
|
//
|
419
|
-
// For example, this field
|
444
|
+
// For example, this field is 2 if two quantities of the same Document
|
420
445
|
// are involved in a `add-to-cart` event.
|
421
446
|
//
|
422
447
|
// Required for events of the following event types:
|
@@ -49,6 +49,10 @@ service UserEventService {
|
|
49
49
|
post: "/v1/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:write"
|
50
50
|
body: "user_event"
|
51
51
|
}
|
52
|
+
additional_bindings {
|
53
|
+
post: "/v1/{parent=projects/*/locations/*}/userEvents:write"
|
54
|
+
body: "user_event"
|
55
|
+
}
|
52
56
|
};
|
53
57
|
}
|
54
58
|
|
@@ -66,7 +70,7 @@ service UserEventService {
|
|
66
70
|
};
|
67
71
|
}
|
68
72
|
|
69
|
-
// Bulk import of
|
73
|
+
// Bulk import of user events. Request processing might be
|
70
74
|
// synchronous. Events that already exist are skipped.
|
71
75
|
// Use this method for backfilling historical user events.
|
72
76
|
//
|
@@ -92,8 +96,16 @@ service UserEventService {
|
|
92
96
|
|
93
97
|
// Request message for WriteUserEvent method.
|
94
98
|
message WriteUserEventRequest {
|
95
|
-
// Required. The parent
|
99
|
+
// Required. The parent resource name.
|
100
|
+
// If the write user event action is applied in
|
101
|
+
// [DataStore][google.cloud.discoveryengine.v1.DataStore] level, the format
|
102
|
+
// is:
|
96
103
|
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
104
|
+
// If the write user event action is applied in [Location][] level, for
|
105
|
+
// example, the event with
|
106
|
+
// [Document][google.cloud.discoveryengine.v1.Document] across multiple
|
107
|
+
// [DataStore][google.cloud.discoveryengine.v1.DataStore], the format is:
|
108
|
+
// `projects/{project}/locations/{location}`.
|
97
109
|
string parent = 1 [
|
98
110
|
(google.api.field_behavior) = REQUIRED,
|
99
111
|
(google.api.resource_reference) = {
|
@@ -103,6 +115,10 @@ message WriteUserEventRequest {
|
|
103
115
|
|
104
116
|
// Required. User event to write.
|
105
117
|
optional UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
|
118
|
+
|
119
|
+
// If set to true, the user event is written asynchronously after
|
120
|
+
// validation, and the API responds without waiting for the write.
|
121
|
+
bool write_async = 3;
|
106
122
|
}
|
107
123
|
|
108
124
|
// Request message for CollectUserEvent method.
|
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1alpha;
|
|
18
18
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
|
+
import "google/protobuf/struct.proto";
|
21
22
|
import "google/protobuf/timestamp.proto";
|
22
23
|
|
23
24
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
@@ -83,6 +84,10 @@ message Answer {
|
|
83
84
|
|
84
85
|
// List of cited chunk contents derived from document content.
|
85
86
|
repeated ChunkContent chunk_contents = 4;
|
87
|
+
|
88
|
+
// The structured JSON metadata for the document.
|
89
|
+
// It is populated from the struct data from the Chunk in search result.
|
90
|
+
google.protobuf.Struct struct_data = 5;
|
86
91
|
}
|
87
92
|
|
88
93
|
// Chunk information.
|
@@ -102,6 +107,10 @@ message Answer {
|
|
102
107
|
|
103
108
|
// Page identifier.
|
104
109
|
string page_identifier = 4;
|
110
|
+
|
111
|
+
// The structured JSON metadata for the document.
|
112
|
+
// It is populated from the struct data from the Chunk in search result.
|
113
|
+
google.protobuf.Struct struct_data = 5;
|
105
114
|
}
|
106
115
|
|
107
116
|
// Chunk resource name.
|
@@ -96,6 +96,13 @@ message Chunk {
|
|
96
96
|
// Content is a string from a document (parsed content).
|
97
97
|
string content = 3;
|
98
98
|
|
99
|
+
// The relevance score based on similarity.
|
100
|
+
// Higher score indicates higher chunk relevance.
|
101
|
+
// The score is in range [-1.0, 1.0].
|
102
|
+
// Only populated on [SearchService.SearchResponse][].
|
103
|
+
optional double relevance_score = 8
|
104
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
105
|
+
|
99
106
|
// Metadata of the document from the current chunk.
|
100
107
|
DocumentMetadata document_metadata = 5;
|
101
108
|
|
@@ -89,6 +89,22 @@ enum SolutionType {
|
|
89
89
|
SOLUTION_TYPE_GENERATIVE_CHAT = 4;
|
90
90
|
}
|
91
91
|
|
92
|
+
// Defines a further subdivision of `SolutionType`.
|
93
|
+
// Specifically applies to
|
94
|
+
// [SOLUTION_TYPE_SEARCH][google.cloud.discoveryengine.v1alpha.SolutionType.SOLUTION_TYPE_SEARCH].
|
95
|
+
enum SearchUseCase {
|
96
|
+
// Value used when unset. Will not occur in CSS.
|
97
|
+
SEARCH_USE_CASE_UNSPECIFIED = 0;
|
98
|
+
|
99
|
+
// Search use case. Expects the traffic has a non-empty
|
100
|
+
// [query][google.cloud.discoveryengine.v1alpha.SearchRequest.query].
|
101
|
+
SEARCH_USE_CASE_SEARCH = 1;
|
102
|
+
|
103
|
+
// Browse use case. Expects the traffic has an empty
|
104
|
+
// [query][google.cloud.discoveryengine.v1alpha.SearchRequest.query].
|
105
|
+
SEARCH_USE_CASE_BROWSE = 2;
|
106
|
+
}
|
107
|
+
|
92
108
|
// Tiers of search features. Different tiers might have different
|
93
109
|
// pricing. To learn more, check the pricing documentation.
|
94
110
|
enum SearchTier {
|