Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@xiaoloo/ai-chat

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiaoloo/ai-chat

## 本地开发

latest
npmnpm
Version
1.0.2
Version published
Weekly downloads
4
-55.56%
Maintainers
1
Weekly downloads
 
Created
Source

ai-chat

本地开发

pnpm install
pnpm run dev

本地联调

pnpm run build
# 在sz root目录
pnpm link xx/xx/ai-chat

用户信息

// 用户信息,避免使用admin,多人同时在线会导致冲突
登录sz用户,获取token和id

推送到私服

修改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'
  • 属性
属性名类型默认备注
userIdstring''用户id
userNamestring''用户名称
userTokenstring''用户token
aiChatTitlestring''聊天标题
aiChatPrefixstring''聊天接口代理前缀
fileOptions.maxSizenumber100 * 1024 * 1024文件上传最大大小
fileOptions.maxCountnumber5文件上传最大数量
fileOptions.uploadFnfunction文件上传函数,参数为文件列表,返回promise,结果{url: ''}
  • slots
<!-- 聊天标题 -->
<template #chat-title></template>
<!-- 聊天快捷指令 -->
<template #chat-prompts></template>

  • 方法
// 手动发送消息
manualSend(message)    

FAQs

Package last updated on 12 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts