
A cool demonstration of Django and openAI
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
List of frameworks/libraries used to bootstrap this project.
To Start a new Django app perform the following steps
-
Install the latest version of Python, as of this writing version 3.11.1 was installed and used to code this project.
-
Create a top-level folder to hold your project.
-
Change into that directory. Once in the directory create a new python virtual environment with the following command:
python3 -m venv venv source venv/bin/activate
-
At a minimum you will need Django and openai
pip install Django openai
-
Use the command to start the django project
django-admin startproject codebot .
-
Use the command to start a new django app
python manage.py startapp website
-
Register the app in settings.py
-
Run the django project using the command
python manage.py runserver
If you want to skip the steps above you can go ahead and clone this repo, and use my code as a starter.
-
Get a free openai API Key at https://openai.com/
-
Clone the repo
git clone https://github.com/drobb2020/codebot.git
-
Install the required packages
pip install -r requirements.txt
-
Enter your API in
.env
OPENAI_API_KEY='ENTER YOUR API'
This is a great demo of what openai is capable of doing for coders, from writing simple HTML, to writing code in multiple languages.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Your Name - @davidrobb2 - drobb2011@gmail.com
Project Link: https://github.com/drobb2020/codebot
I want to thank John Elder of Codemy.com for creating this course. Check out all of his courses at codemy.com.