ant-design / pro-chat

🤖 Components Library for Quickly Building LLM Chat Interfaces.
https://pro-chat.antdigital.dev
MIT License
586 stars 72 forks source link
ant-design chat chatbot pro-components pro-editor react

ProChat

Components Library for Quickly Building LLM Chat Interfaces. [![][npm-release-shield]][npm-release-link] [![][npm-downloads-shield]][npm-downloads-link] [![][github-releasedate-shield]][github-releasedate-link] [![][github-action-test-shield]][github-action-test-link] [![][github-action-release-shield]][github-action-release-link] [![][codecov-shield]][codecov-link]
[![][github-contributors-shield]][github-contributors-link] [![][github-forks-shield]][github-forks-link] [![][github-stars-shield]][github-stars-link] [![][github-issues-shield]][github-issues-link] [![][github-license-shield]][github-license-link]
[![][ant-design-shield]][ant-design-link] [![][devops-dumi-shield]][devops-dumi-link] [![][devops-father-shield]][devops-father-link] English · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) . [Report Bug][github-issues-link] · [Request Feature][github-issues-link] ![](https://gw.alipayobjects.com/zos/kitchen/Aa%2452FxhWU/pro-chat.webp)
Table of contents #### TOC - [📦 Installation](#-installation) - [Compile with Next.js](#compile-with-nextjs) - [🔨 Usage](#-usage) - [✨ Features](#-features) - [👀 Showcase](#-showcase) - [🖥 Browser compatibility](#-browser-compatibility) - [⌨️ Local Development](#️-local-development) - [🤝 Contributing](#-contributing) - [🛣️ Ecosystem](#️-ecosystem) ####

📦 Installation

[!IMPORTANT]

This package is ESM only.

To install @ant-design/pro-chat, run the following command:

$ pnpm install @ant-design/pro-chat

This project is based on antd antd-style, so if you have not installed these two dependencies, please install them.

$ pnpm install antd-style // peerDependencies
$ pnpm install antd // peerDependencies

Compile with Next.js

[!NOTE]

By work correct with Next.js SSR, add transpilePackages: ['@ant-design/pro-chat'] to next.config.js. For example:

const nextConfig = {
  transpilePackages: [
    '@ant-design/pro-chat',
    '@ant-design/pro-editor',
    'react-intersection-observer',
  ],
};

[!NOTE]

If you are using a new version of NextJs (higher than 14), you no longer need to configure transpilePackages to run in NextJs.


🔨 Usage

import { ProChat } from '@ant-design/pro-chat';

export default () => (
  <ProChat
    request={async (messages) => {
      // Send a request with Message as the parameter
      return Message; // Supports both streaming and non-streaming
    }}
  />
);


✨ Features

[!NOTE]

ProChat focuses on quickly setting up a large language model chat dialogue framework. It aims to empower developers to easily create rich, dynamic, and intuitive chat interfaces.

Framework and Solutions for Chat Interface Components:


Design Evolution / In Progress


👀 Showcase

Let's showcase some of ProChat's signature features:

Streamlined Dialogue Content Editor
Engage in Streamlined Conversations that flow as naturally as a river Refine, reshape, and perfect your dialogue with tools that allow for real-time edits.
Integrated Render
Dive into the vivid world of chat with our Built-in Render, a tool designed to bring text to life.


🖥 Browser compatibility

[!NOTE]

edge Edge chrome safari electron_48x48
Edge last 2 versions last 2 versions last 2 versions last 2 versions


⌨️ Local Development

You can use Github Codespaces for online development:

Or clone it for local development:

$ git clone https://github.com/ant-design/pro-chat.git
$ cd pro-chat
$ pnpm install
$ pnpm dev


🤝 Contributing

[!IMPORTANT]

Join our collaborative ecosystem. Your contributions are the heartbeat of our project. Here's how you can be an integral part of our vibrant community:

Every contribution, big or small, is celebrated. Join us in our mission to refine and elevate the world of open-source enterprise UI components. 😃





🛣️ Ecosystem



📝 License

Copyright © 2023 - present AFX & Ant Digital.
This project is MIT licensed.