llama-index tools weather integration
Project description
Open Weather Map Tool
This tool connects to the OpenWeatherMap's OneCall API, using the pyowm Python package. You must initialize the tool with your OpenWeatherMap API token
The tool has access to the following functions:
- the current weather
- the weather tomorrow
Usage
Here's an example usage of the OpenWeatherMapToolSpec.
from llama_index.tools.weather import OpenWeatherMapToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
tool_spec = OpenWeatherMapToolSpec(key="...")
agent = FunctionAgent(
tools=tool_spec.to_tool_list(),
llm=OpenAI(model="gpt-4.1"),
)
print(await agent.run("What is the temperature like in Paris?"))
print(await agent.run("What is the wind like in Budapest tomorrow?"))
weather_at_location: Use pyowm to get current weather details at a location
forecast_tomorrow_at_location: Use pyowm to get the forecast for tomorrow at a location.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llama_index_tools_weather-0.5.0.tar.gz.
File metadata
- Download URL: llama_index_tools_weather-0.5.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34ae152b20d1094a88076bfcbdf55aee440e2636a72156e15379b9f998ee7ef6
|
|
| MD5 |
e7698bfc60e04ee003d1a50881368945
|
|
| BLAKE2b-256 |
53fedd3e0e6bfbdd2e3d2821edc43b7d8678273460c8714eb46d6bc9c7dadf1b
|
File details
Details for the file llama_index_tools_weather-0.5.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_tools_weather-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c300f8e02c214f67d35de5375a974332a12a2b6ecb6f4a6399d93f5fe854988f
|
|
| MD5 |
66a897870c46325dcea5d972e58c93d6
|
|
| BLAKE2b-256 |
7d1367faa61f05f20493c77d9de7289b951e616bfe443575892d9891ca299510
|