Embeddable T-RAG LLM Chatbot Widget
Floating Chatbot
ติดตั้งในเว็บใดก็ได้
Widget สำเร็จรูปที่รองรับ Login, Register และแชทกับ AI แค่ใส่ <script> แท็กเดียวก็ใช้งานได้ ทำงานบน HTML, Next.js, PHP, Python
ทุกอย่างพร้อมใช้
ฟีเจอร์ครบถ้วนในไฟล์เดียว ไม่ต้องตั้งค่าซับซ้อน
Zero Dependency
ไฟล์ JS ไฟล์เดียว ไม่ต้องลง framework ใดๆ
Obfuscated Code
Source code ถูก obfuscate ป้องกันไม่ให้อ่าน/ลอกได้ง่าย
Dark / Light Theme
สลับ theme ได้, ปรับ primary color และ icon ตาม brand
แชทกับ AI Real-time
รองรับ WebSocket ข้อความไหลลื่นทันที
ข้ามแพลตฟอร์ม
ใช้ได้กับ HTML, Next.js, PHP, Python, Wordpress และอื่นๆ
Responsive
แสดงผลสวยทั้งบนเดสก์ทอปและมือถือ
ปรับแต่งสดๆ
สลับ Theme, เปลี่ยนสี, เลือกไอคอน — แล้วดู widget มุมขวาล่างเปลี่ยนทันที
แก้ค่าด้านบนแล้วดู widget เปลี่ยนทันที →
ติดตั้งภายใน 1 นาที
Quick start สำหรับแพลตฟอร์มที่คุณใช้
💡 วางก่อนปิดแท็ก </body> ในหน้า HTML ของคุณ
html
<!-- T-RAG LLM Chatbot Widget -->
<script
src="https://your-cdn.com/chatbot-widget.min.js"
data-api-url="https://api.yoursite.com"
data-ws-url="wss://api.yoursite.com"
data-influencer-id="1"
data-primary-color="#4f46e5"
data-theme="light"
data-icon="https://yoursite.com/chat-icon.svg"
data-position="bottom-right"
data-title="แชทกับเรา"
data-subtitle="พร้อมตอบทุกคำถาม"
defer
></script>Configuration
ปรับแต่ง widget ได้ผ่าน data attributes
| Attribute | Type | Description |
|---|---|---|
| data-api-url | string | URL ของ backend API (เช่น https://api.yoursite.com) |
| data-ws-url | string | URL ของ WebSocket (wss:// สำหรับ HTTPS) |
| data-influencer-id | number | ID ของร้านค้า/influencer |
| data-primary-color | string | สีหลัก (hex เช่น #4f46e5) |
| data-theme | light / dark | ธีมของ chat panel (default: light) |
| data-icon | string | ไอคอนปุ่ม: URL รูปภาพ, emoji (💬) หรือปล่อยว่างใช้ default |
| data-position | string | ตำแหน่ง: bottom-right (default) / bottom-left |
| data-title | string | ข้อความหัวข้อของ widget |
| data-subtitle | string | ข้อความรองของ widget |
JavaScript API
ควบคุม widget ผ่าน JavaScript ได้
AICRMChatbot.open(); // เปิด widget
AICRMChatbot.close(); // ปิด widget
AICRMChatbot.toggle(); // สลับสถานะ
AICRMChatbot.logout(); // ออกจากระบบ
AICRMChatbot.setTheme('dark'); // สลับ theme ทันที
AICRMChatbot.setPrimaryColor('#10b981'); // เปลี่ยนสีทันที
AICRMChatbot.setIcon('💬'); // เปลี่ยน icon ทันที
// Manual init (ไม่ใช้ data-attributes)
AICRMChatbot.init({
apiUrl: 'https://api.yoursite.com',
wsUrl: 'wss://api.yoursite.com',
influencerId: 1,
primaryColor: '#4f46e5',
});