LLMyWeather is an application for summarising weather data in a single sentence, using LLMs.
- Pulls live data from the UK Met Office API
- Summarises data with gpt-4 API
- Option to apply 200+ ridiculous reporter 'styles'!
![](https://private-user-images.githubusercontent.com/79009541/303410763-cb5bd7a6-c450-4b72-8a25-78584b7b6613.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5NDQzNTUsIm5iZiI6MTcxODk0NDA1NSwicGF0aCI6Ii83OTAwOTU0MS8zMDM0MTA3NjMtY2I1YmQ3YTYtYzQ1MC00YjcyLThhMjUtNzg1ODRiN2I2NjEzLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDA0MjczNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM4Mjc2NGJiMzI0MTc4OGM1ODdiYjlmZDBkM2I1YTYyNGUwNzIwYjIzZmZmY2I3MjBhZDNiMTIxZjYwY2NiNjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.6DZ1zrUZc2Wyti-nIa4DXEqA-EkBOn2ianFlV9oy1DI)
Clone the repository:
git clone https://github.com/mimireyburn/LLMyWeather.git
Create a .env file based on env_example. You will need:
- OpenAI API Key
- MET Office DataPoint API Key
- DataPoint Location ID (e.g. Cambridge is 310042)
- MET Office Observed Location ID (Not all weather stations report historical data to the API - test it first. e.g. Heathrow works and is 3772)
- MET Office Historical Location (e.g. England_SE_and_Central_S)
You can find the DataPoint API reference here. To use it, register for a free API key.
At the top of the main.py file, change the following lines to match your setup:
# Dimensions and colour of the InkyWHAT display
WIDTH = 400
HEIGHT = 300
COLOUR = "yellow"
# Frequency of display refresh in minutes
UPDATE_BUFFER = 60
# Define delivery style.
SYSTEM = "assistant" # or "entertainer"
The Assistant persona acts as a PA, delivering the weather forecast with some advice on what to wear or bring with you. The Entertainer persona is a bit more fun, delivering the weather forecast in a random style from a list of 200+ ridiculous reporters. If unspecified, the default is Weather Reporter.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.