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.agent.openai import OpenAIAgent
tool_spec = OpenWeatherMapToolSpec(key="...")
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
agent.chat("What is the temperature like in Paris?")
agent.chat("What is the wind like in Budapest tomorrow?")
weather_at_location
: Use pyowm to get current weather details at a location
forecast_tommorrow_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
File details
Details for the file llama_index_tools_weather-0.3.0.tar.gz
.
File metadata
- Download URL: llama_index_tools_weather-0.3.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2da2ad2241da282878616eddfcdc51a7bf9ef7f205835ada4193923e8bd1f9ef |
|
MD5 | 3256e51eba3118c16de2aaaea0f8ffc6 |
|
BLAKE2b-256 | fbfffdf4de3c8ff5d0c5fe66b26b841f048e4b9cdf92caa6e7819c5b4cd263d7 |
File details
Details for the file llama_index_tools_weather-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_tools_weather-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 014dc0cd69c89280db4ed846fb5be05413c1c2504ba8e4573a9b9ae57d1f1604 |
|
MD5 | 5adeac53356dc0393f53dde99ef2c011 |
|
BLAKE2b-256 | 365be4110b9720f8f07191c73a8fc8f224071a0357d8b61fe305d10a27d88ffb |