This project was created by Matthew Harris at DataKind using the Probable Futures open data resources. Matthew published a blog post about creating this project which contains extensive detail about his approach. This repository is a fork of Matthew's original repository and is not owned by Probable Futures, but rather is an experimental open source project that anyone is welcome to experiment with under Matthew's original terms.
[!CAUTION] This application is an experiment. Do not use it in publicly accessible applications. It should be used for experimental and research purposes only.
If you are looking for climate change data that is ready for public use, please see the Probable Futures climate handbook, climate maps, and open data resources. To learn more about Probable Futures, please visit the Probable Futures website.
This chainlit app will use an OpenAI Assistant and the Probable futures API to provide climate change information for a location, and provide some helpful resources for how to prepare.
The chainlit app is based off the cookbook example here.
You will need a probable future API key, see here for more details. You will also need an OPENAI key.
Setup a Conda environment ...
cd app/
conda env create -f environment.yml
conda init zsh
"zsh" can be replaced with your shell configurationconda activate assistant-env
(You can leave the environment by using conda deactivate
)If you add a new dependency, run conda env update -f environment.yml
to install it or to update existing ones.
Once you have these, then ...
.env.example
to .env
python3 create_assistant.py
(If you have "ASSISTANT_ID" valid in .env
you'll be updating that assistant).env
If you make changes to the assistant, rerun create_assistant.py
, which will update the existing assistant.
To create a new assistant, your "ASSISTANT_ID" in .env
needs to be empty
chainlit run app.py
docker build -t pf-assistant:latest .
docker run -p 8080:8080 pf-assistant:latest
Go here