google-cloud-discovery_engine-v1beta 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +742 -0
  3. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
  4. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +693 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +48 -23
  7. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +48 -23
  9. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +296 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +275 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +449 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +416 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +459 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +426 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +2 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +11 -6
  28. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +11 -6
  29. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  30. data/lib/google/cloud/discovery_engine/v1beta.rb +2 -0
  31. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +67 -0
  32. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
  33. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
  34. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
  35. data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
  36. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
  37. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
  38. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
  39. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
  40. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
  41. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
  42. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
  43. data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
  44. data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
  45. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
  46. data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +1 -1
  47. data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
  48. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +354 -0
  49. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -1
  50. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +475 -0
  51. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +3 -5
  52. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +4 -0
  53. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +2 -2
  54. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
  55. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +106 -0
  56. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +76 -0
  57. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +310 -24
  58. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +99 -0
  59. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +154 -22
  60. data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +16 -1
  61. data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +85 -0
  62. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +1 -1
  63. metadata +28 -2
@@ -0,0 +1,354 @@
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
+ # Defines an answer.
25
+ # @!attribute [rw] name
26
+ # @return [::String]
27
+ # Immutable. Fully qualified name
28
+ # `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`
29
+ # @!attribute [rw] state
30
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::State]
31
+ # The state of the answer generation.
32
+ # @!attribute [rw] answer_text
33
+ # @return [::String]
34
+ # The textual answer.
35
+ # @!attribute [rw] citations
36
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Citation>]
37
+ # Citations.
38
+ # @!attribute [rw] references
39
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference>]
40
+ # References.
41
+ # @!attribute [rw] related_questions
42
+ # @return [::Array<::String>]
43
+ # Suggested related questions.
44
+ # @!attribute [rw] steps
45
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step>]
46
+ # Answer generation steps.
47
+ # @!attribute [rw] query_understanding_info
48
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo]
49
+ # Query understanding information.
50
+ # @!attribute [rw] answer_skipped_reasons
51
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::AnswerSkippedReason>]
52
+ # Additional answer-skipped reasons. This provides the reason for ignored
53
+ # cases. If nothing is skipped, this field is not set.
54
+ # @!attribute [r] create_time
55
+ # @return [::Google::Protobuf::Timestamp]
56
+ # Output only. Answer creation timestamp.
57
+ # @!attribute [r] complete_time
58
+ # @return [::Google::Protobuf::Timestamp]
59
+ # Output only. Answer completed timestamp.
60
+ class Answer
61
+ include ::Google::Protobuf::MessageExts
62
+ extend ::Google::Protobuf::MessageExts::ClassMethods
63
+
64
+ # Citation info for a segment.
65
+ # @!attribute [rw] start_index
66
+ # @return [::Integer]
67
+ # Index indicates the start of the segment, measured in bytes (UTF-8
68
+ # unicode).
69
+ # @!attribute [rw] end_index
70
+ # @return [::Integer]
71
+ # End of the attributed segment, exclusive.
72
+ # @!attribute [rw] sources
73
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::CitationSource>]
74
+ # Citation sources for the attributed segment.
75
+ class Citation
76
+ include ::Google::Protobuf::MessageExts
77
+ extend ::Google::Protobuf::MessageExts::ClassMethods
78
+ end
79
+
80
+ # Citation source.
81
+ # @!attribute [rw] reference_id
82
+ # @return [::String]
83
+ # ID of the citation source.
84
+ class CitationSource
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+
89
+ # Reference.
90
+ # @!attribute [rw] unstructured_document_info
91
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo]
92
+ # Unstructured document information.
93
+ # @!attribute [rw] chunk_info
94
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo]
95
+ # Chunk information.
96
+ class Reference
97
+ include ::Google::Protobuf::MessageExts
98
+ extend ::Google::Protobuf::MessageExts::ClassMethods
99
+
100
+ # Unstructured document information.
101
+ # @!attribute [rw] document
102
+ # @return [::String]
103
+ # Document resource name.
104
+ # @!attribute [rw] uri
105
+ # @return [::String]
106
+ # URI for the document.
107
+ # @!attribute [rw] title
108
+ # @return [::String]
109
+ # Title.
110
+ # @!attribute [rw] chunk_contents
111
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::UnstructuredDocumentInfo::ChunkContent>]
112
+ # List of cited chunk contents derived from document content.
113
+ class UnstructuredDocumentInfo
114
+ include ::Google::Protobuf::MessageExts
115
+ extend ::Google::Protobuf::MessageExts::ClassMethods
116
+
117
+ # Chunk content.
118
+ # @!attribute [rw] content
119
+ # @return [::String]
120
+ # Chunk textual content.
121
+ # @!attribute [rw] page_identifier
122
+ # @return [::String]
123
+ # Page identifier.
124
+ class ChunkContent
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+ end
129
+
130
+ # Chunk information.
131
+ # @!attribute [rw] chunk
132
+ # @return [::String]
133
+ # Chunk resource name.
134
+ # @!attribute [rw] content
135
+ # @return [::String]
136
+ # Chunk textual content.
137
+ # @!attribute [rw] relevance_score
138
+ # @return [::Float]
139
+ # Relevance score.
140
+ # @!attribute [rw] document_metadata
141
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Reference::ChunkInfo::DocumentMetadata]
142
+ # Document metadata.
143
+ class ChunkInfo
144
+ include ::Google::Protobuf::MessageExts
145
+ extend ::Google::Protobuf::MessageExts::ClassMethods
146
+
147
+ # Document metadata.
148
+ # @!attribute [rw] document
149
+ # @return [::String]
150
+ # Document resource name.
151
+ # @!attribute [rw] uri
152
+ # @return [::String]
153
+ # URI for the document.
154
+ # @!attribute [rw] title
155
+ # @return [::String]
156
+ # Title.
157
+ # @!attribute [rw] page_identifier
158
+ # @return [::String]
159
+ # Page identifier.
160
+ class DocumentMetadata
161
+ include ::Google::Protobuf::MessageExts
162
+ extend ::Google::Protobuf::MessageExts::ClassMethods
163
+ end
164
+ end
165
+ end
166
+
167
+ # Step information.
168
+ # @!attribute [rw] state
169
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::State]
170
+ # The state of the step.
171
+ # @!attribute [rw] description
172
+ # @return [::String]
173
+ # The description of the step.
174
+ # @!attribute [rw] thought
175
+ # @return [::String]
176
+ # The thought of the step.
177
+ # @!attribute [rw] actions
178
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action>]
179
+ # Actions.
180
+ class Step
181
+ include ::Google::Protobuf::MessageExts
182
+ extend ::Google::Protobuf::MessageExts::ClassMethods
183
+
184
+ # Action.
185
+ # @!attribute [rw] search_action
186
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::SearchAction]
187
+ # Search action.
188
+ # @!attribute [rw] observation
189
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation]
190
+ # Observation.
191
+ class Action
192
+ include ::Google::Protobuf::MessageExts
193
+ extend ::Google::Protobuf::MessageExts::ClassMethods
194
+
195
+ # Search action.
196
+ # @!attribute [rw] query
197
+ # @return [::String]
198
+ # The query to search.
199
+ class SearchAction
200
+ include ::Google::Protobuf::MessageExts
201
+ extend ::Google::Protobuf::MessageExts::ClassMethods
202
+ end
203
+
204
+ # Observation.
205
+ # @!attribute [rw] search_results
206
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult>]
207
+ # Search results observed by the search action, it can be snippets info
208
+ # or chunk info, depending on the citation type set by the user.
209
+ class Observation
210
+ include ::Google::Protobuf::MessageExts
211
+ extend ::Google::Protobuf::MessageExts::ClassMethods
212
+
213
+ # @!attribute [rw] document
214
+ # @return [::String]
215
+ # Document resource name.
216
+ # @!attribute [rw] uri
217
+ # @return [::String]
218
+ # URI for the document.
219
+ # @!attribute [rw] title
220
+ # @return [::String]
221
+ # Title.
222
+ # @!attribute [rw] snippet_info
223
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::SnippetInfo>]
224
+ # If citation_type is DOCUMENT_LEVEL_CITATION, populate document
225
+ # level snippets.
226
+ # @!attribute [rw] chunk_info
227
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::Step::Action::Observation::SearchResult::ChunkInfo>]
228
+ # If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on,
229
+ # populate chunk info.
230
+ class SearchResult
231
+ include ::Google::Protobuf::MessageExts
232
+ extend ::Google::Protobuf::MessageExts::ClassMethods
233
+
234
+ # Snippet information.
235
+ # @!attribute [rw] snippet
236
+ # @return [::String]
237
+ # Snippet content.
238
+ # @!attribute [rw] snippet_status
239
+ # @return [::String]
240
+ # Status of the snippet defined by the search team.
241
+ class SnippetInfo
242
+ include ::Google::Protobuf::MessageExts
243
+ extend ::Google::Protobuf::MessageExts::ClassMethods
244
+ end
245
+
246
+ # Chunk information.
247
+ # @!attribute [rw] chunk
248
+ # @return [::String]
249
+ # Chunk resource name.
250
+ # @!attribute [rw] content
251
+ # @return [::String]
252
+ # Chunk textual content.
253
+ # @!attribute [rw] relevance_score
254
+ # @return [::Float]
255
+ # Relevance score.
256
+ class ChunkInfo
257
+ include ::Google::Protobuf::MessageExts
258
+ extend ::Google::Protobuf::MessageExts::ClassMethods
259
+ end
260
+ end
261
+ end
262
+ end
263
+
264
+ # Enumeration of the state of the step.
265
+ module State
266
+ # Unknown.
267
+ STATE_UNSPECIFIED = 0
268
+
269
+ # Step is currently in progress.
270
+ IN_PROGRESS = 1
271
+
272
+ # Step currently failed.
273
+ FAILED = 2
274
+
275
+ # Step has succeeded.
276
+ SUCCEEDED = 3
277
+ end
278
+ end
279
+
280
+ # Query understanding information.
281
+ # @!attribute [rw] query_classification_info
282
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo>]
283
+ # Query classification information.
284
+ class QueryUnderstandingInfo
285
+ include ::Google::Protobuf::MessageExts
286
+ extend ::Google::Protobuf::MessageExts::ClassMethods
287
+
288
+ # Query classification information.
289
+ # @!attribute [rw] type
290
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::Answer::QueryUnderstandingInfo::QueryClassificationInfo::Type]
291
+ # Query classification type.
292
+ # @!attribute [rw] positive
293
+ # @return [::Boolean]
294
+ # Classification output.
295
+ class QueryClassificationInfo
296
+ include ::Google::Protobuf::MessageExts
297
+ extend ::Google::Protobuf::MessageExts::ClassMethods
298
+
299
+ # Query classification types.
300
+ module Type
301
+ # Unspecified query classification type.
302
+ TYPE_UNSPECIFIED = 0
303
+
304
+ # Adversarial query classification type.
305
+ ADVERSARIAL_QUERY = 1
306
+
307
+ # Non-answer-seeking query classification type.
308
+ NON_ANSWER_SEEKING_QUERY = 2
309
+ end
310
+ end
311
+ end
312
+
313
+ # Enumeration of the state of the answer generation.
314
+ module State
315
+ # Unknown.
316
+ STATE_UNSPECIFIED = 0
317
+
318
+ # Answer generation is currently in progress.
319
+ IN_PROGRESS = 1
320
+
321
+ # Answer generation currently failed.
322
+ FAILED = 2
323
+
324
+ # Answer generation has succeeded.
325
+ SUCCEEDED = 3
326
+ end
327
+
328
+ # An enum for answer skipped reasons.
329
+ module AnswerSkippedReason
330
+ # Default value. The answer skipped reason is not specified.
331
+ ANSWER_SKIPPED_REASON_UNSPECIFIED = 0
332
+
333
+ # The adversarial query ignored case.
334
+ ADVERSARIAL_QUERY_IGNORED = 1
335
+
336
+ # The non-answer seeking query ignored case.
337
+ NON_ANSWER_SEEKING_QUERY_IGNORED = 2
338
+
339
+ # The out-of-domain query ignored case.
340
+ #
341
+ # Google skips the answer if there are no high-relevance search results.
342
+ OUT_OF_DOMAIN_QUERY_IGNORED = 3
343
+
344
+ # The potential policy violation case.
345
+ #
346
+ # Google skips the answer if there is a potential policy violation
347
+ # detected. This includes content that may be violent or toxic.
348
+ POTENTIAL_POLICY_VIOLATION = 4
349
+ end
350
+ end
351
+ end
352
+ end
353
+ end
354
+ end
@@ -131,6 +131,9 @@ module Google
131
131
 
132
132
  # The media industry vertical.
133
133
  MEDIA = 2
134
+
135
+ # The healthcare FHIR vertical.
136
+ HEALTHCARE_FHIR = 7
134
137
  end
135
138
 
136
139
  # The type of solution.
@@ -146,10 +149,15 @@ module Google
146
149
 
147
150
  # Used for use cases related to the Generative AI agent.
148
151
  SOLUTION_TYPE_CHAT = 3
152
+
153
+ # Used for use cases related to the Generative Chat agent.
154
+ # It's used for Generative chat engine only, the associated data stores
155
+ # must enrolled with `SOLUTION_TYPE_CHAT` solution.
156
+ SOLUTION_TYPE_GENERATIVE_CHAT = 4
149
157
  end
150
158
 
151
159
  # Tiers of search features. Different tiers might have different
152
- # pricing. To learn more, please check the pricing documentation.
160
+ # pricing. To learn more, check the pricing documentation.
153
161
  module SearchTier
154
162
  # Default value when the enum is unspecified. This is invalid to use.
155
163
  SEARCH_TIER_UNSPECIFIED = 0