mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
fix: fix agent config path handling in generated deployment script
The generated agent deployment script now uses os.path.join and os.path.dirname(__file__) to construct the path to root_agent.yaml. This prevents issues where backslashes in Windows paths could be misinterpreted as Python escape sequences within the f-string, leading to syntax error Close #4223 Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 860236820
This commit is contained in:
committed by
Copybara-Service
parent
025b42c836
commit
801233902b
@@ -105,7 +105,8 @@ from vertexai.agent_engines import AdkApp
|
||||
|
||||
if {is_config_agent}:
|
||||
from google.adk.agents import config_agent_utils
|
||||
root_agent = config_agent_utils.from_config("{agent_folder}/root_agent.yaml")
|
||||
config_path = os.path.join(os.path.dirname(__file__), "root_agent.yaml")
|
||||
root_agent = config_agent_utils.from_config(config_path)
|
||||
else:
|
||||
from .agent import {adk_app_object}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user