This project is a ChatGPT clone using Django, where users can interact with a chatbot powered by the OpenAI GPT-3.5 Turbo model.
Before running the project, make sure you have the following installed:
- Python (>=3.6)
- Django
- OpenAI Python Library
-
Clone the repository:
git clone https://github.com/LakshithaR/ChatGPT_Clone_with_Django.git
-
Navigate to the project directory:
cd chatgpt-django-clone
-
Install the dependencies:
pip install python pip install django pip install openai
-
Configure OpenAI API Key:
Get your OpenAI API key from OpenAI and set it in the Django project settings.
-
Apply database migrations:
python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Visit
http://127.0.0.1:8000/
in your web browser to interact with the ChatGPT clone.
-
Access the chatbot interface through the web browser.
-
Type a message in the input box and press Enter.
-
The chatbot will generate a response using the OpenAI GPT-3.5 Turbo model.
-
Interact with the chatbot by sending more messages.
You can customize the chatbot behavior by modifying the ask_openai
function in the views.py
file.