TIA Chatbot Widget - A reusable CDN widget for integrating TIA chatbot into any website
npm install tia-chatbotA reusable CDN widget for integrating the TIA chatbot into any website.
``bash`
npm install tia-widget
`html`
Since the widget is built as a library interacting with React, you must include React and ReactDOM before the widget script.
`html`
Use the mountChainlitWidget function to initialize the widget with your configuration.
`html`
The previous initialization methods (window.TIAWidget.init and data attributes) still work.
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| chainlitServer | string | https://v2.tia.ascenthr.ai | The API endpoint URL for the chatbot. |accessToken
| | string | undefined | The Bearer token for authentication. |serverUrl
| | string | undefined | Alias for chainlitServer. |token
| | string | undefined | Alias for accessToken. |containerId
| | string | 'tia-widget-root' | The ID of the DOM element where the widget will be mounted. |onError
| | function | console.error | Error handler function. |
`bash`
npm run build
npm publish
`bashInstall dependencies
npm install
MIT