@ant-design/pro-chat

中文文档
1.15.3发布于 2024/10/15MITTypeScriptESM + CJS近 30 天下载 4896

a solution for ai chat

原始使用文档
文档目录9 节
  1. 📦 Installation
  2. Compile with Next.js
  3. 🔨 Usage
  4. ✨ Features
  5. 👀 Showcase
  6. 🖥 Browser compatibility
  7. ⌨️ Local Development
  8. 🤝 Contributing
  9. 🛣️ Ecosystem

ProChat

Components Library for Quickly Building LLM Chat Interfaces.



English · 简体中文 · Changelog . Report Bug · Request Feature

Table of contents

TOC

📦 Installation

[!IMPORTANT]

This package is ESM only.

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

$ pnpm install @ant-design/pro-chat

The default auto-install-peers in pnpm is true. If you use other package managers, you may need to install antd and antd-style separately.

Compile with Next.js

If you have some errors when using Next.js, check here.

🔨 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:

  • 🔄 Automatic Chat Caching: Maintains conversation continuity without any extra effort, ensuring a smooth user experience.
  • 💬 Streamlined Conversations: Offers the choice between different conversation styles, catering to diverse user preferences.
  • ✏️ Message Editing Features: Provides a suite of editing tools, including request redo, edit combination, and deletion, for precise conversation control.
  • 📖 Auto-rendered Markdown: Delivers a rich text experience that immerses users by transforming Markdown into beautifully formatted messages.
  • 🎚️ Programmatic Controls (Ref): Commands the chat flow with precision, allowing developers to create a tailored conversational experience.

Design Evolution / In Progress

  • Customized Dialogue Rendering with Edit Capabilities - issue/21
  • Enhanced Request Parameters - The power to infuse additional parameters into your requests is on the horizon
  • Personalized Error Handling - Craft unique fallbacks and configurations for those unexpected moments
  • Expanded Documentation & Globalization - Access comprehensive guides and international support for a truly borderless experience
  • Atomic Component Design - Anticipate a modular approach to design that promises both simplicity and versatility

👀 Showcase

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

Streamlined DialogueContent Editor
Engage in Streamlined Conversations that flow as naturally as a riverRefine, 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]

edgeEdgechromesafarielectron_48x48
Edgelast 2 versionslast 2 versionslast 2 versionslast 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:

  • Integrate and Innovate: Incorporate Ant Design Pro, umi, and ProChat into your projects. Your real-world usage and feedback are invaluable to us.
  • Voice Your Insights: Encounter a glitch? Have a query? Your perspectives matter. Share them by submitting issues and help us enhance the user experience.
  • Shape the Future: Have code enhancements or feature ideas? We invite you to propose pull requests and contribute directly to the evolution of our codebase.

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

  • ProComponents - Designed for Enterprise-Level Application, Use Ant Design like a Pro!.
  • ProEditor - The Ultimate Editor UI Framework and Components.
  • ProFlow - A Flow Editor Framework base on React-Flow.
  • ProChat - Components Library for Quickly Building LLM Chat Interfaces.


📝 License

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

版本与发布记录

@ant-design/pro-chat 共发布 115 个版本,首次发布于 2023/10/20;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.15.3latest2024/10/152 年前
2.4.4beta2024/09/192 年前
2.4.32024/09/182 年前
2.4.22024/09/032 年前
1.15.2-cannay.1canary2024/08/192 年前
1.15.2-cannay.02024/08/192 年前

其他发布通道:next → 2.1.0,canary → 1.15.2-cannay.1,beta → 2.4.4。

关于 @ant-design/pro-chat 的常见问题

@ant-design/pro-chat 是什么?

a solution for ai chat

如何安装 @ant-design/pro-chat?

在项目目录运行 npm install @ant-design/pro-chat,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:antd(^5)、react(^18)、antd-style(^3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ant-design/pro-chat 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ant-design/pro-chat 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@ant-design/pro-chat 可以商用吗?

@ant-design/pro-chat 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@ant-design/pro-chat 的下载量有多少?

根据 npm 官方下载统计,@ant-design/pro-chat 在 2026/10/06 – 2026/11/04 这 30 天内被下载 4,896 次,日均约 163 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ant-design/pro-chat 还在维护吗?

最新版本 1.15.3 发布于 2024/10/15(2 年前);至今共发布 115 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/10/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。