bridgetown-ai-chatbot
Add the Asyntai AI chat assistant to your Bridgetown site. It answers visitor questions from your own content, in more than 80 languages.
Install
bundle add bridgetown-ai-chatbotThen add the plugin in config/initializers.rb:
Bridgetown.configure do |config|
init :"bridgetown-ai-chatbot", widget_id: "asyntai_1a2b3c4d5e6f"
endBuild the site. The chat bubble is on every page.
Where the widget ID comes from
Open the Install page in your Asyntai dashboard.
The widget ID is the value of data-asyntai-id in the snippet shown there. It
starts with asyntai_.
Creating an account is free, and the Free plan is enough to try the widget.
Options
| Option | Type | Default | What it does |
|---|---|---|---|
widget_id |
string | required | Your Asyntai widget ID |
enable_in_development |
boolean | true |
Set to false to keep the widget off the site while BRIDGETOWN_ENV is development
|
script_url |
string | the Asyntai CDN | Advanced. Load the widget from another URL |
You can also use the block form:
init :"bridgetown-ai-chatbot" do
widget_id "asyntai_1a2b3c4d5e6f"
enable_in_development false
endA missing or malformed widget_id stops the build with a message that says how
to fix it.
What the plugin does
- It adds the Asyntai loader to every HTML page, just before
</body>. That includes pages from collections, posts and pagination. - The loader waits for the page's
loadevent, so your own content always renders first. - Feeds, JSON and other non-HTML files stay as they are.
- A page that already has the Asyntai snippet keeps it and gets no second one.
It works with every template engine: ERB, Serbea and Liquid.
Tested with Bridgetown 1.3 and 2.2.
Answering from your content
Asyntai reads your published pages. Add your site URL in the dashboard, and the assistant answers from the same pages the widget sits on. You can also add extra documents and question and answer pairs.
Removing it
Delete the init line and build again. The widget is gone.
Support
Email hello@asyntai.com, or read the Bridgetown guide.
Licence
MIT. See LICENSE.