Skip to content

Commit fa66f3e

Browse files
holtskinnercopybara-github
authored andcommitted
feat: Add support for Vertex AI Search
PiperOrigin-RevId: 684563650
1 parent 914c63c commit fa66f3e

File tree

3 files changed

+425
-0
lines changed

3 files changed

+425
-0
lines changed

setup.py

+4
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@
171171
tokenization_extra_require = ["sentencepiece >= 0.2.0"]
172172
tokenization_testing_extra_require = tokenization_extra_require + ["nltk"]
173173

174+
search_extra_require = ["google-cloud-discoveryengine"]
175+
174176
full_extra_require = list(
175177
set(
176178
tensorboard_extra_require
@@ -188,6 +190,7 @@
188190
+ preview_extra_require
189191
+ ray_extra_require
190192
+ evaluation_extra_require
193+
+ search_extra_require
191194
)
192195
)
193196
testing_extra_require = (
@@ -276,6 +279,7 @@
276279
"langchain": langchain_extra_require,
277280
"langchain_testing": langchain_testing_extra_require,
278281
"tokenization": tokenization_extra_require,
282+
"search": search_extra_require,
279283
},
280284
python_requires=">=3.8",
281285
classifiers=[

vertexai/preview/search/__init__.py

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Copyright 2024 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
#
15+
"""Classes for working with Vertex AI Search."""
16+
17+
# We just want to re-export certain classes
18+
# pylint: disable=g-multiple-import,g-importing-member
19+
from vertexai.preview.search._search import (
20+
App,
21+
DataType,
22+
DataSource,
23+
DataStore,
24+
IndustryVertical,
25+
TargetSite,
26+
InlineSource,
27+
GcsSource,
28+
BigQuerySource,
29+
SpannerSource,
30+
FirestoreSource,
31+
BigtableOptions,
32+
BigtableSource,
33+
AlloyDbSource,
34+
FhirStoreSource,
35+
ReconciliationMode,
36+
SearchTier,
37+
SearchAddOn,
38+
)
39+
40+
__all__ = [
41+
"App",
42+
"DataType",
43+
"DataSource",
44+
"DataStore",
45+
"IndustryVertical",
46+
"TargetSite",
47+
"InlineSource",
48+
"GcsSource",
49+
"BigQuerySource",
50+
"SpannerSource",
51+
"FirestoreSource",
52+
"BigtableOptions",
53+
"BigtableSource",
54+
"AlloyDbSource",
55+
"FhirStoreSource",
56+
"ReconciliationMode",
57+
"SearchTier",
58+
"SearchAddOn",
59+
]

0 commit comments

Comments
 (0)