0.0.14 • Published 4 months ago
@zxsz/ai-chat v0.0.14
ai-chat
本地开发
pnpm run dev
推送到私服
修改package.json
中版本号
pnpm run build
npm publish
安装使用
- 安装
pnpm add @zxsz/ai-chat
- 使用
import '@zxsz/ai-chat/dist/index.css';
import { ChatIndex } from '@zxsz/ai-chat'
- 属性
属性名 | 类型 | 默认 | 备注 |
---|---|---|---|
userId | string | '' | 用户id |
userName | string | '' | 用户名称 |
userToken | string | '' | 用户token |
aiChatTitle | string | '' | 聊天标题 |
aiChatPrefix | string | '' | 聊天接口代理前缀 |
fileOptions.maxSize | number | 100 1024 1024 | 文件上传最大大小 |
fileOptions.maxCount | number | 5 | 文件上传最大数量 |
fileOptions.uploadFn | function | 文件上传函数,参数为文件列表,返回promise,结果{url: ''} |
- slots
<!-- 聊天标题 -->
<template #chat-title></template>
<!-- 聊天快捷指令 -->
<template #chat-prompts></template>
- 方法
// 手动发送消息
manualSend(message)