google-cloud-discovery_engine-v1 1.0.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +14 -0
  3. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +6 -6
  4. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +6 -6
  5. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +15 -12
  6. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +15 -12
  7. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +10 -1
  8. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +10 -1
  9. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +14 -0
  10. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +109 -1
  11. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +25 -0
  12. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +102 -1
  13. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +14 -0
  14. data/lib/google/cloud/discovery_engine/v1/document_service/rest/service_stub.rb +66 -0
  15. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +14 -0
  16. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +219 -3
  17. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +85 -0
  18. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +126 -3
  19. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +60 -0
  20. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +14 -0
  21. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +1 -1
  22. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +1 -1
  23. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +2 -1
  24. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +2 -1
  25. data/lib/google/cloud/discovery_engine/v1/rest.rb +1 -0
  26. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +14 -0
  27. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +11 -4
  28. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +11 -4
  29. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/client.rb +571 -0
  30. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/credentials.rb +47 -0
  31. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/operations.rb +809 -0
  32. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/paths.rb +78 -0
  33. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/client.rb +531 -0
  34. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +1128 -0
  35. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/service_stub.rb +188 -0
  36. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest.rb +53 -0
  37. data/lib/google/cloud/discovery_engine/v1/search_tuning_service.rb +56 -0
  38. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +5 -1
  39. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +5 -1
  40. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +14 -0
  41. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +139 -0
  42. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +132 -0
  43. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +14 -0
  44. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +68 -0
  45. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  46. data/lib/google/cloud/discovery_engine/v1.rb +1 -0
  47. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +2 -1
  48. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +1 -1
  49. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +2 -1
  50. data/lib/google/cloud/discoveryengine/v1/custom_tuning_model_pb.rb +48 -0
  51. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +4 -1
  52. data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +1 -1
  53. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +4 -1
  54. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +11 -1
  55. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +4 -0
  56. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  57. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +23 -1
  58. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +4 -0
  59. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
  60. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +8 -1
  61. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +5 -1
  62. data/lib/google/cloud/discoveryengine/v1/search_tuning_service_pb.rb +61 -0
  63. data/lib/google/cloud/discoveryengine/v1/search_tuning_service_services_pb.rb +47 -0
  64. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +1 -1
  65. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  66. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +2 -1
  67. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +5 -0
  68. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +62 -7
  69. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +6 -4
  70. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +6 -6
  71. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +68 -24
  72. data/proto_docs/google/cloud/discoveryengine/v1/custom_tuning_model.rb +99 -0
  73. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +88 -0
  74. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +10 -0
  75. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +22 -0
  76. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +9 -5
  77. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +120 -0
  78. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +5 -1
  79. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +385 -1
  80. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +13 -7
  81. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +1 -1
  82. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +115 -0
  83. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +1 -1
  84. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +2 -1
  85. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +156 -16
  86. data/proto_docs/google/cloud/discoveryengine/v1/search_tuning_service.rb +172 -0
  87. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +5 -0
  88. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +5 -1
  89. metadata +17 -3
@@ -76,6 +76,11 @@ module Google
76
76
  # unset.
77
77
  #
78
78
  # If this field is negative, an `INVALID_ARGUMENT` is returned.
79
+ # @!attribute [rw] one_box_page_size
80
+ # @return [::Integer]
81
+ # The maximum number of results to return for OneBox.
82
+ # This applies to each OneBox type individually.
83
+ # Default number is 10.
79
84
  # @!attribute [rw] data_store_specs
80
85
  # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
81
86
  # Specs defining dataStores to filter on in a search call and configurations
@@ -120,9 +125,12 @@ module Google
120
125
  # Leave it unset if ordered by relevance. `order_by` expression is
121
126
  # case-sensitive.
122
127
  #
123
- # For more information on ordering for retail search, see
124
- # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
125
- #
128
+ # For more information on ordering the website search results, see
129
+ # [Order web search
130
+ # results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
131
+ # For more information on ordering the healthcare search results, see
132
+ # [Order healthcare search
133
+ # results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
126
134
  # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
127
135
  # @!attribute [rw] user_info
128
136
  # @return [::Google::Cloud::DiscoveryEngine::V1::UserInfo]
@@ -275,6 +283,11 @@ module Google
275
283
  # Required. Full resource name of
276
284
  # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, such as
277
285
  # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
286
+ # @!attribute [rw] filter
287
+ # @return [::String]
288
+ # Optional. Filter specification to filter documents in the data store
289
+ # specified by data_store field. For more information on filtering, see
290
+ # [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
278
291
  class DataStoreSpec
279
292
  include ::Google::Protobuf::MessageExts
280
293
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -465,9 +478,93 @@ module Google
465
478
  # ignored. Only one of the (condition, boost) combination or the
466
479
  # boost_control_spec below are set. If both are set then the global boost
467
480
  # is ignored and the more fine-grained boost_control_spec is applied.
481
+ # @!attribute [rw] boost_control_spec
482
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec]
483
+ # Complex specification for custom ranking based on customer defined
484
+ # attribute value.
468
485
  class ConditionBoostSpec
469
486
  include ::Google::Protobuf::MessageExts
470
487
  extend ::Google::Protobuf::MessageExts::ClassMethods
488
+
489
+ # Specification for custom ranking based on customer specified attribute
490
+ # value. It provides more controls for customized ranking than the simple
491
+ # (condition, boost) combination above.
492
+ # @!attribute [rw] field_name
493
+ # @return [::String]
494
+ # The name of the field whose value will be used to determine the
495
+ # boost amount.
496
+ # @!attribute [rw] attribute_type
497
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType]
498
+ # The attribute type to be used to determine the boost amount. The
499
+ # attribute value can be derived from the field value of the specified
500
+ # field_name. In the case of numerical it is straightforward i.e.
501
+ # attribute_value = numerical_field_value. In the case of freshness
502
+ # however, attribute_value = (time.now() - datetime_field_value).
503
+ # @!attribute [rw] interpolation_type
504
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType]
505
+ # The interpolation type to be applied to connect the control points
506
+ # listed below.
507
+ # @!attribute [rw] control_points
508
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>]
509
+ # The control points used to define the curve. The monotonic function
510
+ # (defined through the interpolation_type above) passes through the
511
+ # control points listed here.
512
+ class BoostControlSpec
513
+ include ::Google::Protobuf::MessageExts
514
+ extend ::Google::Protobuf::MessageExts::ClassMethods
515
+
516
+ # The control points used to define the curve. The curve defined
517
+ # through these control points can only be monotonically increasing
518
+ # or decreasing(constant values are acceptable).
519
+ # @!attribute [rw] attribute_value
520
+ # @return [::String]
521
+ # Can be one of:
522
+ # 1. The numerical field value.
523
+ # 2. The duration spec for freshness:
524
+ # The value must be formatted as an XSD `dayTimeDuration` value (a
525
+ # restricted subset of an ISO 8601 duration value). The pattern for
526
+ # this is: `[nD][T[nH][nM][nS]]`.
527
+ # @!attribute [rw] boost_amount
528
+ # @return [::Float]
529
+ # The value between -1 to 1 by which to boost the score if the
530
+ # attribute_value evaluates to the value specified above.
531
+ class ControlPoint
532
+ include ::Google::Protobuf::MessageExts
533
+ extend ::Google::Protobuf::MessageExts::ClassMethods
534
+ end
535
+
536
+ # The attribute(or function) for which the custom ranking is to be
537
+ # applied.
538
+ module AttributeType
539
+ # Unspecified AttributeType.
540
+ ATTRIBUTE_TYPE_UNSPECIFIED = 0
541
+
542
+ # The value of the numerical field will be used to dynamically update
543
+ # the boost amount. In this case, the attribute_value (the x value)
544
+ # of the control point will be the actual value of the numerical
545
+ # field for which the boost_amount is specified.
546
+ NUMERICAL = 1
547
+
548
+ # For the freshness use case the attribute value will be the duration
549
+ # between the current time and the date in the datetime field
550
+ # specified. The value must be formatted as an XSD `dayTimeDuration`
551
+ # value (a restricted subset of an ISO 8601 duration value). The
552
+ # pattern for this is: `[nD][T[nH][nM][nS]]`.
553
+ # For example, `5D`, `3DT12H30M`, `T24H`.
554
+ FRESHNESS = 2
555
+ end
556
+
557
+ # The interpolation type to be applied. Default will be linear
558
+ # (Piecewise Linear).
559
+ module InterpolationType
560
+ # Interpolation type is unspecified. In this case, it defaults to
561
+ # Linear.
562
+ INTERPOLATION_TYPE_UNSPECIFIED = 0
563
+
564
+ # Piecewise linear interpolation will be applied.
565
+ LINEAR = 1
566
+ end
567
+ end
471
568
  end
