🚀 Distillery Chat Widget

Embedded chat interface powered by AI & document search

Quick Start - Embed on Your Site

Follow these simple steps to add the Distillery Chat Widget to your website:

Step 1: Copy the Script Tag

Copy this script tag and paste it into your HTML file, preferably just before the closing </body> tag:

<script src="https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js"></script>

Step 2: That's It!

✅ No additional configuration needed!

The chat widget will automatically initialize and appear as a floating orange bubble in the bottom-right corner of your website. It's completely self-contained and works out of the box.

Complete Example

Here's a minimal HTML example:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Website with Chat Widget</title> </head> <body> <h1>Welcome to My Site</h1> <p>Your website content here...</p> <!-- Embed the Distillery Chat Widget --> <script src="https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js"></script> </body> </html>

What Happens Next?

Requirements

Deployment URLs

Chat Widget

Full-page Chat:

https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev

Embedded Script:

https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js

API & Backend

API Worker:

https://distillery-chatbot-api-worker-preview.accessibott.workers.dev

Admin Panel:

https://admin.distillery-chatbot-preview.pages.dev

API Endpoints

The chat widget uses the following endpoints to communicate with the backend:

Chat Operations

Document Management

Security

✓ CORS Enabled

All origins are allowed, enabling the widget to work on any external website without CORS restrictions.

Features

Technical Details

Script Information

  • File: distillery-chat-widget.iife.js
  • Size: ~156KB (uncompressed)
  • Size (gzipped): ~50KB
  • Format: IIFE (Immediately Invoked Function Expression)
  • React: Bundled v18

Backend Integration

  • Platform: Cloudflare Workers
  • Embeddings: Cloudflare Vectorize
  • LLM: Cloudflare AI
  • Database: NeonDB PostgreSQL
  • Storage: Cloudflare R2

Framework Integration Examples

React / Next.js

// In your _app.tsx or _document.tsx import Script from 'next/script' export default function App({ Component, pageProps }) { return ( <> <Component {...pageProps} /> <Script src="https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js" strategy="afterInteractive" /> </> ) }

Vue.js

// In your main.ts or main.js import { createApp } from 'vue' import App from './App.vue' const app = createApp(App) // Load chat widget const script = document.createElement('script') script.src = 'https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js' document.body.appendChild(script) app.mount('#app')

Angular

// In your index.html, before closing </body> tag <script src="https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js"></script>

WordPress / Static HTML

<script src="https://cloudflare-ai-worker-with-la.distillery-chatbot-chat-widget-preview.pages.dev/distillery-chat-widget.iife.js"></script>

Live Preview

👉 Test the chat widget now!

Look for the orange chat bubble in the bottom-right corner of this page. Click it to open the chat window and start chatting with our AI assistant. Try asking questions about documents in the knowledge base.

Troubleshooting

Widget not appearing?

Check the following:

1. Ensure the script tag is placed in your HTML
2. Verify JavaScript is enabled in your browser
3. Check the browser console for any errors (F12 → Console tab)
4. Make sure you're using the correct script URL
5. Check that your website allows external scripts

Chat not connecting?

Possible causes:

1. API backend may be down (check API status)
2. Check browser console for CORS errors
3. Verify your network connection
4. Try refreshing the page

Mobile responsiveness issue?

The widget automatically adapts:

The chat widget is fully responsive and automatically adjusts for mobile, tablet, and desktop screens. On mobile, it opens as a full-screen chat interface for better UX.

Support & More Information

Need help?

For questions or issues with integrating the chat widget, please contact the development team or check the documentation on this page. The widget is designed to be simple to integrate and requires no additional configuration.