Add an AI Assistant to your `/docs` page.
Project description
DocBuddy
Add an AI assistant to your
/docspage.
Features
- 💬 AI chat assistant with full OpenAPI context
- 🤖 LLM Settings panel with local providers (Ollama, LM Studio, vLLM, Custom)
- 🔗 Tool-calling for API Requests
- 🎨 Dark/light theme support
Installation
pip install docbuddy
Quick Start
from fastapi import FastAPI
from docbuddy import setup_docs
app = FastAPI()
setup_docs(app) # replaces default /docs
That's it! Visit /docs
Configure LLM Settings
This plugin uses client-side JavaScript to connect to your local LLM provider. You can configure it in the LLM Settings tab in the Swagger UI:
- Provider: Choose your local LLM provider (Ollama, LM Studio, vLLM, or Custom)
- API URL: Enter the API endpoint for your LLM (e.g.
http://localhost:1234/v1for LMStudio) - Test Connection: Verify that the plugin can connect to your LLM provider and select a model from the drop down after.
Some local LLM providers will require additional configuration to work with the plugin. For example, LM Studio users will need to enable CORS in their LM Studio settings to allow the plugin to connect from the browser.
Using the Chat Assistant
Ask questions like:
- "What endpoints are available?"
- "Show me how to use /users"
- "Generate a curl command for /health"
Users can enable tool calling in the settings to allow the assistant to make API requests on your behalf. This allows for more interactive and dynamic conversations with the assistant.
Development
pip install -e ".[dev]"
pytest tests/
Demo Server
uvicorn examples.demo_server:app --reload
Future Developments
- More LLM providers (Azure, Hugging Face, etc.)
- Support for reasoning chains in chat and workflow
- Update styling for Authenticated API and authorize button in /docs page
- Support for other web frameworks like Flask, Django, etc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docbuddy-0.4.0.tar.gz.
File metadata
- Download URL: docbuddy-0.4.0.tar.gz
- Upload date:
- Size: 943.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef8d10406c2615878df731415231a5b7e5e7cf14e77a2b7460177d03ced694b2
|
|
| MD5 |
08e3c8276a482f7bc1727b56cf368b40
|
|
| BLAKE2b-256 |
e862fefd67ca5d72f8c2c222ebd7eaf8bf8eb242585fa04b82d86fe75354cb6e
|
File details
Details for the file docbuddy-0.4.0-py3-none-any.whl.
File metadata
- Download URL: docbuddy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 42.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c04d5692253a51ac25ac0b6a972dab39cc4e5765030602942fed1679dcdb8c2
|
|
| MD5 |
655be14309e373ae5e6c420536d96065
|
|
| BLAKE2b-256 |
03dfb5e4aa0900799ec12ede9c59024a460a1c106a71591557c7c678f7b8af65
|