@yume_sibai/web-chat
v1.0.7
Published
在你的index.html中引入web-chat.umd.cjs 如下 ```html <script src="./dist/web-chat.umd.cjs?token=your_apiKey&appId=your_appId&width=100&height=100&initX=300&initY=300"></script> ``` ``` 它包含三组参数 // 第一组参数,用于连接千问 token: 你的token appId: 你的appId // 第二组参数,用于设置ai
Readme
web-chat
使用方法
在你的index.html中引入web-chat.umd.cjs 如下
<script src="./dist/web-chat.umd.cjs?token=your_apiKey&appId=your_appId&width=100&height=100&initX=300&initY=300"></script>它包含三组参数
// 第一组参数,用于连接千问
token: 你的token
appId: 你的appId
// 第二组参数,用于设置ai的宽度和高度
width: 宽度
height: 高度
// 第三组参数,用于设置ai的初始位置
initX: 初始x坐标
initY: 初始y坐标
前两个参数没有默认值;在不传宽高时,默认宽度为200,高度为200;初始坐标为屏幕的右下角测试方法
修改代码后运行npm run build,并在test.html中引入web-chat.umd.cjs
<script src="./dist/web-chat.umd.cjs?token=your_apiKey&appId=your_appId&width=100&height=100&initX=300&initY=300"></script>vs中下载插件Live Server,右键点击test.html,选择Open with Live Server
