Предоставить пользователю сервис, на котором можно быстро создать голосование и собрать мнения пользователей касательно какого-либо вопроса.
Получилось: сайт, где вы создаете анкету с вопросами, отправляете её знакомым, и после прохождения опроса получаете список подарков, сформированный моделью ChatGPT-3.5.
- ChatGPT 3.5+
- Python 3.8+
- Django 4.1+
- SQLite 3.22+
Склонируйте репозиторий проекта с помощью Git:
git clone https://github.com/akarmain/GPT-gift
cd GPT-gift
Создайте виртуальное окружение:
python -m venv venv
Активируйте виртуальное окружение:
- На Windows:
venv\Scripts\activate
- На macOS и Linux:
source venv/bin/activate
Установите необходимые пакеты в виртуальное окружение:
pip install -r requirements.txt
Сгенерируйте уникальный секретный ключ для приложения и добавьте его в файл .env
в переменную SECRET_KEY
:
python manage.py shell -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
Добавьте ключ API ChatGPT в файл .env
в переменную OPENAI_API_KEY
.
Запустите сервер разработки:
python3 manage.py runserver
Спасибо, что читаете наш код!