Weather Bot with OpenAI Agents SDK
by esakrissa
A Telegram bot that provides real-time weather information using OpenAI's Agents SDK and Model Context Protocol (MCP). It fetches current weather conditions for cities worldwide using natural language queries, powered by GPT-4o-mini model.
Last updated: N/A
What is Weather Bot with OpenAI Agents SDK?
This is a Telegram bot that utilizes the OpenAI Agents SDK and Model Context Protocol (MCP) to provide real-time weather information. It leverages the GPT-4o-mini model to process natural language queries and the Open-Meteo API to fetch weather data.
How to use Weather Bot with OpenAI Agents SDK?
To use the bot, clone the repository, set up a virtual environment, install dependencies, configure the .env file with your Telegram bot token and OpenAI API key, and then run the main.py
script. Once running, simply send a message to the bot asking about the weather in any city.
Key features of Weather Bot with OpenAI Agents SDK
Real-time weather data using Open-Meteo API
Natural language processing with OpenAI Agents SDK (GPT-4o-mini)
Simple MCP server implementation for weather data retrieval
Telegram-native message formatting
Use cases of Weather Bot with OpenAI Agents SDK
Quickly check weather conditions in different cities
Integrate weather information into Telegram workflows
Demonstrate the use of OpenAI Agents SDK and MCP
Learn how to build a Telegram bot with natural language processing capabilities
FAQ from Weather Bot with OpenAI Agents SDK
What API does the bot use for weather data?
What API does the bot use for weather data?
The bot uses the Open-Meteo API to fetch weather data.
Does the Open-Meteo API require an API key?
Does the Open-Meteo API require an API key?
No, the Open-Meteo API does not require an API key.
What OpenAI model is used?
What OpenAI model is used?
The bot uses the GPT-4o-mini model from OpenAI.
What is MCP?
What is MCP?
MCP stands for Model Context Protocol, a way to provide external data and tools to language models.
Where do I get the Telegram Bot Token?
Where do I get the Telegram Bot Token?
You can create a new bot and obtain the token from BotFather on Telegram.