@google-cloud/discoveryengine 2.3.0 → 2.5.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/README.md +20 -0
- package/build/protos/google/cloud/discoveryengine/v1/assist_answer.proto +251 -0
- package/build/protos/google/cloud/discoveryengine/v1/assistant.proto +44 -0
- package/build/protos/google/cloud/discoveryengine/v1/assistant_service.proto +217 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +15 -3
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +160 -14
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +21 -8
- package/build/protos/google/cloud/discoveryengine/v1/session_service.proto +128 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +15 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +30 -9
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +136 -18
- package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +238 -8
- package/build/protos/google/cloud/discoveryengine/v1alpha/session_service.proto +201 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +26 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +136 -18
- package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +40 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/session_service.proto +128 -0
- package/build/protos/protos.d.ts +15854 -10608
- package/build/protos/protos.js +47009 -33222
- package/build/protos/protos.json +5357 -3208
- package/build/src/index.d.ts +7 -1
- package/build/src/index.js +6 -2
- package/build/src/v1/assistant_service_client.d.ts +2058 -0
- package/build/src/v1/assistant_service_client.js +2957 -0
- package/build/src/v1/assistant_service_client_config.json +43 -0
- package/build/src/v1/assistant_service_proto_list.json +48 -0
- package/build/src/v1/cmek_config_service_client.d.ts +255 -144
- package/build/src/v1/cmek_config_service_client.js +348 -196
- package/build/src/v1/cmek_config_service_proto_list.json +4 -0
- package/build/src/v1/completion_service_client.d.ts +255 -144
- package/build/src/v1/completion_service_client.js +348 -196
- package/build/src/v1/completion_service_proto_list.json +4 -0
- package/build/src/v1/control_service_client.d.ts +255 -144
- package/build/src/v1/control_service_client.js +348 -196
- package/build/src/v1/control_service_proto_list.json +4 -0
- package/build/src/v1/conversational_search_service_client.d.ts +302 -155
- package/build/src/v1/conversational_search_service_client.js +380 -204
- package/build/src/v1/conversational_search_service_proto_list.json +4 -0
- package/build/src/v1/data_store_service_client.d.ts +255 -144
- package/build/src/v1/data_store_service_client.js +348 -196
- package/build/src/v1/data_store_service_proto_list.json +4 -0
- package/build/src/v1/document_service_client.d.ts +255 -144
- package/build/src/v1/document_service_client.js +348 -196
- package/build/src/v1/document_service_proto_list.json +4 -0
- package/build/src/v1/engine_service_client.d.ts +255 -144
- package/build/src/v1/engine_service_client.js +348 -196
- package/build/src/v1/engine_service_proto_list.json +4 -0
- package/build/src/v1/gapic_metadata.json +86 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +255 -144
- package/build/src/v1/grounded_generation_service_client.js +348 -196
- package/build/src/v1/grounded_generation_service_proto_list.json +4 -0
- package/build/src/v1/identity_mapping_store_service_client.d.ts +255 -144
- package/build/src/v1/identity_mapping_store_service_client.js +353 -201
- package/build/src/v1/identity_mapping_store_service_proto_list.json +4 -0
- package/build/src/v1/index.d.ts +2 -0
- package/build/src/v1/index.js +5 -1
- package/build/src/v1/project_service_client.d.ts +255 -144
- package/build/src/v1/project_service_client.js +348 -196
- package/build/src/v1/project_service_proto_list.json +4 -0
- package/build/src/v1/rank_service_client.d.ts +255 -144
- package/build/src/v1/rank_service_client.js +348 -196
- package/build/src/v1/rank_service_proto_list.json +4 -0
- package/build/src/v1/recommendation_service_client.d.ts +255 -144
- package/build/src/v1/recommendation_service_client.js +348 -196
- package/build/src/v1/recommendation_service_proto_list.json +4 -0
- package/build/src/v1/schema_service_client.d.ts +255 -144
- package/build/src/v1/schema_service_client.js +348 -196
- package/build/src/v1/schema_service_proto_list.json +4 -0
- package/build/src/v1/search_service_client.d.ts +861 -228
- package/build/src/v1/search_service_client.js +752 -252
- package/build/src/v1/search_service_proto_list.json +4 -0
- package/build/src/v1/search_tuning_service_client.d.ts +255 -144
- package/build/src/v1/search_tuning_service_client.js +348 -196
- package/build/src/v1/search_tuning_service_proto_list.json +4 -0
- package/build/src/v1/serving_config_service_client.d.ts +255 -144
- package/build/src/v1/serving_config_service_client.js +348 -196
- package/build/src/v1/serving_config_service_proto_list.json +4 -0
- package/build/src/v1/session_service_client.d.ts +2326 -0
- package/build/src/v1/session_service_client.js +3218 -0
- package/build/src/v1/session_service_client_config.json +63 -0
- package/build/src/v1/session_service_proto_list.json +48 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +255 -144
- package/build/src/v1/site_search_engine_service_client.js +348 -196
- package/build/src/v1/site_search_engine_service_proto_list.json +4 -0
- package/build/src/v1/user_event_service_client.d.ts +255 -144
- package/build/src/v1/user_event_service_client.js +348 -196
- package/build/src/v1/user_event_service_proto_list.json +4 -0
- package/build/src/v1/user_license_service_client.d.ts +255 -144
- package/build/src/v1/user_license_service_client.js +348 -196
- package/build/src/v1/user_license_service_proto_list.json +4 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +144 -144
- package/build/src/v1alpha/acl_config_service_client.js +196 -196
- package/build/src/v1alpha/acl_config_service_proto_list.json +1 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +144 -144
- package/build/src/v1alpha/chunk_service_client.js +196 -196
- package/build/src/v1alpha/chunk_service_proto_list.json +1 -0
- package/build/src/v1alpha/completion_service_client.d.ts +144 -144
- package/build/src/v1alpha/completion_service_client.js +196 -196
- package/build/src/v1alpha/completion_service_proto_list.json +1 -0
- package/build/src/v1alpha/control_service_client.d.ts +144 -144
- package/build/src/v1alpha/control_service_client.js +196 -196
- package/build/src/v1alpha/control_service_proto_list.json +1 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +221 -167
- package/build/src/v1alpha/conversational_search_service_client.js +244 -210
- package/build/src/v1alpha/conversational_search_service_proto_list.json +1 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +144 -144
- package/build/src/v1alpha/data_store_service_client.js +196 -196
- package/build/src/v1alpha/data_store_service_proto_list.json +1 -0
- package/build/src/v1alpha/document_service_client.d.ts +144 -144
- package/build/src/v1alpha/document_service_client.js +196 -196
- package/build/src/v1alpha/document_service_proto_list.json +1 -0
- package/build/src/v1alpha/engine_service_client.d.ts +144 -144
- package/build/src/v1alpha/engine_service_client.js +196 -196
- package/build/src/v1alpha/engine_service_proto_list.json +1 -0
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +144 -144
- package/build/src/v1alpha/estimate_billing_service_client.js +196 -196
- package/build/src/v1alpha/estimate_billing_service_proto_list.json +1 -0
- package/build/src/v1alpha/evaluation_service_client.d.ts +144 -144
- package/build/src/v1alpha/evaluation_service_client.js +196 -196
- package/build/src/v1alpha/evaluation_service_proto_list.json +1 -0
- package/build/src/v1alpha/gapic_metadata.json +82 -0
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +144 -144
- package/build/src/v1alpha/grounded_generation_service_client.js +196 -196
- package/build/src/v1alpha/grounded_generation_service_proto_list.json +1 -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 +144 -144
- package/build/src/v1alpha/project_service_client.js +196 -196
- package/build/src/v1alpha/project_service_proto_list.json +1 -0
- package/build/src/v1alpha/rank_service_client.d.ts +144 -144
- package/build/src/v1alpha/rank_service_client.js +196 -196
- package/build/src/v1alpha/rank_service_proto_list.json +1 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +144 -144
- package/build/src/v1alpha/recommendation_service_client.js +196 -196
- package/build/src/v1alpha/recommendation_service_proto_list.json +1 -0
- package/build/src/v1alpha/sample_query_service_client.d.ts +144 -144
- package/build/src/v1alpha/sample_query_service_client.js +196 -196
- package/build/src/v1alpha/sample_query_service_proto_list.json +1 -0
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +144 -144
- package/build/src/v1alpha/sample_query_set_service_client.js +196 -196
- package/build/src/v1alpha/sample_query_set_service_proto_list.json +1 -0
- package/build/src/v1alpha/schema_service_client.d.ts +144 -144
- package/build/src/v1alpha/schema_service_client.js +196 -196
- package/build/src/v1alpha/schema_service_proto_list.json +1 -0
- package/build/src/v1alpha/search_service_client.d.ts +378 -198
- package/build/src/v1alpha/search_service_client.js +352 -232
- package/build/src/v1alpha/search_service_proto_list.json +1 -0
- package/build/src/v1alpha/search_tuning_service_client.d.ts +144 -144
- package/build/src/v1alpha/search_tuning_service_client.js +196 -196
- package/build/src/v1alpha/search_tuning_service_proto_list.json +1 -0
- package/build/src/v1alpha/serving_config_service_client.d.ts +144 -144
- package/build/src/v1alpha/serving_config_service_client.js +196 -196
- package/build/src/v1alpha/serving_config_service_proto_list.json +1 -0
- package/build/src/v1alpha/session_service_client.d.ts +2331 -0
- package/build/src/v1alpha/session_service_client.js +3161 -0
- package/build/src/v1alpha/session_service_client_config.json +68 -0
- package/build/src/v1alpha/session_service_proto_list.json +49 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +144 -144
- package/build/src/v1alpha/site_search_engine_service_client.js +196 -196
- package/build/src/v1alpha/site_search_engine_service_proto_list.json +1 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +144 -144
- package/build/src/v1alpha/user_event_service_client.js +196 -196
- package/build/src/v1alpha/user_event_service_proto_list.json +1 -0
- package/build/src/v1beta/completion_service_client.d.ts +144 -144
- package/build/src/v1beta/completion_service_client.js +196 -196
- package/build/src/v1beta/completion_service_proto_list.json +1 -0
- package/build/src/v1beta/control_service_client.d.ts +144 -144
- package/build/src/v1beta/control_service_client.js +196 -196
- package/build/src/v1beta/control_service_proto_list.json +1 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +215 -161
- package/build/src/v1beta/conversational_search_service_client.js +242 -208
- package/build/src/v1beta/conversational_search_service_proto_list.json +1 -0
- package/build/src/v1beta/data_store_service_client.d.ts +144 -144
- package/build/src/v1beta/data_store_service_client.js +196 -196
- package/build/src/v1beta/data_store_service_proto_list.json +1 -0
- package/build/src/v1beta/document_service_client.d.ts +144 -144
- package/build/src/v1beta/document_service_client.js +196 -196
- package/build/src/v1beta/document_service_proto_list.json +1 -0
- package/build/src/v1beta/engine_service_client.d.ts +144 -144
- package/build/src/v1beta/engine_service_client.js +196 -196
- package/build/src/v1beta/engine_service_proto_list.json +1 -0
- package/build/src/v1beta/evaluation_service_client.d.ts +144 -144
- package/build/src/v1beta/evaluation_service_client.js +196 -196
- package/build/src/v1beta/evaluation_service_proto_list.json +1 -0
- package/build/src/v1beta/gapic_metadata.json +68 -0
- package/build/src/v1beta/grounded_generation_service_client.d.ts +144 -144
- package/build/src/v1beta/grounded_generation_service_client.js +196 -196
- package/build/src/v1beta/grounded_generation_service_proto_list.json +1 -0
- package/build/src/v1beta/index.d.ts +1 -0
- package/build/src/v1beta/index.js +3 -1
- package/build/src/v1beta/project_service_client.d.ts +144 -144
- package/build/src/v1beta/project_service_client.js +196 -196
- package/build/src/v1beta/project_service_proto_list.json +1 -0
- package/build/src/v1beta/rank_service_client.d.ts +144 -144
- package/build/src/v1beta/rank_service_client.js +196 -196
- package/build/src/v1beta/rank_service_proto_list.json +1 -0
- package/build/src/v1beta/recommendation_service_client.d.ts +144 -144
- package/build/src/v1beta/recommendation_service_client.js +196 -196
- package/build/src/v1beta/recommendation_service_proto_list.json +1 -0
- package/build/src/v1beta/sample_query_service_client.d.ts +144 -144
- package/build/src/v1beta/sample_query_service_client.js +196 -196
- package/build/src/v1beta/sample_query_service_proto_list.json +1 -0
- package/build/src/v1beta/sample_query_set_service_client.d.ts +144 -144
- package/build/src/v1beta/sample_query_set_service_client.js +196 -196
- package/build/src/v1beta/sample_query_set_service_proto_list.json +1 -0
- package/build/src/v1beta/schema_service_client.d.ts +144 -144
- package/build/src/v1beta/schema_service_client.js +196 -196
- package/build/src/v1beta/schema_service_proto_list.json +1 -0
- package/build/src/v1beta/search_service_client.d.ts +612 -252
- package/build/src/v1beta/search_service_client.js +508 -268
- package/build/src/v1beta/search_service_proto_list.json +1 -0
- package/build/src/v1beta/search_tuning_service_client.d.ts +144 -144
- package/build/src/v1beta/search_tuning_service_client.js +196 -196
- package/build/src/v1beta/search_tuning_service_proto_list.json +1 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +144 -144
- package/build/src/v1beta/serving_config_service_client.js +196 -196
- package/build/src/v1beta/serving_config_service_proto_list.json +1 -0
- package/build/src/v1beta/session_service_client.d.ts +2266 -0
- package/build/src/v1beta/session_service_client.js +3136 -0
- package/build/src/v1beta/session_service_client_config.json +63 -0
- package/build/src/v1beta/session_service_proto_list.json +45 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +144 -144
- package/build/src/v1beta/site_search_engine_service_client.js +196 -196
- package/build/src/v1beta/site_search_engine_service_proto_list.json +1 -0
- package/build/src/v1beta/user_event_service_client.d.ts +144 -144
- package/build/src/v1beta/user_event_service_client.js +196 -196
- package/build/src/v1beta/user_event_service_proto_list.json +1 -0
- package/package.json +1 -1
@@ -966,8 +966,14 @@ message SearchRequest {
|
|
966
966
|
// The ranking expression controls the customized ranking on retrieval
|
967
967
|
// documents. This overrides
|
968
968
|
// [ServingConfig.ranking_expression][google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression].
|
969
|
-
// The
|
970
|
-
//
|
969
|
+
// The syntax and supported features depend on the
|
970
|
+
// `ranking_expression_backend` value. If `ranking_expression_backend` is not
|
971
|
+
// provided, it defaults to `RANK_BY_EMBEDDING`.
|
972
|
+
//
|
973
|
+
// If
|
974
|
+
// [ranking_expression_backend][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression_backend]
|
975
|
+
// is not provided or set to `RANK_BY_EMBEDDING`, it should be a single
|
976
|
+
// function or multiple functions that are joined by "+".
|
971
977
|
//
|
972
978
|
// * ranking_expression = function, { " + ", function };
|
973
979
|
//
|
@@ -982,15 +988,90 @@ message SearchRequest {
|
|
982
988
|
// between query and document.
|
983
989
|
// * `embedding_field_path`: the document embedding field
|
984
990
|
// used with query embedding vector.
|
985
|
-
// * `dotProduct`: embedding function between embedding_field_path and
|
986
|
-
// embedding vector.
|
991
|
+
// * `dotProduct`: embedding function between `embedding_field_path` and
|
992
|
+
// query embedding vector.
|
987
993
|
//
|
988
994
|
// Example ranking expression:
|
989
995
|
//
|
990
996
|
// If document has an embedding field doc_embedding, the ranking expression
|
991
997
|
// could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
998
|
+
//
|
999
|
+
// If
|
1000
|
+
// [ranking_expression_backend][google.cloud.discoveryengine.v1alpha.SearchRequest.ranking_expression_backend]
|
1001
|
+
// is set to `RANK_BY_FORMULA`, the following expression types (and
|
1002
|
+
// combinations of those chained using + or
|
1003
|
+
// * operators) are supported:
|
1004
|
+
//
|
1005
|
+
// * `double`
|
1006
|
+
// * `signal`
|
1007
|
+
// * `log(signal)`
|
1008
|
+
// * `exp(signal)`
|
1009
|
+
// * `rr(signal, double > 0)` -- reciprocal rank transformation with second
|
1010
|
+
// argument being a denominator constant.
|
1011
|
+
// * `is_nan(signal)` -- returns 0 if signal is NaN, 1 otherwise.
|
1012
|
+
// * `fill_nan(signal1, signal2 | double)` -- if signal1 is NaN, returns
|
1013
|
+
// signal2 | double, else returns signal1.
|
1014
|
+
//
|
1015
|
+
// Here are a few examples of ranking formulas that use the supported
|
1016
|
+
// ranking expression types:
|
1017
|
+
//
|
1018
|
+
// - `0.2 * semantic_similarity_score + 0.8 * log(keyword_similarity_score)`
|
1019
|
+
// -- mostly rank by the logarithm of `keyword_similarity_score` with slight
|
1020
|
+
// `semantic_smilarity_score` adjustment.
|
1021
|
+
// - `0.2 * exp(fill_nan(semantic_similarity_score, 0)) + 0.3 *
|
1022
|
+
// is_nan(keyword_similarity_score)` -- rank by the exponent of
|
1023
|
+
// `semantic_similarity_score` filling the value with 0 if it's NaN, also
|
1024
|
+
// add constant 0.3 adjustment to the final score if
|
1025
|
+
// `semantic_similarity_score` is NaN.
|
1026
|
+
// - `0.2 * rr(semantic_similarity_score, 16) + 0.8 *
|
1027
|
+
// rr(keyword_similarity_score, 16)` -- mostly rank by the reciprocal rank
|
1028
|
+
// of `keyword_similarity_score` with slight adjustment of reciprocal rank
|
1029
|
+
// of `semantic_smilarity_score`.
|
1030
|
+
//
|
1031
|
+
// The following signals are supported:
|
1032
|
+
//
|
1033
|
+
// * `semantic_similarity_score`: semantic similarity adjustment that is
|
1034
|
+
// calculated using the embeddings generated by a proprietary Google model.
|
1035
|
+
// This score determines how semantically similar a search query is to a
|
1036
|
+
// document.
|
1037
|
+
// * `keyword_similarity_score`: keyword match adjustment uses the Best
|
1038
|
+
// Match 25 (BM25) ranking function. This score is calculated using a
|
1039
|
+
// probabilistic model to estimate the probability that a document is
|
1040
|
+
// relevant to a given query.
|
1041
|
+
// * `relevance_score`: semantic relevance adjustment that uses a
|
1042
|
+
// proprietary Google model to determine the meaning and intent behind a
|
1043
|
+
// user's query in context with the content in the documents.
|
1044
|
+
// * `pctr_rank`: predicted conversion rate adjustment as a rank use
|
1045
|
+
// predicted Click-through rate (pCTR) to gauge the relevance and
|
1046
|
+
// attractiveness of a search result from a user's perspective. A higher
|
1047
|
+
// pCTR suggests that the result is more likely to satisfy the user's query
|
1048
|
+
// and intent, making it a valuable signal for ranking.
|
1049
|
+
// * `freshness_rank`: freshness adjustment as a rank
|
1050
|
+
// * `document_age`: The time in hours elapsed since the document was last
|
1051
|
+
// updated, a floating-point number (e.g., 0.25 means 15 minutes).
|
1052
|
+
// * `topicality_rank`: topicality adjustment as a rank. Uses proprietary
|
1053
|
+
// Google model to determine the keyword-based overlap between the query and
|
1054
|
+
// the document.
|
1055
|
+
// * `base_rank`: the default rank of the result
|
992
1056
|
string ranking_expression = 26;
|
993
1057
|
|
1058
|
+
// The backend to use for the ranking expression evaluation.
|
1059
|
+
enum RankingExpressionBackend {
|
1060
|
+
reserved 1, 2;
|
1061
|
+
|
1062
|
+
// Default option for unspecified/unknown values.
|
1063
|
+
RANKING_EXPRESSION_BACKEND_UNSPECIFIED = 0;
|
1064
|
+
// Ranking by custom embedding model, the default way to evaluate the
|
1065
|
+
// ranking expression.
|
1066
|
+
RANK_BY_EMBEDDING = 3;
|
1067
|
+
// Ranking by custom formula.
|
1068
|
+
RANK_BY_FORMULA = 4;
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
// The backend to use for the ranking expression evaluation.
|
1072
|
+
RankingExpressionBackend ranking_expression_backend = 53
|
1073
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1074
|
+
|
994
1075
|
// Whether to turn on safe search. This is only supported for
|
995
1076
|
// website search.
|
996
1077
|
bool safe_search = 20;
|
@@ -1035,22 +1116,16 @@ message SearchRequest {
|
|
1035
1116
|
// between /search API calls and /answer API calls.
|
1036
1117
|
//
|
1037
1118
|
// Example #1 (multi-turn /search API calls):
|
1038
|
-
//
|
1039
|
-
//
|
1040
|
-
//
|
1041
|
-
//
|
1042
|
-
//
|
1043
|
-
// be interpreted as "How did Alphabet do in 2023?".
|
1119
|
+
// Call /search API with the session ID generated in the first call.
|
1120
|
+
// Here, the previous search query gets considered in query
|
1121
|
+
// standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
1122
|
+
// and the current query is "How about 2023?", the current query will
|
1123
|
+
// be interpreted as "How did Alphabet do in 2023?".
|
1044
1124
|
//
|
1045
1125
|
// Example #2 (coordination between /search API calls and /answer API calls):
|
1046
|
-
//
|
1047
|
-
//
|
1048
|
-
//
|
1049
|
-
// results from the first search call.
|
1050
|
-
//
|
1051
|
-
// Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
1052
|
-
// gets automatically created. Otherwise, users can use the create-session API
|
1053
|
-
// to create a session manually.
|
1126
|
+
// Call /answer API with the session ID generated in the first call.
|
1127
|
+
// Here, the answer generation happens in the context of the search
|
1128
|
+
// results from the first search call.
|
1054
1129
|
//
|
1055
1130
|
// Multi-turn Search feature is currently at private GA stage. Please use
|
1056
1131
|
// v1alpha or v1beta version instead before we launch this feature to public
|
@@ -1094,6 +1169,49 @@ message SearchResponse {
|
|
1094
1169
|
|
1095
1170
|
// Google provided available scores.
|
1096
1171
|
map<string, DoubleList> model_scores = 4;
|
1172
|
+
|
1173
|
+
// A set of ranking signals.
|
1174
|
+
message RankSignals {
|
1175
|
+
reserved 5;
|
1176
|
+
|
1177
|
+
// Keyword matching adjustment.
|
1178
|
+
optional float keyword_similarity_score = 1
|
1179
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1180
|
+
// Semantic relevance adjustment.
|
1181
|
+
optional float relevance_score = 2
|
1182
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1183
|
+
// Semantic similarity adjustment.
|
1184
|
+
optional float semantic_similarity_score = 3
|
1185
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1186
|
+
// Predicted conversion rate adjustment as a rank.
|
1187
|
+
optional float pctr_rank = 4 [(google.api.field_behavior) = OPTIONAL];
|
1188
|
+
// Topicality adjustment as a rank.
|
1189
|
+
optional float topicality_rank = 6
|
1190
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1191
|
+
// Age of the document in hours.
|
1192
|
+
optional float document_age = 7 [(google.api.field_behavior) = OPTIONAL];
|
1193
|
+
// Combined custom boosts for a doc.
|
1194
|
+
optional float boosting_factor = 8
|
1195
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1196
|
+
|
1197
|
+
// The default rank of the result.
|
1198
|
+
float default_rank = 32 [(google.api.field_behavior) = OPTIONAL];
|
1199
|
+
|
1200
|
+
// Custom clearbox signal represented by name and value pair.
|
1201
|
+
message CustomSignal {
|
1202
|
+
// Name of the signal.
|
1203
|
+
string name = 1 [(google.api.field_behavior) = OPTIONAL];
|
1204
|
+
// Float value representing the ranking signal (e.g. 1.25 for BM25).
|
1205
|
+
float value = 2 [(google.api.field_behavior) = OPTIONAL];
|
1206
|
+
}
|
1207
|
+
|
1208
|
+
// A list of custom clearbox signals.
|
1209
|
+
repeated CustomSignal custom_signals = 33
|
1210
|
+
[(google.api.field_behavior) = OPTIONAL];
|
1211
|
+
}
|
1212
|
+
|
1213
|
+
// A set of ranking signals associated with the result.
|
1214
|
+
RankSignals rank_signals = 7 [(google.api.field_behavior) = OPTIONAL];
|
1097
1215
|
}
|
1098
1216
|
|
1099
1217
|
// A facet result.
|
@@ -18,6 +18,9 @@ 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/cloud/discoveryengine/v1alpha/answer.proto";
|
22
|
+
import "google/cloud/discoveryengine/v1alpha/common.proto";
|
23
|
+
import "google/protobuf/duration.proto";
|
21
24
|
import "google/protobuf/timestamp.proto";
|
22
25
|
|
23
26
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
@@ -29,6 +32,27 @@ option objc_class_prefix = "DISCOVERYENGINE";
|
|
29
32
|
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
30
33
|
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
31
34
|
|
35
|
+
// Original source of the file.
|
36
|
+
enum FileSource {
|
37
|
+
// Default value. Unknown source.
|
38
|
+
FILE_SOURCE_UNSPECIFIED = 0;
|
39
|
+
|
40
|
+
// The data of the file was provided inline (e.g. pasted from the clipboard).
|
41
|
+
FILE_SOURCE_INLINE = 1;
|
42
|
+
|
43
|
+
// The file was uploaded from a local file.
|
44
|
+
FILE_SOURCE_LOCAL = 2;
|
45
|
+
|
46
|
+
// The file was uploaded from Cloud Storage.
|
47
|
+
FILE_SOURCE_CLOUD_STORAGE = 3;
|
48
|
+
|
49
|
+
// The file was uploaded from Drive.
|
50
|
+
FILE_SOURCE_CLOUD_DRIVE = 4;
|
51
|
+
|
52
|
+
// The file was retrieved from a URL (e.g. public web).
|
53
|
+
FILE_SOURCE_URL = 5;
|
54
|
+
}
|
55
|
+
|
32
56
|
// External session proto definition.
|
33
57
|
message Session {
|
34
58
|
option (google.api.resource) = {
|
@@ -36,21 +60,42 @@ message Session {
|
|
36
60
|
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}"
|
37
61
|
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}"
|
38
62
|
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}"
|
63
|
+
plural: "sessions"
|
64
|
+
singular: "session"
|
39
65
|
};
|
40
66
|
|
41
67
|
// Represents a turn, including a query from the user and a
|
42
68
|
// answer from service.
|
43
69
|
message Turn {
|
44
|
-
// The user query.
|
45
|
-
|
70
|
+
// Optional. The user query. May not be set if this turn is merely
|
71
|
+
// regenerating an answer to a different turn
|
72
|
+
Query query = 1 [(google.api.field_behavior) = OPTIONAL];
|
46
73
|
|
47
|
-
// The resource name of the answer to the user query.
|
74
|
+
// Optional. The resource name of the answer to the user query.
|
48
75
|
//
|
49
76
|
// Only set if the answer generation (/answer API call) happened in this
|
50
77
|
// turn.
|
51
|
-
string answer = 2 [
|
52
|
-
|
53
|
-
|
78
|
+
string answer = 2 [
|
79
|
+
(google.api.field_behavior) = OPTIONAL,
|
80
|
+
(google.api.resource_reference) = {
|
81
|
+
type: "discoveryengine.googleapis.com/Answer"
|
82
|
+
}
|
83
|
+
];
|
84
|
+
|
85
|
+
// Output only. In
|
86
|
+
// [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1alpha.ConversationalSearchService.GetSession]
|
87
|
+
// API, if
|
88
|
+
// [GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1alpha.GetSessionRequest.include_answer_details]
|
89
|
+
// is set to true, this field will be populated when getting answer query
|
90
|
+
// session.
|
91
|
+
Answer detailed_answer = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
92
|
+
|
93
|
+
// Optional. Represents metadata related to the query config, for example
|
94
|
+
// LLM model and version used, model parameters (temperature, grounding
|
95
|
+
// parameters, etc.). The prefix "google." is reserved for Google-developed
|
96
|
+
// functionality.
|
97
|
+
map<string, string> query_config = 16
|
98
|
+
[(google.api.field_behavior) = OPTIONAL];
|
54
99
|
}
|
55
100
|
|
56
101
|
// Enumeration of the state of the session.
|
@@ -66,6 +111,12 @@ message Session {
|
|
66
111
|
// `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`
|
67
112
|
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
68
113
|
|
114
|
+
// Optional. The display name of the session.
|
115
|
+
//
|
116
|
+
// This field is used to identify the session in the UI.
|
117
|
+
// By default, the display name is the first turn query text in the session.
|
118
|
+
string display_name = 7 [(google.api.field_behavior) = OPTIONAL];
|
119
|
+
|
69
120
|
// The state of the session.
|
70
121
|
State state = 2;
|
71
122
|
|
@@ -82,6 +133,10 @@ message Session {
|
|
82
133
|
// Output only. The time the session finished.
|
83
134
|
google.protobuf.Timestamp end_time = 6
|
84
135
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
136
|
+
|
137
|
+
// Optional. Whether the session is pinned, pinned session will be displayed
|
138
|
+
// on the top of the session list.
|
139
|
+
bool is_pinned = 8 [(google.api.field_behavior) = OPTIONAL];
|
85
140
|
}
|
86
141
|
|
87
142
|
// Defines a user inputed query.
|
@@ -92,6 +147,181 @@ message Query {
|
|
92
147
|
string text = 2;
|
93
148
|
}
|
94
149
|
|
95
|
-
// Unique Id for the query.
|
96
|
-
string query_id = 1;
|
150
|
+
// Output only. Unique Id for the query.
|
151
|
+
string query_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
152
|
+
}
|
153
|
+
|
154
|
+
// Standard characteristics of an image media view.
|
155
|
+
message ImageCharacteristics {
|
156
|
+
// Possible color spaces of an image (e.g., "RGB", "CMYK", "Grayscale").
|
157
|
+
enum ColorSpace {
|
158
|
+
// Default value. Unknown color space.
|
159
|
+
COLOR_SPACE_UNSPECIFIED = 0;
|
160
|
+
|
161
|
+
// Red, green, blue colorspace.
|
162
|
+
RGB = 1;
|
163
|
+
|
164
|
+
// Cyan, magenta, yellow, and black colorspace.
|
165
|
+
CMYK = 2;
|
166
|
+
|
167
|
+
// Grayscale colorspace.
|
168
|
+
GRAYSCALE = 3;
|
169
|
+
|
170
|
+
// YUV colorspace.
|
171
|
+
YUV = 4;
|
172
|
+
|
173
|
+
// Other colorspace.
|
174
|
+
OTHER_COLOR_SPACE = 5;
|
175
|
+
}
|
176
|
+
|
177
|
+
// Output only. Image width in pixels.
|
178
|
+
int32 width = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
179
|
+
|
180
|
+
// Output only. Image height in pixels.
|
181
|
+
int32 height = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
182
|
+
|
183
|
+
// Output only. Color space of the image (e.g., "RGB", "CMYK", "Grayscale").
|
184
|
+
ColorSpace color_space = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
185
|
+
|
186
|
+
// Output only. Bit depth of the image (e.g., 8-bit, 16-bit).
|
187
|
+
int32 bit_depth = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
188
|
+
}
|
189
|
+
|
190
|
+
// Standard characteristics of a video media view.
|
191
|
+
message VideoCharacteristics {
|
192
|
+
// Output only. Video width in pixels.
|
193
|
+
int32 width = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
194
|
+
|
195
|
+
// Output only. Video height in pixels.
|
196
|
+
int32 height = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
197
|
+
|
198
|
+
// Output only. Video duration.
|
199
|
+
google.protobuf.Duration duration = 3
|
200
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
201
|
+
|
202
|
+
// Output only. Frame rate (frames per second).
|
203
|
+
double frame_rate = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
204
|
+
|
205
|
+
// Output only. Audio codecs used in the video.
|
206
|
+
repeated string audio_codecs = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
207
|
+
|
208
|
+
// Output only. Video codecs used in the video.
|
209
|
+
repeated string video_codecs = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
210
|
+
|
211
|
+
// Output only. Bitrate of the video in kbps.
|
212
|
+
int32 video_bitrate_kbps = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
213
|
+
|
214
|
+
// Output only. Bitrate of the audio in kbps.
|
215
|
+
int32 audio_bitrate_kbps = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
|
216
|
+
}
|
217
|
+
|
218
|
+
// Caracteristics of other file types.
|
219
|
+
message FileCharacteristics {
|
220
|
+
// Output only. Generic map of characteristics.
|
221
|
+
map<string, string> characteristics = 6
|
222
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
223
|
+
}
|
224
|
+
|
225
|
+
// Represents a specific alternate version or "view" of a file object,
|
226
|
+
// such as a summary, a thumbnail, a translated version, etc.
|
227
|
+
message FileView {
|
228
|
+
// Characteristics of the media view, allowing for flexible extensions.
|
229
|
+
// Metadata is always internally generated by the process creating
|
230
|
+
// the view.
|
231
|
+
oneof characteristics {
|
232
|
+
// Output only. Characteristics of an image media view.
|
233
|
+
ImageCharacteristics image_characteristics = 6
|
234
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
235
|
+
|
236
|
+
// Output only. Characteristics of a video media view.
|
237
|
+
VideoCharacteristics video_characteristics = 7
|
238
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
239
|
+
|
240
|
+
// Output only. Characteristics of other file types.
|
241
|
+
FileCharacteristics file_characteristics = 8
|
242
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
243
|
+
}
|
244
|
+
|
245
|
+
// Output only. Globally Unique id for this specific view.
|
246
|
+
string view_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
247
|
+
|
248
|
+
// Output only. The URI to access this media view.
|
249
|
+
string uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
250
|
+
|
251
|
+
// Output only. MIME type (e.g., "image/jpeg", "image/png", "text/plain",
|
252
|
+
// "video/mp4")
|
253
|
+
string mime_type = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
|
254
|
+
|
255
|
+
// Output only. The size of the view in bytes.
|
256
|
+
int64 byte_size = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
257
|
+
|
258
|
+
// Output only. The time the view was created.
|
259
|
+
google.protobuf.Timestamp create_time = 5
|
260
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
261
|
+
}
|
262
|
+
|
263
|
+
// Represents a file attached to a session (context file)
|
264
|
+
message FileMetadata {
|
265
|
+
// Output only. The ID of the file.
|
266
|
+
string file_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
267
|
+
|
268
|
+
// Output only. The name of the file uploaded.
|
269
|
+
string name = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
270
|
+
|
271
|
+
// The content type of the file, see
|
272
|
+
// https://www.iana.org/assignments/media-types/media-types.xhtml.
|
273
|
+
string mime_type = 3;
|
274
|
+
|
275
|
+
// Output only. The size of the context file in bytes.
|
276
|
+
int64 byte_size = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
277
|
+
|
278
|
+
// Optional. The original location of the file. It may be a local file path,
|
279
|
+
// or any other URI that allows accessing the file in an external system.
|
280
|
+
// There are two scenarios in which this url may be empty:
|
281
|
+
// 1. If the file was sent as inline data (e.g. pasted from the clipboard).
|
282
|
+
// 2. If the original location is not available.
|
283
|
+
//
|
284
|
+
// Note that there's no guarantee that the URI will be pointing to a valid
|
285
|
+
// or actually existing file. For example, a file might have been uploaded
|
286
|
+
// to the session, and then deleted from the original source.
|
287
|
+
string original_uri = 9 [(google.api.field_behavior) = OPTIONAL];
|
288
|
+
|
289
|
+
// Optional. The type of the original source of the file.
|
290
|
+
FileSource original_source_type = 10 [(google.api.field_behavior) = OPTIONAL];
|
291
|
+
|
292
|
+
// Output only. The time the file was uploaded (If this is a file
|
293
|
+
// generated by an internal process and then made available to the session,
|
294
|
+
// this indicates the moment it happened).
|
295
|
+
google.protobuf.Timestamp upload_time = 12
|
296
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
297
|
+
|
298
|
+
// Output only. The time the file was added to the session. Note that if a
|
299
|
+
// file was added, then modified externally, then added again, the add time
|
300
|
+
// will be updated.
|
301
|
+
google.protobuf.Timestamp last_add_time = 13
|
302
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
303
|
+
|
304
|
+
// Optional. Represents metadata related to the file that can suit particular
|
305
|
+
// use cases. The prefix "google." is reserved for the key for use by
|
306
|
+
// Google, but other prefixes can be freely used.
|
307
|
+
map<string, string> metadata = 18 [(google.api.field_behavior) = OPTIONAL];
|
308
|
+
|
309
|
+
// Output only. The
|
310
|
+
// [AssistantService.DownloadSessionFile][google.cloud.discoveryengine.v1alpha.AssistantService.DownloadSessionFile]
|
311
|
+
// URL to download the file. This URL will need the same credentials as
|
312
|
+
// [AssistantService.ListSessionFileMetadata][google.cloud.discoveryengine.v1alpha.AssistantService.ListSessionFileMetadata]
|
313
|
+
// method and will provide the resource.
|
314
|
+
string download_uri = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
|
315
|
+
|
316
|
+
// Optional. The origin of the file.
|
317
|
+
FileOriginType file_origin_type = 21 [(google.api.field_behavior) = OPTIONAL];
|
318
|
+
|
319
|
+
// Output only. Alternate views of this file object. Each file view is
|
320
|
+
// attached to a specific role. Possible example keys:
|
321
|
+
// - "thumbnail"
|
322
|
+
// - "mobile_thumbnail"
|
323
|
+
// - "clip"
|
324
|
+
// - "summary"
|
325
|
+
// - "translation"
|
326
|
+
map<string, FileView> views = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
|
97
327
|
}
|