django-ai-support
This library is powered by langchain and langgraph to make easy AI support for your online shop or any website you want to create with Django.
Get started
settings
Settings should be something like this
AI_SUPPORT_SETTINGS = {
"TOOLS": [],
"SYSTEM_PROMPT": "You are the supporter of a bookstore website.",
"LLM_MODEL": model,
}
TOOLS: tools are for your AI model.
SYSTEM_PROMPT: This is important for your AI support, but the default prompt is: You are the supporter of a bookstore website. As you see.
LLM_MODEL: your chat model. like this:
model = init_chat_model("gemini-2.5-flash", model_provider="google_genai")
Be careful: LLM_MODEL can not be None.
config
Additionally, you can integrate your tools within your apps and add them to TOOLS.
For example, I have an app with the name of book. and this is inside of my tools.py file:
from langchain_core.tools import tool
from .models import Book
@tool(description="this is to get list of book with a price")
def get_books_with_price(price:int) -> str:
"""
get book with input price
Args:
price (int): price. in dollars
Returns:
str: list of books.
"""
text = ""
for book in Book.objects.filter(price=price).select_related("author"):
book_detail = f"book name: {book.name}, book price: {book.price}, Author: {book.author.first_name} {book.author.last_name}"
text += book_detail + "\n"
return text
After that, I can add this tool easily. This is inside my apps.py file:
from django.apps import AppConfig
class BookConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'book'
def ready(self):
from .tools import get_books_with_price as my_tool
from django_ai_support.conf import append_tools
append_tools([my_tool])
read more about tool calling in langchain
API
Now, you can use the chat API to talk with your AI support:
from django.urls import path
from django_ai_support.views import ChatAiSupportApi
urlpatterns = [
path("ai/", ChatAiSupportApi.as_view())
]
Metadata
Release files for django-ai-support 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_ai_support-0.1.11.tar.gz | 19.8 kB | With provenance | Details for django_ai_support-0.1.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_ai_support-0.1.11-py3-none-any.whl | Python 3 | none | any | Details for django_ai_support-0.1.11-py3-none-any.whl |
Total release size: 40.5 kB
Release files / django_ai_support-0.1.11.tar.gz
| Download URL | django_ai_support-0.1.11.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc94d8d93d2c7eb401f8865d2db57a5cd30e335a34c8b44e20e7dae098825c0d
|
|
BLAKE2b-256 checksum How to use checksums |
c8e102b6d48e2b860d6d2fbf602053c1abc94d45c4f156595d5a70ece689f3e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.
Transparency logRelease files / django_ai_support-0.1.11-py3-none-any.whl
| Download URL | django_ai_support-0.1.11-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84a51643d1e13fe0e1bbb00e2973f94c4137ad84c73a98c81e3ba4b9da2f2a06
|
|
BLAKE2b-256 checksum How to use checksums |
56dc74bcd295d78720741a3cf7633d0fed2520822c0f9e6d45fa85b8c8cbe888
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.
Transparency logSecurity for django-ai-support 0.1.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_ai_support-0.1.11.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.