An AI chat assistant built with Django, DRF, and Groq. Includes JWT auth, chat history, feedback, and a clean Tailwind UI.
- JWT authentication (login/register/logout)
- Chat with AI (Groq) + persistent history
- Edit messages and regenerate responses
- Admin via Django admin
- CORS configured for local dev
# 1) Activate virtualenv
# If not created: python -m venv venv
.\venv\Scripts\activate
# 2) Install deps
python -m pip install -r requirements.txt
# 3) Create .env (copy from env.example) and set GROQ_API_KEY
# 4) Migrate
python manage.py migrate
# 5) Run
python manage.py runserverOpen http://127.0.0.1:8000 (Login/Chat/Admin links available in the UI).
SECRET_KEY=change-me
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
USE_POSTGRES=False
GROQ_API_KEY=your-real-groq-key
ADMIN_EMAIL=admin@pyaskme.comUsing a supported model:
llama-3.1-8b-instant
- Auth:
/api/auth/login/,/api/auth/register/,/api/auth/logout/ - Chat:
/api/ai/chat/,/api/ai/getall/,/api/ai/get/<id>/,/api/ai/delete/<id>/,/api/ai/edit/<chat_id>/<message_id>/
accounts/ chat/ feedback/ qaskme_django/ templates/ static/
- Demo response shows → Add
GROQ_API_KEYand restart. - 401 on chat → Log in again; token is added automatically.
- Model error → Updated to
llama-3.1-8b-instant. - Missing icon 404 → Optional; add
static/pyaskme-icon.svg.