Widget
Introduction
Embeddable AI chat widget
Introduction
The PerformChat Widget is an embeddable AI chat widget that allows you to integrate a fully functional conversational AI assistant into any website. It features authentication, real-time WebSocket communication, and a complete event system for customization.
Quick Start
1. Include Required Libraries
Add the following scripts to your HTML file:
<!-- Socket.IO Client (required for real-time communication) -->
<script src="https://cdn.socket.io/4.7.2/socket.io.min.js"></script>
<!-- PerformChat Widget -->
<script src="path/to/performchat-widget.min.js"></script>2. Initialize the Widget
<script>
const widget = new PerformChatWidget({
token: 'YOUR_JWT_TOKEN',
agentId: 'YOUR_AGENT_ID',
apiUrl: 'https://api.performchat.com',
conversationId: null // Optional: pass a conversation ID to load previous messages
})
</script>