google-cloud-discovery_engine-v1beta 0.10.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +13 -5
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -6
  6. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +875 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +47 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +167 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +814 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +440 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest.rb +55 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/control_service.rb +58 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +764 -6
  14. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +715 -6
  16. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +15 -7
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +13 -5
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +15 -7
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -6
  21. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +71 -37
  22. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +13 -5
  23. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +71 -37
  25. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -6
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +312 -5
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +13 -5
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +291 -5
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -6
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +471 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  33. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +438 -0
  35. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +485 -0
  39. data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +47 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +809 -0
  41. data/lib/google/cloud/discovery_engine/v1beta/project_service/paths.rb +47 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +452 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +1092 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +129 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/project_service/rest.rb +54 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/project_service.rb +57 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +481 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +448 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -19
  55. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +66 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +24 -19
  57. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +18 -10
  59. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +13 -5
  60. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +18 -10
  61. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -6
  62. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +26 -14
  63. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +26 -14
  64. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +104 -2
  65. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +13 -5
  66. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +97 -2
  67. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -6
  68. data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +59 -0
  69. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +9 -3
  70. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +9 -3
  71. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +27 -12
  72. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +13 -5
  73. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +27 -12
  74. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -6
  75. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -6
  76. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +13 -5
  77. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +21 -0
  78. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -6
  79. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -6
  80. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
  81. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  82. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +69 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  85. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +55 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +57 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/control_service_services_pb.rb +69 -0
  88. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  89. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  90. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +48 -0
  91. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  92. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  93. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +1 -1
  94. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
  95. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  96. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  97. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  98. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  99. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  100. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  101. data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +49 -0
  102. data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +50 -0
  103. data/lib/google/cloud/discoveryengine/v1beta/project_service_services_pb.rb +51 -0
  104. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  105. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  106. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
  107. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +5 -1
  108. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +2 -0
  109. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  110. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
  111. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  112. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  113. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
  114. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +362 -0
  115. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +25 -1
  116. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +209 -0
  117. data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +126 -0
  118. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -2
  119. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +491 -0
  120. data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +75 -0
  121. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +2 -2
  122. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +4 -5
  123. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +9 -6
  124. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -5
  125. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  126. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +144 -0
  127. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +79 -0
  128. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +312 -26
  129. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +106 -0
  130. data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +57 -0
  131. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +127 -0
  132. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +20 -19
  133. data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +5 -5
  134. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +181 -43
  135. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +47 -1
  136. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +88 -0
  137. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +3 -0
  138. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +25 -4
  139. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +13 -1
  140. metadata +56 -2
@@ -0,0 +1,75 @@
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 V1beta
24
+ # Metadata that describes a custom tuned model.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Required. The fully qualified resource name of the model.
28
+ #
29
+ # Format:
30
+ # `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/customTuningModels/{custom_tuning_model}`
31
+ # model must be an alpha-numerical string with limit of 40 characters.
32
+ # @!attribute [rw] display_name
33
+ # @return [::String]
34
+ # The display name of the model.
35
+ # @!attribute [rw] model_version
36
+ # @return [::Integer]
37
+ # The version of the model.
38
+ # @!attribute [rw] model_state
39
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::CustomTuningModel::ModelState]
40
+ # The state that the model is in (e.g.`TRAINING` or `TRAINING_FAILED`).
41
+ # @!attribute [rw] create_time
42
+ # @return [::Google::Protobuf::Timestamp]
43
+ # Timestamp the Model was created at.
44
+ # @!attribute [rw] training_start_time
45
+ # @return [::Google::Protobuf::Timestamp]
46
+ # Timestamp the model training was initiated.
47
+ class CustomTuningModel
48
+ include ::Google::Protobuf::MessageExts
49
+ extend ::Google::Protobuf::MessageExts::ClassMethods
50
+
51
+ # The state of the model.
52
+ module ModelState
53
+ # Default value.
54
+ MODEL_STATE_UNSPECIFIED = 0
55
+
56
+ # The model is in a paused training state.
57
+ TRAINING_PAUSED = 1
58
+
59
+ # The model is currently training.
60
+ TRAINING = 2
61
+
62
+ # The model has successfully completed training.
63
+ TRAINING_COMPLETE = 3
64
+
65
+ # The model is ready for serving.
66
+ READY_FOR_SERVING = 4
67
+
68
+ # The model training failed.
69
+ TRAINING_FAILED = 5
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -124,8 +124,8 @@ module Google
124
124
  # INVALID_ARGUMENT error is returned.
