thien-ha-rag-chat-widget
v0.0.1
Published
A customizable React chat widget for RAG applications
Downloads
69
Maintainers
Readme
Aletech RAG Chat Widget
A lightweight, customizable chat widget for seamless integration into any website. Built with React, the Aletech RAG Chat Widget is easy to add to any HTML page or web application using a CDN.
Quick Start with CDN
Integrate the Aletech RAG Chat Widget into your HTML by using a CDN link. This approach requires no installation or build setup.
Usage in HTML
Simply add the following code to your HTML file. The widget will load directly from the CDN, and you can initialize it using the provided renderChatWidget
function.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Aletech RAG Chat Widget</title>
</head>
<body>
<div id="chat-widget-root"></div>
<!-- Load the Chat Widget script from a CDN -->
<script src="https://unpkg.com/aletech-rag-chat-widget@latest/dist/chat-widget.iife.js"></script>
<script>
// Initialize and render the ChatWidget in the specified element
renderChatWidget("chat-widget-root");
</script>
</body>
</html>
Alternatively, you can use jsDelivr as the CDN:
<script src="https://cdn.jsdelivr.net/npm/aletech-rag-chat-widget@latest/dist/chat-widget.iife.js"></script>
Notes
- Versioning: Replace
@latest
with a specific version (e.g.,@1.0.0
) if you want to lock to a particular release. - Styling: The widget's CSS is included in the JavaScript file, so no additional CSS files are needed.
License
This project is licensed under the MIT License.