Skip to content

Commit 6466818

Browse files
authored
Merge branch 'main' into main
2 parents 8387ff5 + b8e4aed commit 6466818

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/google/adk/cli/cli_deploy.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
"""
6565

6666
_AGENT_ENGINE_APP_TEMPLATE: Final[str] = """
67+
import os
68+
import vertexai
6769
from vertexai.agent_engines import AdkApp
6870
6971
if {is_config_agent}:
@@ -78,9 +80,12 @@
7880
from .agent import {adk_app_object}
7981
8082
if {express_mode}: # Whether or not to use Express Mode
81-
import os
82-
import vertexai
8383
vertexai.init(api_key=os.environ.get("GOOGLE_API_KEY"))
84+
else:
85+
vertexai.init(
86+
project=os.environ.get("GOOGLE_CLOUD_PROJECT"),
87+
location=os.environ.get("GOOGLE_CLOUD_LOCATION"),
88+
)
8489
8590
adk_app = AdkApp(
8691
{adk_app_type}={adk_app_object},

0 commit comments

Comments
 (0)