hi, 大家好, 我是徐小夕, 最近在 github
上看到一款非常有意思的开源项目, 定位是开箱即用的大模型对话前端解决方案, 我们使用它可以轻松构建聊天组件, 并且可以一键集成主流 AI
大模型, 比如 通义千问
, ChatGpt
等. (让前端再也不用从零写聊天组件了~)
我会在文末贴上这款 开源聊天组件
的文档地址和 github
地址.
组件demo演示
功能亮点
我根据自己的使用和实践, 总结一下这款开源聊天组件的亮点:
简单易用, 设计语言统一
它是基于 antd
组件库进行的二次封装, 所以我们可以轻松的在 antd
项目中使用, 保持 UI
视觉的统一.
使用啊安装方式如下:
# @ant-design/pro-editor 基于 antd 和 antd-style,需要在项目中安装
$ npm install antd antd-style -S
$ npm install @ant-design/pro-chat -S
使用:
import { ProChat } from '@ant-design/pro-chat';
import { useTheme } from 'antd-style';
export default () => {
const theme = useTheme();
return (
<div style={
{ background: theme.colorBgLayout }}>
<ProChat
helloMessage={
'欢迎使用 ProChat ,我是你的专属机器人,