pip install dj_chatbotAdd 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_chatbotdoes not pull in any LLM provider SDK by default — install the matchinglangchain-<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 migrateRender the widget in any template:
{% load dj_chatbot_tags %}
{% chatbot_widget title="Support Bot" welcome_message="Hi! How can I help?" %}Read the full docs here.
A minimal Django project using dj_chatbot lives in example/ as a reference integration.
