Skip to content

Phase 3: Agentic Function Calling (weather, timer, time) #2

@chatde

Description

@chatde

What to build

Full tool-call pipeline: Gemma 4 returns a tool_calls block → bridge parses it → dispatches to Python function → result injected back into conversation → Vector speaks the answer.

Built-in tools: get_weather (wttr.in, no API key), get_time (system clock), set_timer (background thread + spoken alert).

Acceptance criteria

  • tools/weather.py:get_weather(location) returns current conditions via wttr.in JSON (no API key)
  • tools/timer.py:set_timer(seconds, label) starts background thread; Vector speaks when timer fires
  • tools/time.py:get_time() returns formatted current date/time string
  • bridge.py:_handle_tool_calls() dispatches to all three tools correctly
  • End-to-end: "What's the weather in London?" → Gemma calls tool → Vector speaks answer
  • Tool errors handled gracefully (Vector says "I couldn't get that" rather than crashing)
  • ENABLE_TOOLS=true in .env activates tool calling; false skips cleanly

Blocked by

User stories addressed

  • Vector can tell you the weather, set timers, answer real-world questions using tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions