Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.2.2 (2025-05-21)

### ♻️ Refactorings

- **api**: adding judge and generator within the api

## v0.2.1 (2025-05-19)

### 🐛🚑️ Fixes
Expand Down
2 changes: 1 addition & 1 deletion tutorials/google_adk.py → examples/google_adk/hack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

agent = HackAgent(
name="multi_tool_agent",
endpoint="http://localhost:8001",
endpoint="http://localhost:8000",
agent_type=AgentTypeEnum.GOOGLE_ADK,
)

Expand Down
1 change: 1 addition & 0 deletions examples/google_adk/multi_tool_agent/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import agent as agent
63 changes: 63 additions & 0 deletions examples/google_adk/multi_tool_agent/agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import datetime
from zoneinfo import ZoneInfo
from google.adk.agents import Agent
from google.adk.models.lite_llm import LiteLlm


def get_weather(city: str) -> dict:
"""Retrieves the current weather report for a specified city.

Args:
city (str): The name of the city for which to retrieve the weather report.

Returns:
dict: status and result or error msg.
"""
if city.lower() == "new york":
return {
"status": "success",
"report": (
"The weather in New York is sunny with a temperature of 25 degrees"
" Celsius (77 degrees Fahrenheit)."
),
}
else:
return {
"status": "error",
"error_message": f"Weather information for '{city}' is not available.",
}


def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city.

Args:
city (str): The name of the city for which to retrieve the current time.

Returns:
dict: status and result or error msg.
"""

if city.lower() == "new york":
tz_identifier = "America/New_York"
else:
return {
"status": "error",
"error_message": (f"Sorry, I don't have timezone information for {city}."),
}

tz = ZoneInfo(tz_identifier)
now = datetime.datetime.now(tz)
report = f"The current time in {city} is {now.strftime('%Y-%m-%d %H:%M:%S %Z%z')}"
return {"status": "success", "report": report}


root_agent = Agent(
name="weather_time_agent",
model=LiteLlm(model="ollama/gemma3"),
description=("Agent to answer questions about the time and weather in a city."),
instruction=(
"You are a helpful agent who can answer user questions about the time and weather in a city."
),
tools=[],
)
Loading