A weather bot is the 'hello world' of LLM function calling. I've found the documentation for most function calling / tool calling to gloss over any actual API calls made. (I call peanut butter on it always being 75 and sunny in NYC). So here is a tool calling 'hello world' that actually calls an API. Shout out to NOAA for providing API access without a key, which makes running this example a breeze.* And thanks to the Pipecat AI framework, it's all done in ~200 lines of code. Lastly but not leastly, Gemini Multimodal Live is really fast and cool.
Get a few free keys.
- Daily API Key
- Signup at Daily.
- Verify email address and choose a subdomain to complete onboarding.
- Click on "Developers" in left-side menu of Daily dashboard to reveal API Key.
- Gemini API key
- Obtain that here.
cp env.example .env
# add Daily and Gemini keys
source .env
python3.12 -m venv venv
source venv/bin/activate
pip install "pipecat-ai[daily,google,openai,silero]" noaa_sdk python-dotenv
python weather-bot.py
or, if you have a Daily room already created:
DAILY_ROOM=https://my-domain.daily.co/room python weather-bot.py
Not really. But this demo could be updated and totally used for profit.
- yes, that was a weather joke.