472
569
  end
473
570
 
@@ -548,11 +645,7 @@ module Google
548
645
  # @!attribute [rw] search_result_mode
549
646
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode]
550
647
  # Specifies the search result mode. If unspecified, the
551
- # search result mode is based on
552
- # [DataStore.DocumentProcessingConfig.chunking_config][]:
553
- # * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
554
- # it defaults to `CHUNKS`.
555
- # * Otherwise, it defaults to `DOCUMENTS`.
648
+ # search result mode defaults to `DOCUMENTS`.
556
649
  # @!attribute [rw] chunk_spec
557
650
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ChunkSpec]
558
651
  # Specifies the chunk spec to be returned from the search response.
@@ -643,6 +736,27 @@ module Google
643
736
  # navigational queries. If this field is set to `true`, we skip
644
737
  # generating summaries for non-summary seeking queries and return
645
738
  # fallback messages instead.
739
+ # @!attribute [rw] ignore_low_relevant_content
740
+ # @return [::Boolean]
741
+ # Specifies whether to filter out queries that have low relevance. The
742
+ # default value is `false`.
743
+ #
744
+ # If this field is set to `false`, all search results are used regardless
745
+ # of relevance to generate answers. If set to `true`, only queries with
746
+ # high relevance search results will generate answers.
747
+ # @!attribute [rw] ignore_jail_breaking_query
748
+ # @return [::Boolean]
749
+ # Optional. Specifies whether to filter out jail-breaking queries. The
750
+ # default value is `false`.
751
+ #
752
+ # Google employs search-query classification to detect jail-breaking
753
+ # queries. No summary is returned if the search query is classified as a
754
+ # jail-breaking query. A user might add instructions to the query to
755
+ # change the tone, style, language, content of the answer, or ask the
756
+ # model to act as a different entity, e.g. "Reply in the tone of a
757
+ # competing company's CEO". If this field is set to `true`, we skip
758
+ # generating summaries for jail-breaking queries and return fallback
759
+ # messages instead.
646
760
  # @!attribute [rw] model_prompt_spec
647
761
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec::ModelPromptSpec]
648
762
  # If specified, the spec will be used to modify the prompt provided to
@@ -777,11 +891,7 @@ module Google
777
891
  end
778
892
 
779
893
  # Specifies the search result mode. If unspecified, the
780
- # search result mode is based on
781
- # [DataStore.DocumentProcessingConfig.chunking_config][]:
782
- # * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
783
- # it defaults to `CHUNKS`.
784
- # * Otherwise, it defaults to `DOCUMENTS`.
894
+ # search result mode defaults to `DOCUMENTS`.
785
895
  module SearchResultMode
786
896
  # Default value.
787
897
  SEARCH_RESULT_MODE_UNSPECIFIED = 0
@@ -905,7 +1015,8 @@ module Google
905
1015
  # A unique search token. This should be included in the
906
1016
  # {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} logs resulting from
907
1017
  # this search, which enables accurate attribution of search model
908
- # performance.
1018
+ # performance. This also helps to identify a request during the customer
1019
+ # support scenarios.
909
1020
  # @!attribute [rw] redirect_uri
910
1021
  # @return [::String]
911
1022
  # The URI of a customer-defined redirect page. If redirect action is
@@ -1121,14 +1232,15 @@ module Google
1121
1232
 
1122
1233
  # The adversarial query ignored case.
1123
1234
  #
1124
- # Only populated when
1235
+ # Only used when
1125
1236
  # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
1126
1237
  # is set to `true`.
