Skip to content

Commit 0db1b42

Browse files
sararobcopybara-github
authored andcommitted
chore: agent engine httpbody fix
PiperOrigin-RevId: 770119037
1 parent da09275 commit 0db1b42

File tree

6 files changed

+3073
-294
lines changed

6 files changed

+3073
-294
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2025 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+
# pylint: disable=protected-access,bad-continuation
16+
17+
import importlib
18+
from unittest import mock
19+
20+
from google.cloud import aiplatform
21+
import vertexai
22+
from google.cloud.aiplatform import initializer as aiplatform_initializer
23+
from vertexai import _genai
24+
25+
import pytest
26+
27+
_TEST_PROJECT = "test-project"
28+
_TEST_LOCATION = "us-central1"
29+
30+
31+
pytestmark = pytest.mark.usefixtures("google_auth_mock")
32+
33+
34+
class TestAgentEngines:
35+
"""Unit tests for the Agent Engines client."""
36+
37+
def setup_method(self):
38+
importlib.reload(aiplatform_initializer)
39+
importlib.reload(aiplatform)
40+
importlib.reload(vertexai)
41+
vertexai.init(
42+
project=_TEST_PROJECT,
43+
location=_TEST_LOCATION,
44+
)

vertexai/_genai/_transformers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
#
1515

1616
"""Transformers module for Vertex addons."""
17+
18+
from google.genai import _transformers as genai_transformers
19+
20+
t_bytes = genai_transformers.t_bytes

0 commit comments

Comments
 (0)