Skip to content

Commit 4d7b951

Browse files
wukathcopybara-github
authored andcommitted
chore: Consolidate weather_skill and weather-skill in sample agent
We changed skills to use kebab case and created weather-skill, but forgot to get rid of weather_skill in the sample Co-authored-by: Kathy Wu <wukathy@google.com> PiperOrigin-RevId: 893597141
1 parent aaa03ac commit 4d7b951

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

contributing/samples/skills_agent/agent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ async def run_async(self, *, args: dict, tool_context) -> str:
5454
return f"The timezone for {args['location']} is UTC+00:00."
5555

5656

57-
def get_current_humidity(location: str) -> str:
58-
"""Returns the current humidity for a given location."""
59-
return f"The humidity in {location} is 45%."
57+
def get_wind_speed(location: str) -> str:
58+
"""Returns the current wind speed for a given location."""
59+
return f"The wind speed in {location} is 10 mph."
6060

6161

6262
greeting_skill = models.Skill(
@@ -87,7 +87,7 @@ def get_current_humidity(location: str) -> str:
8787
# be used in production environments.
8888
my_skill_toolset = SkillToolset(
8989
skills=[greeting_skill, weather_skill],
90-
additional_tools=[GetTimezoneTool(), get_current_humidity],
90+
additional_tools=[GetTimezoneTool(), get_wind_speed],
9191
code_executor=UnsafeLocalCodeExecutor(),
9292
)
9393

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
name: weather-skill
33
description: A skill that provides weather information based on reference data.
4+
metadata:
5+
adk_additional_tools:
6+
- get_wind_speed
47
---
58

69
Step 1: Check 'references/weather_info.md' for the current weather.
710
Step 2: If humidity is requested, use run 'scripts/get_humidity.py' with the `location` argument.
8-
Step 3: Provide the update to the user.
11+
Step 3: If wind speed is requested, use the `get_wind_speed` tool.
12+
Step 4: Provide the update to the user.

contributing/samples/skills_agent/skills/weather_skill/SKILL.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)