Content-Length: 290712 | pFad | https://github.com/googleapis/python-aiplatform/commit/1cbe028e045f9179cbd28bc9bddecb7623dce237

F4 fix: Set the app_name in AdkApp template to GOOGLE_CLOUD_AGENT_ENGINE… · googleapis/python-aiplatform@1cbe028 · GitHub
Skip to content

Commit 1cbe028

Browse files
yeesiancopybara-github
authored andcommitted
fix: Set the app_name in AdkApp template to GOOGLE_CLOUD_AGENT_ENGINE_ID if it exists.
PiperOrigin-RevId: 753705341
1 parent c0d1685 commit 1cbe028

File tree

1 file changed

+5
-4
lines changed
  • vertexai/preview/reasoning_engines/templates

1 file changed

+5
-4
lines changed

vertexai/preview/reasoning_engines/templates/adk.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,11 @@ def set_up(self):
397397
)
398398
for key, value in self._tmpl_attrs.get("env_vars").items():
399399
os.environ[key] = value
400+
if "GOOGLE_CLOUD_AGENT_ENGINE_ID" in os.environ:
401+
self._tmpl_attrs["app_name"] = os.environ.get(
402+
"GOOGLE_CLOUD_AGENT_ENGINE_ID",
403+
self._tmpl_attrs.get("app_name"),
404+
)
400405

401406
artifact_service_builder = self._tmpl_attrs.get("artifact_service_builder")
402407
if artifact_service_builder:
@@ -416,10 +421,6 @@ def set_up(self):
416421
project=project,
417422
location=location,
418423
)
419-
self._tmpl_attrs["app_name"] = os.environ.get(
420-
"GOOGLE_CLOUD_AGENT_ENGINE_ID",
421-
self._tmpl_attrs.get("app_name"),
422-
)
423424
else:
424425
self._tmpl_attrs["session_service"] = InMemorySessionService()
425426

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/python-aiplatform/commit/1cbe028e045f9179cbd28bc9bddecb7623dce237

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy