@google-cloud/discoveryengine 1.10.0 → 1.12.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 +20 -0
- package/README.md +33 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation.proto +232 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/evaluation_service.proto +252 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +83 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query.proto +86 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_service.proto +264 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/sample_query_set_service.proto +258 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/chunk.proto +119 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +0 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +29 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +37 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/evaluation.proto +231 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/evaluation_service.proto +252 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +191 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query.proto +86 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_service.proto +264 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/sample_query_set_service.proto +256 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +370 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +11 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
- package/build/protos/protos.d.ts +32735 -21073
- package/build/protos/protos.js +80768 -53241
- package/build/protos/protos.json +5309 -2481
- package/build/src/v1alpha/acl_config_service_client.d.ts +108 -0
- package/build/src/v1alpha/acl_config_service_client.js +157 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +108 -0
- package/build/src/v1alpha/chunk_service_client.js +157 -0
- package/build/src/v1alpha/completion_service_client.d.ts +108 -0
- package/build/src/v1alpha/completion_service_client.js +157 -0
- package/build/src/v1alpha/control_service_client.d.ts +108 -0
- package/build/src/v1alpha/control_service_client.js +157 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +108 -0
- package/build/src/v1alpha/conversational_search_service_client.js +157 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +108 -0
- package/build/src/v1alpha/data_store_service_client.js +157 -0
- package/build/src/v1alpha/document_service_client.d.ts +108 -0
- package/build/src/v1alpha/document_service_client.js +157 -0
- package/build/src/v1alpha/engine_service_client.d.ts +108 -0
- package/build/src/v1alpha/engine_service_client.js +157 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +108 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +157 -0
- package/build/src/v1alpha/evaluation_service_client.d.ts +2349 -0
- package/build/src/v1alpha/evaluation_service_client.js +3288 -0
- package/build/src/v1alpha/evaluation_service_client_config.json +58 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +108 -0
- package/build/src/v1alpha/grounded_generation_service_client.js +157 -0
- package/build/src/v1alpha/index.d.ts +3 -0
- package/build/src/v1alpha/index.js +7 -1
- package/build/src/v1alpha/project_service_client.d.ts +108 -0
- package/build/src/v1alpha/project_service_client.js +157 -0
- package/build/src/v1alpha/rank_service_client.d.ts +108 -0
- package/build/src/v1alpha/rank_service_client.js +157 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +108 -0
- package/build/src/v1alpha/recommendation_service_client.js +157 -0
- package/build/src/v1alpha/sample_query_service_client.d.ts +2317 -0
- package/build/src/v1alpha/sample_query_service_client.js +3186 -0
- package/build/src/v1alpha/sample_query_service_client_config.json +68 -0
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +2176 -0
- package/build/src/v1alpha/sample_query_set_service_client.js +2931 -0
- package/build/src/v1alpha/sample_query_set_service_client_config.json +63 -0
- package/build/src/v1alpha/schema_service_client.d.ts +108 -0
- package/build/src/v1alpha/schema_service_client.js +157 -0
- package/build/src/v1alpha/search_service_client.d.ts +108 -0
- package/build/src/v1alpha/search_service_client.js +157 -0
- package/build/src/v1alpha/search_tuning_service_client.d.ts +108 -0
- package/build/src/v1alpha/search_tuning_service_client.js +157 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +108 -0
- package/build/src/v1alpha/serving_config_service_client.js +157 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +108 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +157 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +108 -0
- package/build/src/v1alpha/user_event_service_client.js +157 -0
- package/build/src/v1beta/completion_service_client.d.ts +328 -0
- package/build/src/v1beta/completion_service_client.js +423 -0
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/control_service_client.d.ts +237 -0
- package/build/src/v1beta/control_service_client.js +333 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +255 -0
- package/build/src/v1beta/conversational_search_service_client.js +333 -0
- package/build/src/v1beta/data_store_service_client.d.ts +246 -0
- package/build/src/v1beta/data_store_service_client.js +339 -0
- package/build/src/v1beta/document_service_client.d.ts +239 -0
- package/build/src/v1beta/document_service_client.js +339 -0
- package/build/src/v1beta/engine_service_client.d.ts +237 -0
- package/build/src/v1beta/engine_service_client.js +339 -0
- package/build/src/v1beta/evaluation_service_client.d.ts +2325 -0
- package/build/src/v1beta/evaluation_service_client.js +3252 -0
- package/build/src/v1beta/evaluation_service_client_config.json +58 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +237 -0
- package/build/src/v1beta/grounded_generation_service_client.js +333 -0
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +7 -1
- package/build/src/v1beta/project_service_client.d.ts +237 -0
- package/build/src/v1beta/project_service_client.js +339 -0
- package/build/src/v1beta/rank_service_client.d.ts +237 -0
- package/build/src/v1beta/rank_service_client.js +333 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +237 -0
- package/build/src/v1beta/recommendation_service_client.js +333 -0
- package/build/src/v1beta/sample_query_service_client.d.ts +2293 -0
- package/build/src/v1beta/sample_query_service_client.js +3150 -0
- package/build/src/v1beta/sample_query_service_client_config.json +68 -0
- package/build/src/v1beta/sample_query_set_service_client.d.ts +2150 -0
- package/build/src/v1beta/sample_query_set_service_client.js +2895 -0
- package/build/src/v1beta/sample_query_set_service_client_config.json +63 -0
- package/build/src/v1beta/schema_service_client.d.ts +237 -0
- package/build/src/v1beta/schema_service_client.js +339 -0
- package/build/src/v1beta/search_service_client.d.ts +414 -12
- package/build/src/v1beta/search_service_client.js +451 -8
- package/build/src/v1beta/search_tuning_service_client.d.ts +237 -0
- package/build/src/v1beta/search_tuning_service_client.js +339 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +237 -0
- package/build/src/v1beta/serving_config_service_client.js +333 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +237 -0
- package/build/src/v1beta/site_search_engine_service_client.js +339 -0
- package/build/src/v1beta/user_event_service_client.d.ts +312 -0
- package/build/src/v1beta/user_event_service_client.js +381 -0
- package/build/src/v1beta/user_event_service_client_config.json +5 -0
- package/package.json +1 -1
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
|
|
20
20
|
import "google/api/client.proto";
|
21
21
|
import "google/api/field_behavior.proto";
|
22
22
|
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1beta/chunk.proto";
|
23
24
|
import "google/cloud/discoveryengine/v1beta/common.proto";
|
24
25
|
import "google/cloud/discoveryengine/v1beta/document.proto";
|
25
26
|
import "google/protobuf/struct.proto";
|
@@ -70,8 +71,8 @@ message SearchRequest {
|
|
70
71
|
}
|
71
72
|
|
72
73
|
// A struct to define data stores to filter on in a search call and
|
73
|
-
// configurations for those data stores.
|
74
|
-
//
|
74
|
+
// configurations for those data stores. Otherwise, an `INVALID_ARGUMENT`
|
75
|
+
// error is returned.
|
75
76
|
message DataStoreSpec {
|
76
77
|
// Required. Full resource name of
|
77
78
|
// [DataStore][google.cloud.discoveryengine.v1beta.DataStore], such as
|
@@ -150,6 +151,9 @@ message SearchRequest {
|
|
150
151
|
// Maximum facet values that are returned for this facet. If
|
151
152
|
// unspecified, defaults to 20. The maximum allowed value is 300. Values
|
152
153
|
// above 300 are coerced to 300.
|
154
|
+
// For aggregation in healthcare search, when the [FacetKey.key] is
|
155
|
+
// "healthcare_aggregation_key", the limit will be overridden to
|
156
|
+
// 10,000 internally, regardless of the value set here.
|
153
157
|
//
|
154
158
|
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
155
159
|
int32 limit = 2;
|
@@ -445,8 +449,9 @@ message SearchRequest {
|
|
445
449
|
//
|
446
450
|
// At most 10 results for documents mode, or 50 for chunks mode, can be
|
447
451
|
// used to generate a summary. The chunks mode is used when
|
448
|
-
// [SearchRequest.ContentSearchSpec.search_result_mode][]
|
449
|
-
//
|
452
|
+
// [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
|
453
|
+
// is set to
|
454
|
+
// [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
|
450
455
|
int32 summary_result_count = 1;
|
451
456
|
|
452
457
|
// Specifies whether to include citations in the summary. The default
|
@@ -569,6 +574,37 @@ message SearchRequest {
|
|
569
574
|
int32 num_next_segments = 5;
|
570
575
|
}
|
571
576
|
|
577
|
+
// Specifies the chunk spec to be returned from the search response.
|
578
|
+
// Only available if the
|
579
|
+
// [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
|
580
|
+
// is set to
|
581
|
+
// [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
|
582
|
+
message ChunkSpec {
|
583
|
+
// The number of previous chunks to be returned of the current chunk. The
|
584
|
+
// maximum allowed value is 3.
|
585
|
+
// If not specified, no previous chunks will be returned.
|
586
|
+
int32 num_previous_chunks = 1;
|
587
|
+
|
588
|
+
// The number of next chunks to be returned of the current chunk. The
|
589
|
+
// maximum allowed value is 3.
|
590
|
+
// If not specified, no next chunks will be returned.
|
591
|
+
int32 num_next_chunks = 2;
|
592
|
+
}
|
593
|
+
|
594
|
+
// Specifies the search result mode. If unspecified, the
|
595
|
+
// search result mode defaults to `DOCUMENTS`.
|
596
|
+
enum SearchResultMode {
|
597
|
+
// Default value.
|
598
|
+
SEARCH_RESULT_MODE_UNSPECIFIED = 0;
|
599
|
+
|
600
|
+
// Returns documents in the search result.
|
601
|
+
DOCUMENTS = 1;
|
602
|
+
|
603
|
+
// Returns chunks in the search result. Only available if the
|
604
|
+
// [DataStore.DocumentProcessingConfig.chunking_config][] is specified.
|
605
|
+
CHUNKS = 2;
|
606
|
+
}
|
607
|
+
|
572
608
|
// If `snippetSpec` is not specified, snippets are not included in the
|
573
609
|
// search response.
|
574
610
|
SnippetSpec snippet_spec = 1;
|
@@ -580,6 +616,17 @@ message SearchRequest {
|
|
580
616
|
// If there is no extractive_content_spec provided, there will be no
|
581
617
|
// extractive answer in the search response.
|
582
618
|
ExtractiveContentSpec extractive_content_spec = 3;
|
619
|
+
|
620
|
+
// Specifies the search result mode. If unspecified, the
|
621
|
+
// search result mode defaults to `DOCUMENTS`.
|
622
|
+
SearchResultMode search_result_mode = 4;
|
623
|
+
|
624
|
+
// Specifies the chunk spec to be returned from the search response.
|
625
|
+
// Only available if the
|
626
|
+
// [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
|
627
|
+
// is set to
|
628
|
+
// [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
|
629
|
+
ChunkSpec chunk_spec = 5;
|
583
630
|
}
|
584
631
|
|
585
632
|
// The specification that uses customized query embedding vector to do
|
@@ -598,6 +645,98 @@ message SearchRequest {
|
|
598
645
|
repeated EmbeddingVector embedding_vectors = 1;
|
599
646
|
}
|
600
647
|
|
648
|
+
// Specification to enable natural language understanding capabilities for
|
649
|
+
// search requests.
|
650
|
+
message NaturalLanguageQueryUnderstandingSpec {
|
651
|
+
// Enum describing under which condition filter extraction should occur.
|
652
|
+
enum FilterExtractionCondition {
|
653
|
+
// Server behavior defaults to [Condition.DISABLED][].
|
654
|
+
CONDITION_UNSPECIFIED = 0;
|
655
|
+
|
656
|
+
// Disables NL filter extraction.
|
657
|
+
DISABLED = 1;
|
658
|
+
|
659
|
+
// Enables NL filter extraction.
|
660
|
+
ENABLED = 2;
|
661
|
+
}
|
662
|
+
|
663
|
+
// The condition under which filter extraction should occur.
|
664
|
+
// Default to [Condition.DISABLED][].
|
665
|
+
FilterExtractionCondition filter_extraction_condition = 1;
|
666
|
+
|
667
|
+
// Field names used for location-based filtering, where geolocation filters
|
668
|
+
// are detected in natural language search queries.
|
669
|
+
// Only valid when the FilterExtractionCondition is set to `ENABLED`.
|
670
|
+
//
|
671
|
+
// If this field is set, it overrides the field names set in
|
672
|
+
// [ServingConfig.geo_search_query_detection_field_names][google.cloud.discoveryengine.v1beta.ServingConfig.geo_search_query_detection_field_names].
|
673
|
+
repeated string geo_search_query_detection_field_names = 2;
|
674
|
+
}
|
675
|
+
|
676
|
+
// Specification for search as you type in search requests.
|
677
|
+
message SearchAsYouTypeSpec {
|
678
|
+
// Enum describing under which condition search as you type should occur.
|
679
|
+
enum Condition {
|
680
|
+
// Server behavior defaults to
|
681
|
+
// [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
|
682
|
+
CONDITION_UNSPECIFIED = 0;
|
683
|
+
|
684
|
+
// Disables Search As You Type.
|
685
|
+
DISABLED = 1;
|
686
|
+
|
687
|
+
// Enables Search As You Type.
|
688
|
+
ENABLED = 2;
|
689
|
+
}
|
690
|
+
|
691
|
+
// The condition under which search as you type should occur.
|
692
|
+
// Default to
|
693
|
+
// [Condition.DISABLED][google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec.Condition.DISABLED].
|
694
|
+
Condition condition = 1;
|
695
|
+
}
|
696
|
+
|
697
|
+
// Session specification.
|
698
|
+
//
|
699
|
+
// Multi-turn Search feature is currently at private GA stage. Please use
|
700
|
+
// v1alpha or v1beta version instead before we launch this feature to public
|
701
|
+
// GA. Or ask for allowlisting through Google Support team.
|
702
|
+
message SessionSpec {
|
703
|
+
// If set, the search result gets stored to the "turn" specified by this
|
704
|
+
// query ID.
|
705
|
+
//
|
706
|
+
// Example: Let's say the session looks like this:
|
707
|
+
// session {
|
708
|
+
// name: ".../sessions/xxx"
|
709
|
+
// turns {
|
710
|
+
// query { text: "What is foo?" query_id: ".../questions/yyy" }
|
711
|
+
// answer: "Foo is ..."
|
712
|
+
// }
|
713
|
+
// turns {
|
714
|
+
// query { text: "How about bar then?" query_id: ".../questions/zzz" }
|
715
|
+
// }
|
716
|
+
// }
|
717
|
+
//
|
718
|
+
// The user can call /search API with a request like this:
|
719
|
+
//
|
720
|
+
// session: ".../sessions/xxx"
|
721
|
+
// session_spec { query_id: ".../questions/zzz" }
|
722
|
+
//
|
723
|
+
// Then, the API stores the search result, associated with the last turn.
|
724
|
+
// The stored search result can be used by a subsequent /answer API call
|
725
|
+
// (with the session ID and the query ID specified). Also, it is possible
|
726
|
+
// to call /search and /answer in parallel with the same session ID & query
|
727
|
+
// ID.
|
728
|
+
string query_id = 1;
|
729
|
+
|
730
|
+
// The number of top search results to persist. The persisted search results
|
731
|
+
// can be used for the subsequent /answer api call.
|
732
|
+
//
|
733
|
+
// This field is simliar to the `summary_result_count` field in
|
734
|
+
// [SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count].
|
735
|
+
//
|
736
|
+
// At most 10 results for documents mode, or 50 for chunks mode.
|
737
|
+
optional int32 search_result_persistence_count = 2;
|
738
|
+
}
|
739
|
+
|
601
740
|
// Required. The resource name of the Search serving config, such as
|
602
741
|
// `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
603
742
|
// or
|
@@ -711,6 +850,19 @@ message SearchRequest {
|
|
711
850
|
// is used to deduce `device_type` for analytics.
|
712
851
|
UserInfo user_info = 21;
|
713
852
|
|
853
|
+
// The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
854
|
+
// information, see [Standard
|
855
|
+
// fields](https://cloud.google.com/apis/design/standard_fields). This field
|
856
|
+
// helps to better interpret the query. If a value isn't specified, the query
|
857
|
+
// language code is automatically detected, which may not be accurate.
|
858
|
+
string language_code = 35;
|
859
|
+
|
860
|
+
// The Unicode country/region code (CLDR) of a location, such as "US" and
|
861
|
+
// "419". For more information, see [Standard
|
862
|
+
// fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
863
|
+
// then results will be boosted based on the region_code provided.
|
864
|
+
string region_code = 36;
|
865
|
+
|
714
866
|
// Facet specifications for faceted search. If empty, no facets are returned.
|
715
867
|
//
|
716
868
|
// A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
|
@@ -782,20 +934,26 @@ message SearchRequest {
|
|
782
934
|
// documents. This overrides
|
783
935
|
// [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1beta.ServingConfig.ranking_expression].
|
784
936
|
// The ranking expression is a single function or multiple functions that are
|
785
|
-
//
|
937
|
+
// joined by "+".
|
938
|
+
//
|
786
939
|
// * ranking_expression = function, { " + ", function };
|
940
|
+
//
|
787
941
|
// Supported functions:
|
942
|
+
//
|
788
943
|
// * double * relevance_score
|
789
944
|
// * double * dotProduct(embedding_field_path)
|
945
|
+
//
|
790
946
|
// Function variables:
|
791
|
-
//
|
947
|
+
//
|
948
|
+
// * `relevance_score`: pre-defined keywords, used for measure relevance
|
792
949
|
// between query and document.
|
793
|
-
// `embedding_field_path`: the document embedding field
|
950
|
+
// * `embedding_field_path`: the document embedding field
|
794
951
|
// used with query embedding vector.
|
795
|
-
// `dotProduct`: embedding function between embedding_field_path and query
|
952
|
+
// * `dotProduct`: embedding function between embedding_field_path and query
|
796
953
|
// embedding vector.
|
797
954
|
//
|
798
955
|
// Example ranking expression:
|
956
|
+
//
|
799
957
|
// If document has an embedding field doc_embedding, the ranking expression
|
800
958
|
// could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
801
959
|
string ranking_expression = 26;
|
@@ -822,6 +980,51 @@ message SearchRequest {
|
|
822
980
|
// Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
823
981
|
// for more details.
|
824
982
|
map<string, string> user_labels = 22;
|
983
|
+
|
984
|
+
// If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
985
|
+
// natural language query understanding will be done.
|
986
|
+
NaturalLanguageQueryUnderstandingSpec
|
987
|
+
natural_language_query_understanding_spec = 28;
|
988
|
+
|
989
|
+
// Search as you type configuration. Only supported for the
|
990
|
+
// [IndustryVertical.MEDIA][google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA]
|
991
|
+
// vertical.
|
992
|
+
SearchAsYouTypeSpec search_as_you_type_spec = 31;
|
993
|
+
|
994
|
+
// The session resource name. Optional.
|
995
|
+
//
|
996
|
+
// Session allows users to do multi-turn /search API calls or coordination
|
997
|
+
// between /search API calls and /answer API calls.
|
998
|
+
//
|
999
|
+
// Example #1 (multi-turn /search API calls):
|
1000
|
+
// 1. Call /search API with the auto-session mode (see below).
|
1001
|
+
// 2. Call /search API with the session ID generated in the first call.
|
1002
|
+
// Here, the previous search query gets considered in query
|
1003
|
+
// standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
1004
|
+
// and the current query is "How about 2023?", the current query will
|
1005
|
+
// be interpreted as "How did Alphabet do in 2023?".
|
1006
|
+
//
|
1007
|
+
// Example #2 (coordination between /search API calls and /answer API calls):
|
1008
|
+
// 1. Call /search API with the auto-session mode (see below).
|
1009
|
+
// 2. Call /answer API with the session ID generated in the first call.
|
1010
|
+
// Here, the answer generation happens in the context of the search
|
1011
|
+
// results from the first search call.
|
1012
|
+
//
|
1013
|
+
// Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
1014
|
+
// gets automatically created. Otherwise, users can use the create-session API
|
1015
|
+
// to create a session manually.
|
1016
|
+
//
|
1017
|
+
// Multi-turn Search feature is currently at private GA stage. Please use
|
1018
|
+
// v1alpha or v1beta version instead before we launch this feature to public
|
1019
|
+
// GA. Or ask for allowlisting through Google Support team.
|
1020
|
+
string session = 41 [(google.api.resource_reference) = {
|
1021
|
+
type: "discoveryengine.googleapis.com/Session"
|
1022
|
+
}];
|
1023
|
+
|
1024
|
+
// Session specification.
|
1025
|
+
//
|
1026
|
+
// Can be used only when `session` is set.
|
1027
|
+
SessionSpec session_spec = 42;
|
825
1028
|
}
|
826
1029
|
|
827
1030
|
// Response message for
|
@@ -838,6 +1041,12 @@ message SearchResponse {
|
|
838
1041
|
// marked as `retrievable` are populated.
|
839
1042
|
Document document = 2;
|
840
1043
|
|
1044
|
+
// The chunk data in the search response if the
|
1045
|
+
// [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.search_result_mode]
|
1046
|
+
// is set to
|
1047
|
+
// [CHUNKS][google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
|
1048
|
+
Chunk chunk = 18;
|
1049
|
+
|
841
1050
|
// Google provided available scores.
|
842
1051
|
map<string, DoubleList> model_scores = 4;
|
843
1052
|
}
|
@@ -1011,6 +1220,12 @@ message SearchResponse {
|
|
1011
1220
|
//
|
1012
1221
|
// Google skips the summary if the LLM addon is not enabled.
|
1013
1222
|
LLM_ADDON_NOT_ENABLED = 5;
|
1223
|
+
|
1224
|
+
// The no relevant content case.
|
1225
|
+
//
|
1226
|
+
// Google skips the summary if there is no relevant content in the
|
1227
|
+
// retrieved search results.
|
1228
|
+
NO_RELEVANT_CONTENT = 6;
|
1014
1229
|
}
|
1015
1230
|
|
1016
1231
|
// The summary content.
|
@@ -1051,6 +1266,142 @@ message SearchResponse {
|
|
1051
1266
|
int64 pinned_result_count = 2;
|
1052
1267
|
}
|
1053
1268
|
|
1269
|
+
// Information describing what natural language understanding was
|
1270
|
+
// done on the input query.
|
1271
|
+
message NaturalLanguageQueryUnderstandingInfo {
|
1272
|
+
// The filters that were extracted from the input query represented in a
|
1273
|
+
// structured form.
|
1274
|
+
message StructuredExtractedFilter {
|
1275
|
+
// Constraint expression of a string field.
|
1276
|
+
message StringConstraint {
|
1277
|
+
// Name of the string field as defined in the schema.
|
1278
|
+
string field_name = 1;
|
1279
|
+
|
1280
|
+
// Values of the string field. The record will only be returned if the
|
1281
|
+
// field value matches one of the values specified here.
|
1282
|
+
repeated string values = 2;
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
// Constraint expression of a number field. Example: price < 100.
|
1286
|
+
message NumberConstraint {
|
1287
|
+
// The comparison operation that was performed.
|
1288
|
+
enum Comparison {
|
1289
|
+
// Undefined comparison operator.
|
1290
|
+
COMPARISON_UNSPECIFIED = 0;
|
1291
|
+
|
1292
|
+
// Denotes equality `=` operator.
|
1293
|
+
EQUALS = 1;
|
1294
|
+
|
1295
|
+
// Denotes less than or equal to `<=` operator.
|
1296
|
+
LESS_THAN_EQUALS = 2;
|
1297
|
+
|
1298
|
+
// Denotes less than `<` operator.
|
1299
|
+
LESS_THAN = 3;
|
1300
|
+
|
1301
|
+
// Denotes greater than or equal to `>=` operator.
|
1302
|
+
GREATER_THAN_EQUALS = 4;
|
1303
|
+
|
1304
|
+
// Denotes greater than `>` operator.
|
1305
|
+
GREATER_THAN = 5;
|
1306
|
+
}
|
1307
|
+
|
1308
|
+
// Name of the numerical field as defined in the schema.
|
1309
|
+
string field_name = 1;
|
1310
|
+
|
1311
|
+
// The comparison operation performed between the field value and the
|
1312
|
+
// value specified in the constraint.
|
1313
|
+
Comparison comparison = 2;
|
1314
|
+
|
1315
|
+
// The value specified in the numerical constraint.
|
1316
|
+
double value = 3;
|
1317
|
+
}
|
1318
|
+
|
1319
|
+
// Constraint of a geolocation field.
|
1320
|
+
// Name of the geolocation field as defined in the schema.
|
1321
|
+
message GeolocationConstraint {
|
1322
|
+
// The name of the geolocation field as defined in the schema.
|
1323
|
+
string field_name = 1;
|
1324
|
+
|
1325
|
+
// The reference address that was inferred from the input query. The
|
1326
|
+
// proximity of the reference address to the geolocation field will be
|
1327
|
+
// used to filter the results.
|
1328
|
+
string address = 2;
|
1329
|
+
|
1330
|
+
// The radius in meters around the address. The record is returned if
|
1331
|
+
// the location of the geolocation field is within the radius.
|
1332
|
+
float radius_in_meters = 3;
|
1333
|
+
}
|
1334
|
+
|
1335
|
+
// Logical `And` operator.
|
1336
|
+
message AndExpression {
|
1337
|
+
// The expressions that were ANDed together.
|
1338
|
+
repeated Expression expressions = 1;
|
1339
|
+
}
|
1340
|
+
|
1341
|
+
// Logical `Or` operator.
|
1342
|
+
message OrExpression {
|
1343
|
+
// The expressions that were ORed together.
|
1344
|
+
repeated Expression expressions = 1;
|
1345
|
+
}
|
1346
|
+
|
1347
|
+
// The expression denoting the filter that was extracted from the input
|
1348
|
+
// query.
|
1349
|
+
message Expression {
|
1350
|
+
// The expression type.
|
1351
|
+
oneof expr {
|
1352
|
+
// String constraint expression.
|
1353
|
+
StringConstraint string_constraint = 1;
|
1354
|
+
|
1355
|
+
// Numerical constraint expression.
|
1356
|
+
NumberConstraint number_constraint = 2;
|
1357
|
+
|
1358
|
+
// Geolocation constraint expression.
|
1359
|
+
GeolocationConstraint geolocation_constraint = 3;
|
1360
|
+
|
1361
|
+
// Logical "And" compound operator connecting multiple expressions.
|
1362
|
+
AndExpression and_expr = 4;
|
1363
|
+
|
1364
|
+
// Logical "Or" compound operator connecting multiple expressions.
|
1365
|
+
OrExpression or_expr = 5;
|
1366
|
+
}
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
// The expression denoting the filter that was extracted from the input
|
1370
|
+
// query in a structured form. It can be a simple expression denoting a
|
1371
|
+
// single string, numerical or geolocation constraint or a compound
|
1372
|
+
// expression which is a combination of multiple expressions connected
|
1373
|
+
// using logical (OR and AND) operators.
|
1374
|
+
Expression expression = 1;
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
// The filters that were extracted from the input query.
|
1378
|
+
string extracted_filters = 1;
|
1379
|
+
|
1380
|
+
// Rewritten input query minus the extracted filters.
|
1381
|
+
string rewritten_query = 2;
|
1382
|
+
|
1383
|
+
// The filters that were extracted from the input query represented in a
|
1384
|
+
// structured form.
|
1385
|
+
StructuredExtractedFilter structured_extracted_filter = 3;
|
1386
|
+
}
|
1387
|
+
|
1388
|
+
// Information about the session.
|
1389
|
+
message SessionInfo {
|
1390
|
+
// Name of the session.
|
1391
|
+
// If the auto-session mode is used (when
|
1392
|
+
// [SearchRequest.session][google.cloud.discoveryengine.v1beta.SearchRequest.session]
|
1393
|
+
// ends with "-"), this field holds the newly generated session name.
|
1394
|
+
string name = 1;
|
1395
|
+
|
1396
|
+
// Query ID that corresponds to this search API call.
|
1397
|
+
// One session can have multiple turns, each with a unique query ID.
|
1398
|
+
//
|
1399
|
+
// By specifying the session name and this query ID in the Answer API call,
|
1400
|
+
// the answer generation happens in the context of the search results from
|
1401
|
+
// this search call.
|
1402
|
+
string query_id = 2;
|
1403
|
+
}
|
1404
|
+
|
1054
1405
|
// A list of matched documents. The order represents the ranking.
|
1055
1406
|
repeated SearchResult results = 1;
|
1056
1407
|
|
@@ -1106,4 +1457,15 @@ message SearchResponse {
|
|
1106
1457
|
|
1107
1458
|
// Query expansion information for the returned results.
|
1108
1459
|
QueryExpansionInfo query_expansion_info = 14;
|
1460
|
+
|
1461
|
+
// Natural language query understanding information for the returned results.
|
1462
|
+
NaturalLanguageQueryUnderstandingInfo
|
1463
|
+
natural_language_query_understanding_info = 15;
|
1464
|
+
|
1465
|
+
// Session information.
|
1466
|
+
//
|
1467
|
+
// Only set if
|
1468
|
+
// [SearchRequest.session][google.cloud.discoveryengine.v1beta.SearchRequest.session]
|
1469
|
+
// is provided. See its description for more details.
|
1470
|
+
SessionInfo session_info = 19;
|
1109
1471
|
}
|
@@ -171,21 +171,27 @@ message ServingConfig {
|
|
171
171
|
//
|
172
172
|
// The ranking expression is a single function or multiple functions that are
|
173
173
|
// joined by "+".
|
174
|
+
//
|
174
175
|
// * ranking_expression = function, { " + ", function };
|
176
|
+
//
|
175
177
|
// Supported functions:
|
178
|
+
//
|
176
179
|
// * double * relevance_score
|
177
180
|
// * double * dotProduct(embedding_field_path)
|
181
|
+
//
|
178
182
|
// Function variables:
|
179
|
-
//
|
180
|
-
//
|
181
|
-
//
|
183
|
+
//
|
184
|
+
// * `relevance_score`: pre-defined keywords, used for measure relevance
|
185
|
+
// between query and document.
|
186
|
+
// * `embedding_field_path`: the document embedding field
|
182
187
|
// used with query embedding vector.
|
183
|
-
// dotProduct
|
188
|
+
// * `dotProduct`: embedding function between embedding_field_path and query
|
184
189
|
// embedding vector.
|
185
190
|
//
|
186
191
|
// Example ranking expression:
|
192
|
+
//
|
187
193
|
// If document has an embedding field doc_embedding, the ranking expression
|
188
|
-
// could be 0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)
|
194
|
+
// could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
189
195
|
string ranking_expression = 21;
|
190
196
|
|
191
197
|
// Output only. ServingConfig created timestamp.
|
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
|
|
22
22
|
import "google/api/httpbody.proto";
|
23
23
|
import "google/api/resource.proto";
|
24
24
|
import "google/cloud/discoveryengine/v1beta/import_config.proto";
|
25
|
+
import "google/cloud/discoveryengine/v1beta/purge_config.proto";
|
25
26
|
import "google/cloud/discoveryengine/v1beta/user_event.proto";
|
26
27
|
import "google/longrunning/operations.proto";
|
27
28
|
|
@@ -67,6 +68,29 @@ service UserEventService {
|
|
67
68
|
additional_bindings {
|
68
69
|
get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:collect"
|
69
70
|
}
|
71
|
+
additional_bindings {
|
72
|
+
get: "/v1beta/{parent=projects/*/locations/*}/userEvents:collect"
|
73
|
+
}
|
74
|
+
};
|
75
|
+
}
|
76
|
+
|
77
|
+
// Deletes permanently all user events specified by the filter provided.
|
78
|
+
// Depending on the number of events specified by the filter, this operation
|
79
|
+
// could take hours or days to complete. To test a filter, use the list
|
80
|
+
// command first.
|
81
|
+
rpc PurgeUserEvents(PurgeUserEventsRequest)
|
82
|
+
returns (google.longrunning.Operation) {
|
83
|
+
option (google.api.http) = {
|
84
|
+
post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/userEvents:purge"
|
85
|
+
body: "*"
|
86
|
+
additional_bindings {
|
87
|
+
post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/userEvents:purge"
|
88
|
+
body: "*"
|
89
|
+
}
|
90
|
+
};
|
91
|
+
option (google.longrunning.operation_info) = {
|
92
|
+
response_type: "google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse"
|
93
|
+
metadata_type: "google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata"
|
70
94
|
};
|
71
95
|
}
|
72
96
|
|