@google-cloud/discoveryengine 1.13.0 → 1.14.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 +7 -0
- package/README.md +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +49 -5
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +6 -4
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +9 -9
- package/build/protos/google/cloud/discoveryengine/v1/custom_tuning_model.proto +96 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +10 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +2 -0
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +110 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +13 -7
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +117 -0
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +40 -16
- package/build/protos/google/cloud/discoveryengine/v1/search_tuning_service.proto +196 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +4 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +21 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/control.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +48 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +7 -7
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +21 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +47 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/control.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +2 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +13 -7
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +44 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +101 -6
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
- package/build/protos/protos.d.ts +7369 -2842
- package/build/protos/protos.js +13311 -2062
- package/build/protos/protos.json +1096 -45
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/completion_service_client.d.ts +93 -0
- package/build/src/v1/completion_service_client.js +134 -0
- package/build/src/v1/control_service_client.d.ts +93 -0
- package/build/src/v1/control_service_client.js +128 -0
- package/build/src/v1/conversational_search_service_client.d.ts +93 -0
- package/build/src/v1/conversational_search_service_client.js +128 -0
- package/build/src/v1/data_store_service_client.d.ts +102 -0
- package/build/src/v1/data_store_service_client.js +134 -0
- package/build/src/v1/document_service_client.d.ts +131 -0
- package/build/src/v1/document_service_client.js +156 -0
- package/build/src/v1/document_service_client_config.json +5 -0
- package/build/src/v1/engine_service_client.d.ts +93 -0
- package/build/src/v1/engine_service_client.js +134 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +93 -0
- package/build/src/v1/grounded_generation_service_client.js +128 -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 +93 -0
- package/build/src/v1/project_service_client.js +134 -0
- package/build/src/v1/rank_service_client.d.ts +93 -0
- package/build/src/v1/rank_service_client.js +128 -0
- package/build/src/v1/recommendation_service_client.d.ts +95 -1
- package/build/src/v1/recommendation_service_client.js +128 -0
- package/build/src/v1/schema_service_client.d.ts +93 -0
- package/build/src/v1/schema_service_client.js +134 -0
- package/build/src/v1/search_service_client.d.ts +111 -9
- package/build/src/v1/search_service_client.js +140 -6
- package/build/src/v1/search_tuning_service_client.d.ts +1776 -0
- package/build/src/v1/search_tuning_service_client.js +2589 -0
- package/build/src/v1/search_tuning_service_client_config.json +34 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +93 -0
- package/build/src/v1/site_search_engine_service_client.js +134 -0
- package/build/src/v1/user_event_service_client.d.ts +168 -0
- package/build/src/v1/user_event_service_client.js +176 -0
- package/build/src/v1/user_event_service_client_config.json +5 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +1 -1
- package/build/src/v1alpha/document_service_client.d.ts +29 -0
- package/build/src/v1alpha/document_service_client.js +22 -0
- package/build/src/v1alpha/document_service_client_config.json +5 -0
- package/build/src/v1beta/document_service_client.d.ts +38 -0
- package/build/src/v1beta/document_service_client.js +22 -0
- package/build/src/v1beta/document_service_client_config.json +5 -0
- package/build/src/v1beta/search_service_client.d.ts +36 -9
- package/build/src/v1beta/search_service_client.js +24 -6
- package/package.json +1 -1
@@ -18,6 +18,7 @@ package google.cloud.discoveryengine.v1beta;
|
|
18
18
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1beta/import_config.proto";
|
21
22
|
import "google/protobuf/timestamp.proto";
|
22
23
|
import "google/rpc/status.proto";
|
23
24
|
|
@@ -103,10 +104,50 @@ message PurgeUserEventsMetadata {
|
|
103
104
|
int64 failure_count = 4;
|
104
105
|
}
|
105
106
|
|
107
|
+
// Configuration of destination for Purge related errors.
|
108
|
+
message PurgeErrorConfig {
|
109
|
+
// Required. Errors destination.
|
110
|
+
oneof destination {
|
111
|
+
// Cloud Storage prefix for purge errors. This must be an empty,
|
112
|
+
// existing Cloud Storage directory. Purge errors are written to
|
113
|
+
// sharded files in this directory, one per line, as a JSON-encoded
|
114
|
+
// `google.rpc.Status` message.
|
115
|
+
string gcs_prefix = 1;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
106
119
|
// Request message for
|
107
120
|
// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments]
|
108
121
|
// method.
|
109
122
|
message PurgeDocumentsRequest {
|
123
|
+
// The inline source for the input config for
|
124
|
+
// [DocumentService.PurgeDocuments][google.cloud.discoveryengine.v1beta.DocumentService.PurgeDocuments]
|
125
|
+
// method.
|
126
|
+
message InlineSource {
|
127
|
+
// Required. A list of full resource name of documents to purge. In the
|
128
|
+
// format
|
129
|
+
// `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
|
130
|
+
// Recommended max of 100 items.
|
131
|
+
repeated string documents = 1 [
|
132
|
+
(google.api.field_behavior) = REQUIRED,
|
133
|
+
(google.api.resource_reference) = {
|
134
|
+
type: "discoveryengine.googleapis.com/Document"
|
135
|
+
}
|
136
|
+
];
|
137
|
+
}
|
138
|
+
|
139
|
+
// The desired input source for the purging documents based on document IDs.
|
140
|
+
oneof source {
|
141
|
+
// Cloud Storage location for the input content.
|
142
|
+
// Supported `data_schema`:
|
143
|
+
// * `document_id`: One valid
|
144
|
+
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id] per line.
|
145
|
+
GcsSource gcs_source = 5;
|
146
|
+
|
147
|
+
// Inline source for the input content for purge.
|
148
|
+
InlineSource inline_source = 6;
|
149
|
+
}
|
150
|
+
|
110
151
|
// Required. The parent resource name, such as
|
111
152
|
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
112
153
|
string parent = 1 [
|
@@ -121,6 +162,9 @@ message PurgeDocumentsRequest {
|
|
121
162
|
// `*` (all items).
|
122
163
|
string filter = 2 [(google.api.field_behavior) = REQUIRED];
|
123
164
|
|
165
|
+
// The desired location of errors incurred during the purge.
|
166
|
+
PurgeErrorConfig error_config = 7;
|
167
|
+
|
124
168
|
// Actually performs the purge. If `force` is set to false, return the
|
125
169
|
// expected purge count without deleting any documents.
|
126
170
|
bool force = 3;
|
@@ -498,6 +498,14 @@ message SearchRequest {
|
|
498
498
|
// fallback messages instead.
|
499
499
|
bool ignore_non_summary_seeking_query = 4;
|
500
500
|
|
501
|
+
// Specifies whether to filter out queries that have low relevance. The
|
502
|
+
// default value is `false`.
|
503
|
+
//
|
504
|
+
// If this field is set to `false`, all search results are used regardless
|
505
|
+
// of relevance to generate answers. If set to `true`, only queries with
|
506
|
+
// high relevance search results will generate answers.
|
507
|
+
bool ignore_low_relevant_content = 9;
|
508
|
+
|
501
509
|
// If specified, the spec will be used to modify the prompt provided to
|
502
510
|
// the LLM.
|
503
511
|
ModelPromptSpec model_prompt_spec = 5;
|
@@ -737,6 +745,27 @@ message SearchRequest {
|
|
737
745
|
optional int32 search_result_persistence_count = 2;
|
738
746
|
}
|
739
747
|
|
748
|
+
// The relevance threshold of the search results. The higher relevance
|
749
|
+
// threshold is, the higher relevant results are shown and the less number of
|
750
|
+
// results are returned.
|
751
|
+
enum RelevanceThreshold {
|
752
|
+
// Default value. In this case, server behavior defaults to Google defined
|
753
|
+
// threshold.
|
754
|
+
RELEVANCE_THRESHOLD_UNSPECIFIED = 0;
|
755
|
+
|
756
|
+
// Lowest relevance threshold.
|
757
|
+
LOWEST = 1;
|
758
|
+
|
759
|
+
// Low relevance threshold.
|
760
|
+
LOW = 2;
|
761
|
+
|
762
|
+
// Medium relevance threshold.
|
763
|
+
MEDIUM = 3;
|
764
|
+
|
765
|
+
// High relevance threshold.
|
766
|
+
HIGH = 4;
|
767
|
+
}
|
768
|
+
|
740
769
|
// Required. The resource name of the Search serving config, such as
|
741
770
|
// `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
742
771
|
// or
|
@@ -838,9 +867,12 @@ message SearchRequest {
|
|
838
867
|
// object. Leave it unset if ordered by relevance. `order_by` expression is
|
839
868
|
// case-sensitive.
|
840
869
|
//
|
841
|
-
// For more information on ordering
|
842
|
-
// [
|
843
|
-
//
|
870
|
+
// For more information on ordering the website search results, see
|
871
|
+
// [Order web search
|
872
|
+
// results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
873
|
+
// For more information on ordering the healthcare search results, see
|
874
|
+
// [Order healthcare search
|
875
|
+
// results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
844
876
|
// If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
845
877
|
string order_by = 8;
|
846
878
|
|
@@ -1025,6 +1057,13 @@ message SearchRequest {
|
|
1025
1057
|
//
|
1026
1058
|
// Can be used only when `session` is set.
|
1027
1059
|
SessionSpec session_spec = 42;
|
1060
|
+
|
1061
|
+
// The relevance threshold of the search results.
|
1062
|
+
//
|
1063
|
+
// Default to Google defined threshold, leveraging a balance of
|
1064
|
+
// precision and recall to deliver both highly accurate results and
|
1065
|
+
// comprehensive coverage of relevant information.
|
1066
|
+
RelevanceThreshold relevance_threshold = 44;
|
1028
1067
|
}
|
1029
1068
|
|
1030
1069
|
// Response message for
|
@@ -1191,14 +1230,14 @@ message SearchResponse {
|
|
1191
1230
|
|
1192
1231
|
// The adversarial query ignored case.
|
1193
1232
|
//
|
1194
|
-
// Only
|
1233
|
+
// Only used when
|
1195
1234
|
// [SummarySpec.ignore_adversarial_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_adversarial_query]
|
1196
1235
|
// is set to `true`.
|
1197
1236
|
ADVERSARIAL_QUERY_IGNORED = 1;
|
1198
1237
|
|
1199
1238
|
// The non-summary seeking query ignored case.
|
1200
1239
|
//
|
1201
|
-
// Only
|
1240
|
+
// Only used when
|
1202
1241
|
// [SummarySpec.ignore_non_summary_seeking_query][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_summary_seeking_query]
|
1203
1242
|
// is set to `true`.
|
1204
1243
|
NON_SUMMARY_SEEKING_QUERY_IGNORED = 2;
|
@@ -1226,6 +1265,20 @@ message SearchResponse {
|
|
1226
1265
|
// Google skips the summary if there is no relevant content in the
|
1227
1266
|
// retrieved search results.
|
1228
1267
|
NO_RELEVANT_CONTENT = 6;
|
1268
|
+
|
1269
|
+
// The jail-breaking query ignored case.
|
1270
|
+
//
|
1271
|
+
// For example, "Reply in the tone of a competing company's CEO".
|
1272
|
+
// Only used when
|
1273
|
+
// [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
|
1274
|
+
// is set to `true`.
|
1275
|
+
JAIL_BREAKING_QUERY_IGNORED = 7;
|
1276
|
+
|
1277
|
+
// The customer policy violation case.
|
1278
|
+
//
|
1279
|
+
// Google skips the summary if there is a customer policy violation
|
1280
|
+
// detected. The policy is defined by the customer.
|
1281
|
+
CUSTOMER_POLICY_VIOLATION = 8;
|
1229
1282
|
}
|
1230
1283
|
|
1231
1284
|
// The summary content.
|
@@ -1280,6 +1333,9 @@ message SearchResponse {
|
|
1280
1333
|
// Values of the string field. The record will only be returned if the
|
1281
1334
|
// field value matches one of the values specified here.
|
1282
1335
|
repeated string values = 2;
|
1336
|
+
|
1337
|
+
// Identifies the keywords within the search query that match a filter.
|
1338
|
+
string query_segment = 3;
|
1283
1339
|
}
|
1284
1340
|
|
1285
1341
|
// Constraint expression of a number field. Example: price < 100.
|
@@ -1314,6 +1370,9 @@ message SearchResponse {
|
|
1314
1370
|
|
1315
1371
|
// The value specified in the numerical constraint.
|
1316
1372
|
double value = 3;
|
1373
|
+
|
1374
|
+
// Identifies the keywords within the search query that match a filter.
|
1375
|
+
string query_segment = 4;
|
1317
1376
|
}
|
1318
1377
|
|
1319
1378
|
// Constraint of a geolocation field.
|
@@ -1327,6 +1386,12 @@ message SearchResponse {
|
|
1327
1386
|
// used to filter the results.
|
1328
1387
|
string address = 2;
|
1329
1388
|
|
1389
|
+
// The latitude of the geolocation inferred from the input query.
|
1390
|
+
double latitude = 4;
|
1391
|
+
|
1392
|
+
// The longitude of the geolocation inferred from the input query.
|
1393
|
+
double longitude = 5;
|
1394
|
+
|
1330
1395
|
// The radius in meters around the address. The record is returned if
|
1331
1396
|
// the location of the geolocation field is within the radius.
|
1332
1397
|
float radius_in_meters = 3;
|
@@ -1402,6 +1467,31 @@ message SearchResponse {
|
|
1402
1467
|
string query_id = 2;
|
1403
1468
|
}
|
1404
1469
|
|
1470
|
+
// OneBoxResult is a holder for all results of specific type that we want
|
1471
|
+
// to display in UI differently.
|
1472
|
+
message OneBoxResult {
|
1473
|
+
// The type of One Box result.
|
1474
|
+
enum OneBoxType {
|
1475
|
+
// Default value. Should not be used.
|
1476
|
+
ONE_BOX_TYPE_UNSPECIFIED = 0;
|
1477
|
+
|
1478
|
+
// One Box result contains people results.
|
1479
|
+
PEOPLE = 1;
|
1480
|
+
|
1481
|
+
// One Box result contains organization results.
|
1482
|
+
ORGANIZATION = 2;
|
1483
|
+
|
1484
|
+
// One Box result contains slack results.
|
1485
|
+
SLACK = 3;
|
1486
|
+
}
|
1487
|
+
|
1488
|
+
// The type of One Box result.
|
1489
|
+
OneBoxType one_box_type = 1;
|
1490
|
+
|
1491
|
+
// The search results for this One Box.
|
1492
|
+
repeated SearchResult search_results = 2;
|
1493
|
+
}
|
1494
|
+
|
1405
1495
|
// A list of matched documents. The order represents the ranking.
|
1406
1496
|
repeated SearchResult results = 1;
|
1407
1497
|
|
@@ -1422,7 +1512,8 @@ message SearchResponse {
|
|
1422
1512
|
// A unique search token. This should be included in the
|
1423
1513
|
// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting
|
1424
1514
|
// from this search, which enables accurate attribution of search model
|
1425
|
-
// performance.
|
1515
|
+
// performance. This also helps to identify a request during the customer
|
1516
|
+
// support scenarios.
|
1426
1517
|
string attribution_token = 4;
|
1427
1518
|
|
1428
1519
|
// The URI of a customer-defined redirect page. If redirect action is
|
@@ -1468,4 +1559,8 @@ message SearchResponse {
|
|
1468
1559
|
// [SearchRequest.session][google.cloud.discoveryengine.v1beta.SearchRequest.session]
|
1469
1560
|
// is provided. See its description for more details.
|
1470
1561
|
SessionInfo session_info = 19;
|
1562
|
+
|
1563
|
+
// A list of One Box results. There can be multiple One Box results of
|
1564
|
+
// different types.
|
1565
|
+
repeated OneBoxResult one_box_results = 20;
|
1471
1566
|
}
|
@@ -456,6 +456,10 @@ message DocumentInfo {
|
|
456
456
|
// The promotion IDs associated with this Document.
|
457
457
|
// Currently, this field is restricted to at most one ID.
|
458
458
|
repeated string promotion_ids = 4;
|
459
|
+
|
460
|
+
// Output only. Whether the referenced Document can be found in the data
|
461
|
+
// store.
|
462
|
+
bool joined = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
459
463
|
}
|
460
464
|
|
461
465
|
// Detailed panel information associated with a user event.
|