Embed a GPT-powered chatbot into any site with one script tag.
Live demo: https://chat-widget.uft1.com
<script src="https://chat-widget.uft1.com/embed.js"></script>Local dev:
<script src="http://localhost:52873/embed.js"></script><script type="application/json" id="chat-widget-config">
{
"chatbot": {
"title": "Chat",
"instructions": "You are a helpful assistant for this website."
}
}
</script>
<script src="https://chat-widget.uft1.com/embed.js"></script>| Doc | Description |
|---|---|
| Architecture | System overview, components, message protocol |
| Embedding guide | Embed patterns, host JS API, auto-open |
| Config reference | All config fields |
| Development | Local setup, deploy, troubleshooting |
| Decisions | Architecture decision records |
- Home / demo
- Advanced setup — interactive config generator
- About
- Examples — resort, agency, marketplace demos
cp .env.sample .env # add OPENAI_API_KEY
npm install
npm run dev # http://localhost:52873See docs/development.md for full setup.
npx wrangler pages deploy public --project-name chat-widget --commit-dirty=trueLive at https://chat-widget.uft1.com (origin chat-widget-9mp.pages.dev).
Chat API is a Pages Function (functions/api/chatbot.js); the legacy
/.netlify/functions/chatbot path still works via _redirects + middleware.
Set OPENAI_API_KEY with wrangler pages secret put OPENAI_API_KEY --project-name chat-widget.