AgroChat is an Django project that leverages real-time weather data to provide specific and efficient recommendations for each user. It integrates with the real-time weather data API to offer accurate information about current and future weather conditions. Moreover, it is enhanced with the ChatGPT generative text API, transforming it into an intelligent virtual assistant for agriculture.
Make sure to have the following requirements installed before getting started:
- Python:
- Clone this repository:
git clone https://github.com/raphaelgpalma/agrochat.git- Virtual Environment Setup:
I recommend using a virtual environment to isolate project dependencies. Execute the following commands to create and activate a virtual environment:
# On Windows, use venv\Scripts\activate
# On Unix or MacOS, use source venv/bin/activate
python -m venv venv # Or virtualenv venv
source venv/bin/activate- Install Project Dependencies:
pip install -r requirements.txt- Create a .env file at the root of your project:
touch .env- Using Docker to create the reverse proxy server Ensure Docker is installed by referring to the Docker Installation Docs. Run the following command:
docker run -dp 3040:3040 pawanosman/chatgpt:latestDone! You can now connect to your local server's API at:
http://localhost:3040/v1/chat/completionsNote that the base URL is http://localhost:3040/v1
- Add on your .env file:
OPEN_WEATHER_API_KEY=<YOUR OPEN WEATHER API KEY>- Run the Project's Server:
python manage.py runserverIf you want to stop running the server press CTRL+C on Terminal