125
125
  # @!attribute [rw] filter
126
126
  # @return [::String]
127
- # Filter by solution type. For example: filter =
128
- # 'solution_type:SOLUTION_TYPE_SEARCH'
127
+ # Filter by solution type .
128
+ # For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`
129
129
  class ListDataStoresRequest
130
130
  include ::Google::Protobuf::MessageExts
131
131
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -42,6 +42,7 @@ module Google
42
42
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1beta::DocumentProcessingConfig::ParsingConfig}]
43
43
  # Map from file type to override the default parsing configuration based on
44
44
  # the file type. Supported keys:
45
+ #
45
46
  # * `pdf`: Override parsing config for PDF files, either digital parsing, ocr
46
47
  # parsing or layout parsing is supported.
47
48
  # * `html`: Override parsing config for HTML files, only digital parsing and
@@ -72,12 +73,10 @@ module Google
72
73
 
73
74
  # The OCR parsing configurations for documents.
74
75
  # @!attribute [rw] enhanced_document_elements
76
+ # @deprecated This field is deprecated and may be removed in the next major version update.
75
77
  # @return [::Array<::String>]
76
- # Apply additional enhanced OCR processing to a list of document
77
- # elements.
78
- #
79
- # Supported values:
80
- # * `table`: advanced table parsing model.
78
+ # [DEPRECATED] This field is deprecated. To use the additional enhanced
79
+ # document elements processing, please switch to `layout_parsing_config`.
81
80
  # @!attribute [rw] use_native_text
82
81
  # @return [::Boolean]
83
82
  # If true, will use native text instead of OCR text on pages containing
@@ -59,7 +59,7 @@ module Google
59
59
  # @return [::Integer]
60
60
  # Maximum number of {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s
61
61
  # to return. If unspecified, defaults to 100. The maximum allowed value is
62
- # 1000. Values above 1000 will be coerced to 1000.
62
+ # 1000. Values above 1000 are set to 1000.
63
63
  #
64
64
  # If this field is negative, an `INVALID_ARGUMENT` error is returned.
65
65
  # @!attribute [rw] page_token
@@ -110,8 +110,8 @@ module Google
110
110
  # @!attribute [rw] document_id
111
111
  # @return [::String]
112
112
  # Required. The ID to use for the
113
- # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, which will become
114
- # the final component of the
113
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}, which becomes the
114
+ # final component of the
115
115
  # {::Google::Cloud::DiscoveryEngine::V1beta::Document#name Document.name}.
116
116
  #
117
117
  # If the caller does not have permission to create the
@@ -148,10 +148,13 @@ module Google
148
148
  # is not set, a `NOT_FOUND` error is returned.
149
149
  # @!attribute [rw] allow_missing
150
150
  # @return [::Boolean]
151
- # If set to true, and the
151
+ # If set to `true` and the
152
152
  # {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} is not found, a
153
- # new {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} will be
154
- # created.
153
+ # new {::Google::Cloud::DiscoveryEngine::V1beta::Document Document} is be created.
154
+ # @!attribute [rw] update_mask
155
+ # @return [::Google::Protobuf::FieldMask]
156
+ # Indicates which fields in the provided imported 'document' to update. If
157
+ # not set, by default updates all fields.
155
158
  class UpdateDocumentRequest
