mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
feat: Add support for display_name and description when deploying to agent engine
PiperOrigin-RevId: 769674731
This commit is contained in:
committed by
Copybara-Service
parent
8e438f2752
commit
aaf1f9b930
@@ -218,6 +218,8 @@ def to_agent_engine(
|
||||
region: str,
|
||||
staging_bucket: str,
|
||||
trace_to_cloud: bool,
|
||||
display_name: Optional[str] = None,
|
||||
description: Optional[str] = None,
|
||||
requirements_file: Optional[str] = None,
|
||||
env_file: Optional[str] = None,
|
||||
):
|
||||
@@ -342,6 +344,8 @@ def to_agent_engine(
|
||||
agent_engines.create(
|
||||
agent_engine=agent_engine,
|
||||
requirements=requirements_file,
|
||||
display_name=display_name,
|
||||
description=description,
|
||||
env_vars=env_vars,
|
||||
extra_packages=[temp_folder],
|
||||
)
|
||||
|
||||
@@ -793,6 +793,20 @@ def cli_deploy_cloud_run(
|
||||
default=False,
|
||||
help="Optional. Whether to enable Cloud Trace for Agent Engine.",
|
||||
)
|
||||
@click.option(
|
||||
"--display_name",
|
||||
type=str,
|
||||
show_default=True,
|
||||
default="",
|
||||
help="Optional. Display name of the agent in Agent Engine.",
|
||||
)
|
||||
@click.option(
|
||||
"--description",
|
||||
type=str,
|
||||
show_default=True,
|
||||
default="",
|
||||
help="Optional. Description of the agent in Agent Engine.",
|
||||
)
|
||||
@click.option(
|
||||
"--adk_app",
|
||||
type=str,
|
||||
@@ -847,6 +861,8 @@ def cli_deploy_agent_engine(
|
||||
region: str,
|
||||
staging_bucket: str,
|
||||
trace_to_cloud: bool,
|
||||
display_name: str,
|
||||
description: str,
|
||||
adk_app: str,
|
||||
temp_folder: str,
|
||||
env_file: str,
|
||||
@@ -859,7 +875,7 @@ def cli_deploy_agent_engine(
|
||||
Example:
|
||||
|
||||
adk deploy agent_engine --project=[project] --region=[region]
|
||||
--staging_bucket=[staging_bucket] path/to/my_agent
|
||||
--staging_bucket=[staging_bucket] --display_name=[app_name] path/to/my_agent
|
||||
"""
|
||||
try:
|
||||
cli_deploy.to_agent_engine(
|
||||
@@ -868,6 +884,8 @@ def cli_deploy_agent_engine(
|
||||
region=region,
|
||||
staging_bucket=staging_bucket,
|
||||
trace_to_cloud=trace_to_cloud,
|
||||
display_name=display_name,
|
||||
description=description,
|
||||
adk_app=adk_app,
|
||||
temp_folder=temp_folder,
|
||||
env_file=env_file,
|
||||
|
||||
Reference in New Issue
Block a user