Hi everyone,
We made dash-ai-chatbot, a small open-source package that adds the Asyntai AI chat assistant to any Dash app. The assistant answers your users from your own content (your pages, documents and Q&A pairs), in more than 80 languages.
Install
pip install dash-ai-chatbot
Use
from dash import Dash, html
import dash_ai_chatbot
app = Dash(__name__)
app.layout = html.Div("Hello")
dash_ai_chatbot.init_app(app, widget_id="asyntai_1a2b3c4d5e6f")
if __name__ == "__main__":
app.run()
The chat bubble then shows on every page, also in multi-page apps.
No code change on Dash 3+
The package registers a Dash hook. Install it and set one environment variable, and every Dash app that runs with it shows the chat:
ASYNTAI_WIDGET_ID=asyntai_1a2b3c4d5e6f
Details
- Works on Dash 2, 3 and 4 (Python 3.10+)
- Works with a custom
index_string,url_base_pathname, and apps that overrideinterpolate_index - The loader waits for the page
loadevent, so your app always renders first - Never adds the widget twice
- MIT licensed
Links
- Docs: https://asyntai.com/documentation/integrations/plotly-dash/
- PyPI: Client Challenge
- GitHub: GitHub - asyntai/dash-ai-chatbot: Asyntai AI chat assistant for Plotly Dash apps. Answers your users from your own content, in 80+ languages. Β· GitHub
Feedback and ideas are welcome!