This Django application is designed to showcase the power of OpenAI's GPT-3 natural language processing model. It allows users to input a prompt and receive a generated response from GPT-3 based on that prompt.
Python 3.x installed on your machine
Django installed on your machine
An OpenAI API key (can be obtained from the OpenAI website)
Create virtual environment
py -m venv env_open
# for ubuntu/mac
source env_open/bin/activate
# for windows
env_open\Scripts\activate
Clone the project
git clone https://github.com/thesoftcoders/openai-python.git
Go to the project directory
cd api_response
Install dependencies
pip install -r requirements.txt
Start the server
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
To run this project, you will need to add the following environment variables to your openai_response/key file
API_KEY
click on "View API keys"
click on "create new secret key"
copy and paste at the place of "API_KEY".