Skip to content

Commit 5b27085

Browse files
happyhumantommywagz
andcommitted
chore: Reformatted the travel-concierge sample by ensuring black, isort, and flake8 pass (#768)
Signed-off-by: tommywagz <[email protected]> Co-authored-by: tommywagz <[email protected]>
1 parent 8450add commit 5b27085

File tree

32 files changed

+359
-320
lines changed

32 files changed

+359
-320
lines changed

python/agents/travel-concierge/deployment/deploy.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@
1717
import asyncio
1818
import os
1919

20+
import vertexai
2021
from absl import app, flags
2122
from dotenv import load_dotenv
22-
23-
from travel_concierge.agent import root_agent
24-
2523
from google.adk.sessions import VertexAiSessionService
26-
27-
import vertexai
24+
from travel_concierge.agent import root_agent
2825
from vertexai import agent_engines
2926
from vertexai.preview.reasoning_engines import AdkApp
3027

@@ -56,10 +53,10 @@ def create(env_vars: dict[str, str]) -> None:
5653
env_vars=env_vars,
5754
)
5855

59-
remote_agent = agent_engines.create(
56+
remote_agent = agent_engines.create(
6057
app,
6158
display_name="Travel-Concierge-ADK",
62-
description="An Example AgentEngine Deployment",
59+
description="An Example AgentEngine Deployment",
6360
requirements=[
6461
"google-adk (>=1.16.0)",
6562
"google-cloud-aiplatform[agent_engines] (>=1.93.1)",
@@ -82,13 +79,13 @@ def delete(resource_id: str) -> None:
8279
print(f"Deleted remote agent: {resource_id}")
8380

8481

85-
def send_message(session_service: VertexAiSessionService, resource_id: str, message: str) -> None:
82+
def send_message(
83+
session_service: VertexAiSessionService, resource_id: str, message: str
84+
) -> None:
8685
"""Send a message to the deployed agent."""
8786

88-
session = asyncio.run(session_service.create_session(
89-
app_name=resource_id,
90-
user_id="traveler0115"
91-
)
87+
session = asyncio.run(
88+
session_service.create_session(app_name=resource_id, user_id="traveler0115")
9289
)
9390

9491
remote_agent = agent_engines.get(resource_id)
@@ -167,7 +164,11 @@ def main(argv: list[str]) -> None:
167164
print("resource_id is required for quicktest")
168165
return
169166
session_service = VertexAiSessionService(project_id, location)
170-
send_message(session_service, FLAGS.resource_id, "Looking for inspirations around the Americas")
167+
send_message(
168+
session_service,
169+
FLAGS.resource_id,
170+
"Looking for inspirations around the Americas",
171+
)
171172
else:
172173
print("Unknown command")
173174

python/agents/travel-concierge/eval/arize_eval_templates.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- incorrect_handoff: The agent failed to transfer when needed, transferred to wrong agent(s), or made unnecessary transfers
1818
1919
Classify this agent handoff behavior:
20-
"""
20+
""",
2121
)
2222

2323

@@ -38,7 +38,7 @@
3838
- incorrect_tools: The agent failed to use expected tools, used wrong tools, or used tools unnecessarily
3939
4040
Classify this tool usage behavior:
41-
"""
41+
""",
4242
)
4343

4444

@@ -64,5 +64,5 @@
6464
- Does the response demonstrate travel domain knowledge?
6565
6666
Classify this response quality:
67-
"""
68-
)
67+
""",
68+
)

python/agents/travel-concierge/eval/test_eval.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import pathlib
1818

1919
import dotenv
20-
from google.adk.evaluation import AgentEvaluator
2120
import pytest
21+
from google.adk.evaluation import AgentEvaluator
2222

2323

2424
@pytest.fixture(scope="session", autouse=True)
@@ -32,7 +32,7 @@ async def test_inspire():
3232
await AgentEvaluator.evaluate(
3333
"travel_concierge",
3434
str(pathlib.Path(__file__).parent / "data/inspire.test.json"),
35-
num_runs=4
35+
num_runs=4,
3636
)
3737

3838

@@ -42,7 +42,7 @@ async def test_pretrip():
4242
await AgentEvaluator.evaluate(
4343
"travel_concierge",
4444
str(pathlib.Path(__file__).parent / "data/pretrip.test.json"),
45-
num_runs=4
45+
num_runs=4,
4646
)
4747

4848

@@ -52,6 +52,5 @@ async def test_intrip():
5252
await AgentEvaluator.evaluate(
5353
"travel_concierge",
5454
str(pathlib.Path(__file__).parent / "data/intrip.test.json"),
55-
num_runs=4
55+
num_runs=4,
5656
)
57-

0 commit comments

Comments
 (0)