1127
1238
  ADVERSARIAL_QUERY_IGNORED = 1
1128
1239
 
1129
1240
  # The non-summary seeking query ignored case.
1130
1241
  #
1131
- # Only populated when
1242
+ # Google skips the summary if the query is chit chat.
1243
+ # Only used when
1132
1244
  # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
1133
1245
  # is set to `true`.
1134
1246
  NON_SUMMARY_SEEKING_QUERY_IGNORED = 2
@@ -1150,6 +1262,34 @@ module Google
1150
1262
  #
1151
1263
  # Google skips the summary if the LLM addon is not enabled.
1152
1264
  LLM_ADDON_NOT_ENABLED = 5
1265
+
1266
+ # The no relevant content case.
1267
+ #
1268
+ # Google skips the summary if there is no relevant content in the
1269
+ # retrieved search results.
1270
+ NO_RELEVANT_CONTENT = 6
1271
+
1272
+ # The jail-breaking query ignored case.
1273
+ #
1274
+ # For example, "Reply in the tone of a competing company's CEO".
1275
+ # Only used when
1276
+ # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
1277
+ # is set to `true`.
1278
+ JAIL_BREAKING_QUERY_IGNORED = 7
1279
+
1280
+ # The customer policy violation case.
1281
+ #
1282
+ # Google skips the summary if there is a customer policy violation
1283
+ # detected. The policy is defined by the customer.
1284
+ CUSTOMER_POLICY_VIOLATION = 8
1285
+
1286
+ # The non-answer seeking query ignored case.
1287
+ #
1288
+ # Google skips the summary if the query doesn't have clear intent.
1289
+ # Only used when
1290
+ # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
1291
+ # is set to `true`.
1292
+ NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9
1153
1293
  end
1154
1294
  end
1155
1295
 
