chat-float-proxy
v1.0.1
Published
Support AI SSE
Maintainers
Readme
Installation
With NPM
npm install chat-float-proxyUsage
Import the Guide using TypeScript and ES6 module:
import ChatFloat from "chat-float-proxy";CDN
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/chat.iife.js'></script>Now instantiate the client to make a call to one of the APIs.
async function startChatFloat() {
const chatFloat = new ChatFloat({
floatButton: {
iconUrl: "./icon.png",
color: "white",
size: 15,
position: "right-bottom",
margin: 4,
draggable: true,
canDragSave: true,
tooltipMessages: ["有問題快來問我~"],
},
chatBox: {
margin: 4,
theme: "light",
resizable: true,
canResizeSave: true,
width: "975px",
height: "667px",
title: "測試版",
},
});
}
startChatFloat();Functions
// set theme
chatFloat.setTheme("dark");