Skip to content

shrihareepanchal/PyAskMe

Repository files navigation

PyAskMe

An AI chat assistant built with Django, DRF, and Groq. Includes JWT auth, chat history, feedback, and a clean Tailwind UI.

Features

  • 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

Quick Start

# 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 runserver

Open http://127.0.0.1:8000 (Login/Chat/Admin links available in the UI).

.env template

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.com

Groq Model

Using a supported model:

llama-3.1-8b-instant

API (prefix: /api)

  • 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>/

Structure

accounts/   chat/   feedback/   qaskme_django/   templates/   static/

Troubleshooting

  • Demo response shows → Add GROQ_API_KEY and 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.

About

A sophisticated AI‐powered Q&A / chat assistant built with Django and DRF, PyAskMe provides secure user interaction with persistent conversational history, feedback loops, and a clean modern UI. It streamlines user queries into intelligent responses while offering administrative control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors