We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8387ff5 + b8e4aed commit 6466818Copy full SHA for 6466818
1 file changed
src/google/adk/cli/cli_deploy.py
@@ -64,6 +64,8 @@
64
"""
65
66
_AGENT_ENGINE_APP_TEMPLATE: Final[str] = """
67
+import os
68
+import vertexai
69
from vertexai.agent_engines import AdkApp
70
71
if {is_config_agent}:
@@ -78,9 +80,12 @@
78
80
from .agent import {adk_app_object}
79
81
82
if {express_mode}: # Whether or not to use Express Mode
- import os
- import vertexai
83
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
+ )
89
90
adk_app = AdkApp(
91
{adk_app_type}={adk_app_object},
0 commit comments