-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathDataStore.yaml
335 lines (332 loc) · 13 KB
/
DataStore.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# Copyright 2024 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: 'DataStore'
api_variant_patterns:
- 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}'
description: |
Data store is a collection of websites and documents used to find answers for
end-user's questions in Discovery Engine (a.k.a. Vertex AI Search and
Conversation).
references:
guides:
'Create a search data store': 'https://cloud.google.com/generative-ai-app-builder/docs/create-data-store-es'
api: 'https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/projects.locations.collections.dataStores'
docs:
base_url: 'projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores'
self_link: 'projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}'
create_url: 'projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores?dataStoreId={{data_store_id}}&createAdvancedSiteSearch={{create_advanced_site_search}}&skipDefaultSchemaCreation={{skip_default_schema_creation}}'
update_verb: 'PATCH'
update_mask: true
delete_url: 'projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}'
import_format:
- 'projects/{{project}}/locations/{{location}}/collections/default_collection/dataStores/{{data_store_id}}'
timeouts:
insert_minutes: 20
update_minutes: 20
delete_minutes: 20
autogen_async: false
async:
actions: ['create', 'delete']
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
result:
resource_inside_response: false
custom_code:
sweeper:
dependencies:
- 'google_discovery_engine_chat_engine'
url_substitutions:
- region: "eu"
- region: "global"
examples:
- name: 'discoveryengine_datastore_basic'
primary_resource_id: 'basic'
primary_resource_name: 'fmt.Sprintf("tf_test_data_store%s", context["random_suffix"])'
vars:
data_store_id: 'data-store-id'
- name: 'discoveryengine_datastore_document_processing_config'
primary_resource_id: 'document_processing_config'
primary_resource_name: 'fmt.Sprintf("tf_test_data_store%s", context["random_suffix"])'
vars:
data_store_id: 'data-store-id'
- name: 'discoveryengine_datastore_document_processing_config_ocr'
primary_resource_id: 'document_processing_config_ocr'
primary_resource_name: 'fmt.Sprintf("tf_test_data_store%s", context["random_suffix"])'
vars:
data_store_id: 'data-store-id'
exclude_docs: true
- name: 'discoveryengine_datastore_document_processing_config_layout'
primary_resource_id: 'document_processing_config_layout'
primary_resource_name: 'fmt.Sprintf("tf_test_data_store%s", context["random_suffix"])'
vars:
data_store_id: 'data-store-id'
exclude_docs: true
- name: 'discoveryengine_datastore_advanced_site_search_config'
primary_resource_id: 'advanced_site_search_config'
primary_resource_name: 'fmt.Sprintf("tf_test_data_store%s", context["random_suffix"])'
vars:
data_store_id: 'data-store-id'
parameters:
- name: 'location'
type: String
description: |
The geographic location where the data store should reside. The value can
only be one of "global", "us" and "eu".
url_param_only: true
required: true
immutable: true
- name: 'dataStoreId'
type: String
description: |
The unique id of the data store.
url_param_only: true
required: true
immutable: true
- name: 'createAdvancedSiteSearch'
type: Boolean
description: |
If true, an advanced data store for site search will be created. If the
data store is not configured as site search (GENERIC vertical and
PUBLIC_WEBSITE contentConfig), this flag will be ignored.
url_param_only: true
default_value: false
- name: 'skipDefaultSchemaCreation'
type: Boolean
description: |
A boolean flag indicating whether to skip the default schema creation for
the data store. Only enable this flag if you are certain that the default
schema is incompatible with your use case.
If set to true, you must manually create a schema for the data store
before any documents can be ingested.
This flag cannot be specified if `data_store.starting_schema` is
specified.
url_param_only: true
default_value: false
properties:
- name: 'name'
type: String
description: |
The unique full resource name of the data store. Values are of the format
`projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
This field must be a UTF-8 encoded string with a length limit of 1024
characters.
output: true
- name: 'displayName'
type: String
description: |
The display name of the data store. This field must be a UTF-8 encoded
string with a length limit of 128 characters.
required: true
- name: 'industryVertical'
type: Enum
description: |
The industry vertical that the data store registers.
required: true
immutable: true
enum_values:
- 'GENERIC'
- 'MEDIA'
- 'HEALTHCARE_FHIR'
- name: 'solutionTypes'
type: Array
description: |
The solutions that the data store enrolls.
immutable: true
item_type:
type: Enum
description: |
The type of solution.
enum_values:
- 'SOLUTION_TYPE_RECOMMENDATION'
- 'SOLUTION_TYPE_SEARCH'
- 'SOLUTION_TYPE_CHAT'
- 'SOLUTION_TYPE_GENERATIVE_CHAT'
- name: 'defaultSchemaId'
type: String
description: |
The id of the default Schema associated with this data store.
output: true
- name: 'contentConfig'
type: Enum
description: |
The content config of the data store.
required: true
immutable: true
enum_values:
- 'NO_CONTENT'
- 'CONTENT_REQUIRED'
- 'PUBLIC_WEBSITE'
- name: 'advancedSiteSearchConfig'
type: NestedObject
description: |
Configuration data for advance site search.
required: false
immutable: true
properties:
- name: 'disableInitialIndex'
type: Boolean
description: If set true, initial indexing is disabled for the DataStore.
required: false
- name: 'disableAutomaticRefresh'
type: Boolean
description: If set true, automatic refresh is disabled for the DataStore.
required: false
- name: 'documentProcessingConfig'
type: NestedObject
description: |
Configuration for Document understanding and enrichment.
required: false
immutable: true
properties:
- name: 'name'
type: String
description: |
The full resource name of the Document Processing Config. Format:
`projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`.
required: false
output: true
- name: 'chunkingConfig'
type: NestedObject
description: |
Whether chunking mode is enabled.
required: false
properties:
- name: 'layoutBasedChunkingConfig'
type: NestedObject
description: |
Configuration for the layout based chunking.
required: false
send_empty_value: true
allow_empty_object: true
properties:
- name: 'chunkSize'
type: Integer
description: |
The token size limit for each chunk.
Supported values: 100-500 (inclusive). Default value: 500.
required: false
- name: 'includeAncestorHeadings'
type: Boolean
description: |
Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss.
Default value: False.
required: false
- name: 'defaultParsingConfig'
type: NestedObject
description: |
Configurations for default Document parser. If not specified, this resource
will be configured to use a default DigitalParsingConfig, and the default parsing
config will be applied to all file types for Document parsing.
required: false
properties:
- name: 'digitalParsingConfig'
type: NestedObject
description: |
Configurations applied to digital parser.
required: false
send_empty_value: true
allow_empty_object: true
exactly_one_of:
- 'default_parsing_config.0.digital_parsing_config'
- 'default_parsing_config.0.ocr_parsing_config'
- 'default_parsing_config.0.layout_parsing_config'
properties:
[]
- name: 'ocrParsingConfig'
type: NestedObject
description: |
Configurations applied to OCR parser. Currently it only applies to PDFs.
required: false
exactly_one_of:
- 'default_parsing_config.0.digital_parsing_config'
- 'default_parsing_config.0.ocr_parsing_config'
- 'default_parsing_config.0.layout_parsing_config'
properties:
- name: 'useNativeText'
type: Boolean
description: |
If true, will use native text instead of OCR text on pages containing native text.
required: false
- name: 'layoutParsingConfig'
type: NestedObject
description: |
Configurations applied to layout parser.
required: false
send_empty_value: true
allow_empty_object: true
exactly_one_of:
- 'default_parsing_config.0.digital_parsing_config'
- 'default_parsing_config.0.ocr_parsing_config'
- 'default_parsing_config.0.layout_parsing_config'
properties:
[]
- name: 'parsingConfigOverrides'
type: Map
description: |
Map from file type to override the default parsing configuration based on the file type. Supported keys:
* `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported.
* `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported.
* `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.
key_name: 'file_type'
value_type:
name: parsingConfigOverrides
type: NestedObject
properties:
- name: 'digitalParsingConfig'
type: NestedObject
description: |
Configurations applied to digital parser.
required: false
send_empty_value: true
allow_empty_object: true
exactly_one_of:
- 'default_parsing_config.0.digital_parsing_config'
- 'default_parsing_config.0.ocr_parsing_config'
- 'default_parsing_config.0.layout_parsing_config'
properties:
[]
- name: 'ocrParsingConfig'
type: NestedObject
description: |
Configurations applied to OCR parser. Currently it only applies to PDFs.
required: false
exactly_one_of:
- 'default_parsing_config.0.digital_parsing_config'
- 'default_parsing_config.0.ocr_parsing_config'
- 'default_parsing_config.0.layout_parsing_config'
properties:
- name: 'useNativeText'
type: Boolean
description: |
If true, will use native text instead of OCR text on pages containing native text.
required: false
- name: 'layoutParsingConfig'
type: NestedObject
description: |
Configurations applied to layout parser.
required: false
send_empty_value: true
allow_empty_object: true
exactly_one_of:
- 'default_parsing_config.0.digital_parsing_config'
- 'default_parsing_config.0.ocr_parsing_config'
- 'default_parsing_config.0.layout_parsing_config'
properties:
[]
- name: 'createTime'
type: Time
description: |
Timestamp when the DataStore was created.
output: true