File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
tests/unit/vertexai/genai Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -55,3 +55,8 @@ def test_genai_client(self):
55
55
async def test_async_client (self ):
56
56
test_client = vertexai .Client (project = _TEST_PROJECT , location = _TEST_LOCATION )
57
57
assert isinstance (test_client .aio , vertexai ._genai .client .AsyncClient )
58
+
59
+ @pytest .mark .usefixtures ("google_auth_mock" )
60
+ def test_types (self ):
61
+ assert vertexai .types is not None
62
+ assert vertexai .types .LLMMetric is not None
Original file line number Diff line number Diff line change 15
15
"""The vertexai module."""
16
16
17
17
import importlib
18
+ import sys
18
19
19
20
from google .cloud .aiplatform import version as aiplatform_version
20
21
@@ -47,6 +48,8 @@ def __getattr__(name):
47
48
global _genai_types
48
49
if _genai_types is None :
49
50
_genai_types = importlib .import_module ("._genai.types" , __name__ )
51
+ if "vertexai.types" not in sys .modules :
52
+ sys .modules ["vertexai.types" ] = _genai_types
50
53
return _genai_types
51
54
52
55
raise AttributeError (f"module '{ __name__ } ' has no attribute '{ name } '" )
You can’t perform that action at this time.
0 commit comments