@@ -0,0 +1,172 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1
24
+ # Request message for
25
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client#list_custom_models SearchTuningService.ListCustomModels}
26
+ # method.
27
+ # @!attribute [rw] data_store
28
+ # @return [::String]
29
+ # Required. The resource name of the parent Data Store, such as
30
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
31
+ # This field is used to identify the data store where to fetch the models
32
+ # from.
33
+ class ListCustomModelsRequest
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+ end
37
+
38
+ # Response message for
39
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client#list_custom_models SearchTuningService.ListCustomModels}
40
+ # method.
41
+ # @!attribute [rw] models
42
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CustomTuningModel>]
43
+ # List of custom tuning models.
44
+ class ListCustomModelsResponse
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Request message for
50
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client#train_custom_model SearchTuningService.TrainCustomModel}
51
+ # method.
52
+ # @!attribute [rw] gcs_training_input
53
+ # @return [::Google::Cloud::DiscoveryEngine::V1::TrainCustomModelRequest::GcsTrainingInput]
54
+ # Cloud Storage training input.
55
+ # @!attribute [rw] data_store
56
+ # @return [::String]
57
+ # Required. The resource name of the Data Store, such as
58
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
59
+ # This field is used to identify the data store where to train the models.
60
+ # @!attribute [rw] model_type
61
+ # @return [::String]
62
+ # Model to be trained. Supported values are:
63
+ #
64
+ # * **search-tuning**: Fine tuning the search system based on data provided.
65
+ # @!attribute [rw] error_config
66
+ # @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
67
+ # The desired location of errors incurred during the data ingestion and
68
+ # training.
69
+ # @!attribute [rw] model_id
70
+ # @return [::String]
71
+ # If not provided, a UUID will be generated.
72
+ class TrainCustomModelRequest
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+
76
+ # Cloud Storage training data input.
77
+ # @!attribute [rw] corpus_data_path
78
+ # @return [::String]
79
+ # The Cloud Storage corpus data which could be associated in train data.
80
+ # The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
81
+ # A newline delimited jsonl/ndjson file.
82
+ #
83
+ # For search-tuning model, each line should have the _id, title
84
+ # and text. Example:
85
+ # `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`
86
+ # @!attribute [rw] query_data_path
87
+ # @return [::String]
88
+ # The gcs query data which could be associated in train data.
89
+ # The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
90
+ # A newline delimited jsonl/ndjson file.
91
+ #
92
+ # For search-tuning model, each line should have the _id
93
+ # and text. Example: \\{"_id": "query1", "text": "example query"}
94
+ # @!attribute [rw] train_data_path
95
+ # @return [::String]
96
+ # Cloud Storage training data path whose format should be
97
+ # `gs://<bucket_to_data>/<tsv_file_name>`. The file should be in tsv
98
+ # format. Each line should have the doc_id and query_id and score (number).
99
+ #
100
+ # For search-tuning model, it should have the query-id corpus-id
101
+ # score as tsv file header. The score should be a number in `[0, inf+)`.
102
+ # The larger the number is, the more relevant the pair is. Example:
103
+ #
104
+ # * `query-id\tcorpus-id\tscore`
105
+ # * `query1\tdoc1\t1`
106
+ # @!attribute [rw] test_data_path
107
+ # @return [::String]
108
+ # Cloud Storage test data. Same format as train_data_path. If not provided,
109
+ # a random 80/20 train/test split will be performed on train_data_path.
110
+ class GcsTrainingInput
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+ end
115
+
116
+ # Response of the
117
+ # {::Google::Cloud::DiscoveryEngine::V1::TrainCustomModelRequest TrainCustomModelRequest}.
118
+ # This message is returned by the google.longrunning.Operations.response field.
119
+ # @!attribute [rw] error_samples
120
+ # @return [::Array<::Google::Rpc::Status>]
121
+ # A sample of errors encountered while processing the data.
122
+ # @!attribute [rw] error_config
123
+ # @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
124
+ # Echoes the destination for the complete errors in the request if set.
125
+ # @!attribute [rw] model_status
126
+ # @return [::String]
127
+ # The trained model status. Possible values are:
128
+ #
129
+ # * **bad-data**: The training data quality is bad.
130
+ # * **no-improvement**: Tuning didn't improve performance. Won't deploy.
131
+ # * **in-progress**: Model training job creation is in progress.
132
+ # * **training**: Model is actively training.
133
+ # * **evaluating**: The model is evaluating trained metrics.
134
+ # * **indexing**: The model trained metrics are indexing.
135
+ # * **ready**: The model is ready for serving.
136
+ # @!attribute [rw] metrics
137
+ # @return [::Google::Protobuf::Map{::String => ::Float}]
138
+ # The metrics of the trained model.
139
+ # @!attribute [rw] model_name
140
+ # @return [::String]
141
+ # Fully qualified name of the CustomTuningModel.
142
+ class TrainCustomModelResponse
143
+ include ::Google::Protobuf::MessageExts
144
+ extend ::Google::Protobuf::MessageExts::ClassMethods
145
+
146
+ # @!attribute [rw] key
147
+ # @return [::String]
148
+ # @!attribute [rw] value
149
+ # @return [::Float]
150
+ class MetricsEntry
151
+ include ::Google::Protobuf::MessageExts
152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
153
+ end
154
+ end
155
+
156
+ # Metadata related to the progress of the TrainCustomModel operation. This is
157
+ # returned by the google.longrunning.Operation.metadata field.
158
+ # @!attribute [rw] create_time
159
+ # @return [::Google::Protobuf::Timestamp]
160
+ # Operation create time.
161
+ # @!attribute [rw] update_time
162
+ # @return [::Google::Protobuf::Timestamp]
163
+ # Operation last update time. If the operation is done, this is also the
164
+ # finish time.
165
+ class TrainCustomModelMetadata
166
+ include ::Google::Protobuf::MessageExts
167
+ extend ::Google::Protobuf::MessageExts::ClassMethods
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
@@ -346,6 +346,11 @@ module Google
346
346
  # an INVALID_ARGUMENT error is thrown. Each URI should match at least one
347
347
  # {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite} in
348
348
  # `site_search_engine`.
349
+ # @!attribute [rw] site_credential
350
+ # @return [::String]
351
+ # Optional. Full resource name of the [SiteCredential][], such as
352
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
353
+ # Only set to crawl private URIs.
349
354
  class RecrawlUrisRequest
350
355
  include ::Google::Protobuf::MessageExts
