Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 1.65 KB

File metadata and controls

71 lines (46 loc) · 1.65 KB

DJ Chatbot

Python Django Code style: ruff License

A Django package for adding AI-powered chatbot widgets to your project.

📚 Documentation

DJ Chatbot Demo

Installation

pip install dj_chatbot

Configuration

Add dj_chatbot to your INSTALLED_APPS and configure the model:

# settings.py
INSTALLED_APPS = [
    # ...
    "dj_chatbot",
]

DJ_CHATBOT_MODEL = "openai:gpt-4o-mini"
DJ_CHATBOT_API_KEY = "..."

Note: dj_chatbot does not pull in any LLM provider SDK by default — install the matching langchain-<provider> package for your model (e.g. pip install langchain-openai).

Include the URLs and run migrations:

# urls.py
from django.urls import include, path

urlpatterns = [
    path("chatbot/", include("dj_chatbot.urls")),
]
python manage.py migrate

Render the widget in any template:

{% load dj_chatbot_tags %}

{% chatbot_widget title="Support Bot" welcome_message="Hi! How can I help?" %}

Documentation

Read the full docs here.

Example project

A minimal Django project using dj_chatbot lives in example/ as a reference integration.