Skip to content

Commit c3e6e0d

Browse files
committed
apply review suggests
Signed-off-by: mozillazg <[email protected]>
1 parent 0501daa commit c3e6e0d

File tree

1 file changed

+4
-6
lines changed
  • python/packages/kagent-adk/src/kagent/adk

1 file changed

+4
-6
lines changed

python/packages/kagent-adk/src/kagent/adk/cli.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,12 @@ async def test_agent(agent_config: AgentConfig, agent_card: AgentCard, task: str
9898
@app.command()
9999
def test(
100100
task: Annotated[str, typer.Option("--task", help="The task to test the agent with")],
101-
config_file: Annotated[str, typer.Option("--agent-config", help="The path to the agent config file")],
102-
card_file: Annotated[str, typer.Option("--agent-card", help="The path to the agent card file")],
101+
filepath: Annotated[str, typer.Option("--filepath", help="The path to the directory of config files")],
103102
):
104-
with open(config_file, "r") as f:
105-
content = f.read()
106-
config = json.loads(content)
103+
with open(os.path.join(filepath, "config.json"), "r") as f:
104+
config = json.load(f)
107105

108-
with open(card_file, "r") as f:
106+
with open(os.path.join(filepath, "agent-card.json"), "r") as f:
109107
agent_card = json.load(f)
110108
agent_card = AgentCard.model_validate(agent_card)
111109
agent_config = AgentConfig.model_validate(config)

0 commit comments

Comments
 (0)