156
159
  include ::Google::Protobuf::MessageExts
157
160
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -94,7 +94,7 @@ module Google
94
94
  # The restriction of the Engine industry vertical is based on
95
95
  # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}: If unspecified,
96
96
  # default to `GENERIC`. Vertical on Engine has to match vertical of the
97
- # DataStore liniked to the engine.
97
+ # DataStore linked to the engine.
98
98
  # @!attribute [rw] common_config
99
99
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::Engine::CommonConfig]
100
100
  # Common config spec that specifies the metadata of the engine.
@@ -108,7 +108,7 @@ module Google
108
108
  # The search feature tier of this engine.
109
109
  #
110
110
  # Different tiers might have different
111
- # pricing. To learn more, please check the pricing documentation.
111
+ # pricing. To learn more, check the pricing documentation.
112
112
  #
113
113
  # Defaults to
114
114
  # {::Google::Cloud::DiscoveryEngine::V1beta::SearchTier::SEARCH_TIER_STANDARD SearchTier.SEARCH_TIER_STANDARD}
@@ -147,7 +147,7 @@ module Google
147
147
  # {::Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client#get_engine EngineService.GetEngine}
148
148
  # or
149
149
  # {::Google::Cloud::DiscoveryEngine::V1beta::EngineService::Client#list_engines EngineService.ListEngines}
150
- # API after engine creation. Please use
150
+ # API after engine creation. Use
151
151
  # {::Google::Cloud::DiscoveryEngine::V1beta::Engine::ChatEngineMetadata#dialogflow_agent ChatEngineMetadata.dialogflow_agent}
152
152
  # for actual agent association after Engine is created.
153
153
  class ChatEngineConfig
@@ -192,8 +192,8 @@ module Google
192
192
  # Common configurations for an Engine.
193
193
  # @!attribute [rw] company_name
194
194
  # @return [::String]
195
- # Immutable. The name of the company, business or entity that is associated
196
- # with the engine. Setting this may help improve LLM related features.
195
+ # The name of the company, business or entity that is associated with the
196
+ # engine. Setting this may help improve LLM related features.
197
197
  class CommonConfig
198
198
  include ::Google::Protobuf::MessageExts
199
199
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -173,6 +173,57 @@ module Google
173
173
  include ::Google::Protobuf::MessageExts
174
174
  extend ::Google::Protobuf::MessageExts::ClassMethods
175
175
  end
176
+
177
+ # Request for pausing training of an engine.
178
+ # @!attribute [rw] name
179
+ # @return [::String]
180
+ # Required. The name of the engine to pause.
181
+ # Format:
182
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
183
+ class PauseEngineRequest
184
+ include ::Google::Protobuf::MessageExts
185
+ extend ::Google::Protobuf::MessageExts::ClassMethods
186
+ end
187
+
188
+ # Request for resuming training of an engine.
189
+ # @!attribute [rw] name
190
+ # @return [::String]
191
+ # Required. The name of the engine to resume.
192
+ # Format:
193
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
194
+ class ResumeEngineRequest
195
+ include ::Google::Protobuf::MessageExts
196
+ extend ::Google::Protobuf::MessageExts::ClassMethods
197
+ end
198
+
199
+ # Request to manually start a tuning process now (instead of waiting for
200
+ # the periodically scheduled tuning to happen).
201
+ # @!attribute [rw] name
202
+ # @return [::String]
203
+ # Required. The resource name of the engine to tune.
204
+ # Format:
205
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
206
+ class TuneEngineRequest
207
+ include ::Google::Protobuf::MessageExts
208
+ extend ::Google::Protobuf::MessageExts::ClassMethods
209
+ end
210
+
211
+ # Metadata associated with a tune operation.
212
+ # @!attribute [rw] engine
213
+ # @return [::String]
214
+ # Required. The resource name of the engine that this tune applies to.
215
+ # Format:
216
+ # `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`
217
+ class TuneEngineMetadata
218
+ include ::Google::Protobuf::MessageExts
219
+ extend ::Google::Protobuf::MessageExts::ClassMethods
220
+ end
221
+
222
+ # Response associated with a tune operation.
223
+ class TuneEngineResponse
224
+ include ::Google::Protobuf::MessageExts
225
+ extend ::Google::Protobuf::MessageExts::ClassMethods
226
+ end
176
227
  end