351
356
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -427,7 +427,7 @@ module Google
427
427
  # @return [::String]
428
428
  # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} resource full
429
429
  # name, of the form:
430
- # `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
430
+ # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
431
431
  # @!attribute [rw] uri
432
432
  # @return [::String]
433
433
  # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} URI - only
@@ -447,6 +447,10 @@ module Google
447
447
  # @return [::Array<::String>]
448
448
  # The promotion IDs associated with this Document.
449
449
  # Currently, this field is restricted to at most one ID.
450
+ # @!attribute [r] joined
451
+ # @return [::Boolean]
452
+ # Output only. Whether the referenced Document can be found in the data
453
+ # store.
450
454
  class DocumentInfo
451
455
  include ::Google::Protobuf::MessageExts
452
456
  extend ::Google::Protobuf::MessageExts::ClassMethods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-discovery_engine-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-30 00:00:00.000000000 Z
11
+ date: 2024-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -175,6 +175,15 @@ files:
175
175
  - lib/google/cloud/discovery_engine/v1/search_service/rest.rb
176
176
  - lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb
177
177
  - lib/google/cloud/discovery_engine/v1/search_service/rest/service_stub.rb
178
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service.rb
179
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/client.rb
180
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/credentials.rb
181
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/operations.rb
182
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/paths.rb
183
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/rest.rb
184
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/client.rb
185
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb
186
+ - lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/service_stub.rb
178
187
  - lib/google/cloud/discovery_engine/v1/site_search_engine_service.rb
179
188
  - lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb
180
189
  - lib/google/cloud/discovery_engine/v1/site_search_engine_service/credentials.rb
@@ -206,6 +215,7 @@ files:
206
215
  - lib/google/cloud/discoveryengine/v1/conversation_pb.rb
207
216
  - lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb
208
217
  - lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb
218
+ - lib/google/cloud/discoveryengine/v1/custom_tuning_model_pb.rb
209
219
  - lib/google/cloud/discoveryengine/v1/data_store_pb.rb
210
220
  - lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb
211
221
  - lib/google/cloud/discoveryengine/v1/data_store_service_services_pb.rb
@@ -233,6 +243,8 @@ files:
233
243
  - lib/google/cloud/discoveryengine/v1/schema_service_services_pb.rb
234
244
  - lib/google/cloud/discoveryengine/v1/search_service_pb.rb
235
245
  - lib/google/cloud/discoveryengine/v1/search_service_services_pb.rb
246
+ - lib/google/cloud/discoveryengine/v1/search_tuning_service_pb.rb
247
+ - lib/google/cloud/discoveryengine/v1/search_tuning_service_services_pb.rb
236
248
  - lib/google/cloud/discoveryengine/v1/session_pb.rb
237
249
  - lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb
238
250
  - lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb
@@ -255,6 +267,7 @@ files:
255
267
  - proto_docs/google/cloud/discoveryengine/v1/control_service.rb
256
268
  - proto_docs/google/cloud/discoveryengine/v1/conversation.rb
257
269
  - proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb
270
+ - proto_docs/google/cloud/discoveryengine/v1/custom_tuning_model.rb
258
271
  - proto_docs/google/cloud/discoveryengine/v1/data_store.rb
259
272
  - proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb
260
273
  - proto_docs/google/cloud/discoveryengine/v1/document.rb
@@ -273,6 +286,7 @@ files:
273
286
  - proto_docs/google/cloud/discoveryengine/v1/schema.rb
274
287
  - proto_docs/google/cloud/discoveryengine/v1/schema_service.rb
275
288
  - proto_docs/google/cloud/discoveryengine/v1/search_service.rb
289
+ - proto_docs/google/cloud/discoveryengine/v1/search_tuning_service.rb
276
290
  - proto_docs/google/cloud/discoveryengine/v1/session.rb
277
291
  - proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb
278
292
  - proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb
@@ -306,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
306
320
  - !ruby/object:Gem::Version
307
321
  version: '0'
308
322
  requirements: []
309
- rubygems_version: 3.5.6
323
+ rubygems_version: 3.5.21
310
324
  signing_key:
311
325
  specification_version: 4
312
326
  summary: Discovery Engine API.