177
228
  end
178
229
  end
@@ -0,0 +1,144 @@
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 V1beta
24
+ # Specification for the grounding check.
25
+ # @!attribute [rw] citation_threshold
26
+ # @return [::Float]
27
+ # The threshold (in [0,1]) used for determining whether a fact must be
28
+ # cited for a claim in the answer candidate. Choosing a higher threshold
29
+ # will lead to fewer but very strong citations, while choosing a lower
30
+ # threshold may lead to more but somewhat weaker citations. If unset, the
31
+ # threshold will default to 0.6.
32
+ class CheckGroundingSpec
33
+ include ::Google::Protobuf::MessageExts
34
+ extend ::Google::Protobuf::MessageExts::ClassMethods
35
+ end
36
+
37
+ # Request message for
38
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
39
+ # method.
40
+ # @!attribute [rw] grounding_config
41
+ # @return [::String]
42
+ # Required. The resource name of the grounding config, such as
43
+ # `projects/*/locations/global/groundingConfigs/default_grounding_config`.
44
+ # @!attribute [rw] answer_candidate
45
+ # @return [::String]
46
+ # Answer candidate to check. Can have a maximum length of 1024 characters.
47
+ # @!attribute [rw] facts
48
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::GroundingFact>]
49
+ # List of facts for the grounding check.
50
+ # We support up to 200 facts.
51
+ # @!attribute [rw] grounding_spec
52
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingSpec]
53
+ # Configuration of the grounding check.
54
+ # @!attribute [rw] user_labels
55
+ # @return [::Google::Protobuf::Map{::String => ::String}]
56
+ # The user labels applied to a resource must meet the following requirements:
57
+ #
58
+ # * Each resource can have multiple labels, up to a maximum of 64.
59
+ # * Each label must be a key-value pair.
60
+ # * Keys have a minimum length of 1 character and a maximum length of 63
61
+ # characters and cannot be empty. Values can be empty and have a maximum
62
+ # length of 63 characters.
63
+ # * Keys and values can contain only lowercase letters, numeric characters,
64
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
65
+ # international characters are allowed.
66
+ # * The key portion of a label must be unique. However, you can use the same
67
+ # key with multiple resources.
68
+ # * Keys must start with a lowercase letter or international character.
69
+ #
70
+ # See [Google Cloud
71
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
72
+ # for more details.
73
+ class CheckGroundingRequest
74
+ include ::Google::Protobuf::MessageExts
75
+ extend ::Google::Protobuf::MessageExts::ClassMethods
76
+
77
+ # @!attribute [rw] key
78
+ # @return [::String]
79
+ # @!attribute [rw] value
80
+ # @return [::String]
81
+ class UserLabelsEntry
82
+ include ::Google::Protobuf::MessageExts
83
+ extend ::Google::Protobuf::MessageExts::ClassMethods
84
+ end
85
+ end
86
+
87
+ # Response message for the
88
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GroundedGenerationService::Client#check_grounding GroundedGenerationService.CheckGrounding}
89
+ # method.
90
+ # @!attribute [rw] support_score
91
+ # @return [::Float]
92
+ # The support score for the input answer candidate.
93
+ # Higher the score, higher is the fraction of claims that are supported by
94
+ # the provided facts. This is always set when a response is returned.
95
+ # @!attribute [rw] cited_chunks
96
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::FactChunk>]
97
+ # List of facts cited across all claims in the answer candidate.
98
+ # These are derived from the facts supplied in the request.
99
+ # @!attribute [rw] claims
100
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim>]
101
+ # Claim texts and citation info across all claims in the answer candidate.
102
+ class CheckGroundingResponse
103
+ include ::Google::Protobuf::MessageExts
104
+ extend ::Google::Protobuf::MessageExts::ClassMethods
105
+
106
+ # Text and citation info for a claim in the answer candidate.
107
+ # @!attribute [rw] start_pos
108
+ # @return [::Integer]
109
+ # Position indicating the start of the claim in the answer candidate,
110
+ # measured in bytes.
111
+ # @!attribute [rw] end_pos
112
+ # @return [::Integer]
113
+ # Position indicating the end of the claim in the answer candidate,
114
+ # exclusive.
115
+ # @!attribute [rw] claim_text
116
+ # @return [::String]
117
+ # Text for the claim in the answer candidate. Always provided regardless of
118
+ # whether citations or anti-citations are found.
119
+ # @!attribute [rw] citation_indices
120
+ # @return [::Array<::Integer>]
121
+ # A list of indices (into 'cited_chunks') specifying the citations
122
+ # associated with the claim. For instance [1,3,4] means that
123
+ # cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited
124
+ # supporting for the claim. A citation to a fact indicates that the claim
125
+ # is supported by the fact.
126
+ # @!attribute [rw] grounding_check_required
127
+ # @return [::Boolean]
128
+ # Indicates that this claim required grounding check. When the system
129
+ # decided this claim doesn't require attribution/grounding check, this
130
+ # field will be set to false. In that case, no grounding check was done for
131
+ # the claim and therefore
132
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CheckGroundingResponse::Claim#citation_indices citation_indices},
133
+ # and
134
+ # [anti_citation_indices][google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim.anti_citation_indices]
135
+ # should not be returned.
136
+ class Claim
137
+ include ::Google::Protobuf::MessageExts
138
+ extend ::Google::Protobuf::MessageExts::ClassMethods
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,79 @@
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 V1beta
24
+ # Grounding Fact.
25
+ # @!attribute [rw] fact_text
26
+ # @return [::String]
27
+ # Text content of the fact. Can be at most 10K characters long.
28
+ # @!attribute [rw] attributes
29
+ # @return [::Google::Protobuf::Map{::String => ::String}]
30
+ # Attributes associated with the fact.
31
+ # Common attributes include `source` (indicating where the fact was sourced
32
+ # from), `author` (indicating the author of the fact), and so on.
33
+ class GroundingFact
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+
37
+ # @!attribute [rw] key
38
+ # @return [::String]
39
+ # @!attribute [rw] value
40
+ # @return [::String]
41
+ class AttributesEntry
42
+ include ::Google::Protobuf::MessageExts
43
+ extend ::Google::Protobuf::MessageExts::ClassMethods
44
+ end
45
+ end
46
+
47
+ # Fact Chunk.
48
+ # @!attribute [rw] chunk_text
49
+ # @return [::String]
50
+ # Text content of the fact chunk. Can be at most 10K characters long.
51
+ # @!attribute [rw] source
52
+ # @return [::String]
53
+ # Source from which this fact chunk was retrieved. If it was retrieved
54
+ # from the GroundingFacts provided in the request then this field will
55
+ # contain the index of the specific fact from which this chunk was
56
+ # retrieved.
57
+ # @!attribute [rw] index
58
+ # @return [::Integer]
59
+ # The index of this chunk. Currently, only used for the streaming mode.
60
+ # @!attribute [rw] source_metadata
61
+ # @return [::Google::Protobuf::Map{::String => ::String}]
62
+ # More fine-grained information for the source reference.
63
+ class FactChunk
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+
67
+ # @!attribute [rw] key
68
+ # @return [::String]
69
+ # @!attribute [rw] value
70
+ # @return [::String]
71
+ class SourceMetadataEntry
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end