Skip to content

Commit

Permalink
📝 docs: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Sep 12, 2023
1 parent c65094c commit 7c1df27
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 43 deletions.
46 changes: 42 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-performance chatbot framework. <br/> It supports one-click free deployment of your private ChatGPT/LLM web application.

**English** · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Report Bug][issues-url] · [Request Feature][issues-url]
**English** · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Wiki][wiki-url] · [Report Bug][issues-url] · [Request Feature][issues-url]

<!-- SHIELD GROUP -->

Expand All @@ -26,7 +26,7 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform

[![Deploy with Vercel][deploy-button-image]][deploy-url]

![](https://gw.alipayobjects.com/zos/kitchen/3uH7fYVvfO/lobechat.webp)
![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)

</div>

Expand All @@ -39,6 +39,8 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform

- [✨ Features](#-features)

- [📸 Snapshot](#-snapshot)

- [🛳 Self Hosting](#-self-hosting)

- [Keep Updated](#keep-updated)
Expand Down Expand Up @@ -90,6 +92,42 @@ Please be aware that LobeChat is currently under active development,feedback i

</div>

## 📸 Snapshot

![](https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp)

**Progress Web App**

Utilize the Progressive Web Application ([PWA](https://support.google.com/chrome/answer/9658361)) technology to achieve a seamless LobeChat experience on your computer or mobile device.

> **Note**\
> If you are unfamiliar with the installation process of PWA, you can add LobeChat as your desktop application (also applicable to mobile devices) by following these steps:
>
> - Launch the Chrome or Edge browser on your computer
> - Visit the LobeChat webpage
> - In the upper right corner of the address bar, click on the <kbd>Install</kbd> icon
> - Follow the instructions on the screen to complete the PWA installation
![](https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp)

**Theme Mode Selection**

LobeChat provides two theme modes, light and dark, along with color customization options. By default, the theme follows the system settings, but you can also manually switch in the settings.

![](https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp)

**Mobile Device Adaptation**

We have designed a series of adaptations for mobile devices to enhance user experience. We are currently iterating the version for mobile experience, and we welcome any suggestions or ideas you might have.

> 🚧 Additional snapshots and demonstrations are being progressively added...
<div align="right">

[![][back-to-top]](#readme-top)

</div>

## 🛳 Self Hosting

LobeChat provides a [self-hosted version][deploy-url] with Vercel. This allows you to build your own chatbot within a few minutes, without any prior knowledge. If you want to deploy this service yourself, you can follow these steps:
Expand Down Expand Up @@ -212,8 +250,7 @@ Contributions of all types are more than welcome, if you are interested in contr

---

<details>
<summary><h4>📝 License</h4></summary>
<details><summary><h4>📝 License</h4></summary>

[![][fossa-license-shield]][fossa-license-url]

Expand Down Expand Up @@ -277,3 +314,4 @@ This project is [MIT](./LICENSE) licensed.
[submit-agents-url]: https://github.com/lobehub/lobe-chat-agents
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
[submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
[wiki-url]: https://github.com/lobehub/lobe-chat/wiki
50 changes: 46 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性能聊天机器人框架。<br/> 它支持一键免费部署私人 ChatGPT/LLM 网页应用程序。

[English](./README.md) · **简体中文** · [更新日志](./CHANGELOG.md) · [报告问题][issues-url] · [请求功能][issues-url]
[English](./README.md) · **简体中文** · [更新日志](./CHANGELOG.md) · [文档][wiki-url] · [报告问题][issues-url] · [请求功能][issues-url]

<!-- SHIELD GROUP -->

Expand All @@ -26,7 +26,7 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性

[![Deploy with Vercel][deploy-button-image]][deploy-url]

![](https://gw.alipayobjects.com/zos/kitchen/3uH7fYVvfO/lobechat.webp)
![](https://gw.alipayobjects.com/zos/kitchen/RKnWrrfuMl/welcome.webp)

</div>

Expand All @@ -39,6 +39,8 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性

- [✨ 功能特性](#-功能特性)

- [📸 快照预览](#-快照预览)

- [🛳 开箱即用](#-开箱即用)

- [保持更新](#保持更新)
Expand Down Expand Up @@ -90,6 +92,46 @@ LobeChat 是一个开源的、可扩展的([Function Calling][fc-url])高性

</div>

## 📸 快照预览

![](https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp)

**PWA 渐进式 Web 应用**

利用渐进式 Web 应用 [PWA](https://support.google.com/chrome/answer/9658361) 技术,您可在电脑或移动设备上实现流畅的 LobeChat 体验。

> **Note**\
> 若您未熟悉 PWA 的安装过程,您可以按照以下步骤将 LobeChat 添加为您的桌面应用(也适用于移动设备):
>
> - 在电脑上运行 Chrome 或 Edge 浏览器
> - 访问 LobeChat 网页
> - 在地址栏的右上角,单击 <kbd>安装</kbd> 图标
> - 根据屏幕上的指示完成 PWA 的安装
<br/>

![](https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp)

**主题模式选择**

LobeChat 提供了亮色和暗色两种主题模式以及颜色定制选项,默认情况下,主题会跟随系统设置,您也可以在设置中手动切换。

<br/>

![](https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp)

**移动设备适配**

我们针对移动设备进行了一系列适配设计以提升用户体验。目前我们正在对移动端的体验进行版本迭代,如果您有任何建议或想法,我们非常欢迎您提供反馈。

> 🚧 更多快照和演示正在陆续添加中...
<div align="right">

[![][back-to-top]](#readme-top)

</div>

## 🛳 开箱即用

LobeChat 提供了 Vercel 的 [自托管版本][deploy-url]。这使你可以在几分钟内构建自己的聊天机器人,无需任何基础知识。如果想自己部署该服务,可以按照以下步骤进行操作:
Expand Down Expand Up @@ -212,8 +254,7 @@ $ pnpm dev

---

<details>
<summary><h4>📝 License</h4></summary>
<details><summary><h4>📝 License</h4></summary>

[![][fossa-license-shield]][fossa-license-url]

Expand Down Expand Up @@ -277,3 +318,4 @@ This project is [MIT](./LICENSE) licensed.
[submit-agents-url]: https://github.com/lobehub/lobe-chat-agents
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
[submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
[wiki-url]: https://github.com/lobehub/lobe-chat/wiki
2 changes: 2 additions & 0 deletions docs/Deploy-with-Azure-OpenAI.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ You can fill in the corresponding configuration items as needed:

After completing the above field configuration, click on "Check". If the prompt says "Check Passed", it means the configuration was successful.

<br/>

## Configuration at Deployment

If you want the deployed version to be directly configured with Azure OpenAI for end users to use immediately, you need to configure the following environment variables at deployment:
Expand Down
2 changes: 2 additions & 0 deletions docs/Deploy-with-Azure-OpenAI.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型

完成上述字段配置后,点击「检查」,如果提示「检查通过」,则说明配置成功。

<br/>

## 在部署时配置

如果你希望部署的版本直接配置好 Azure OpenAI,让终端用户直接使用,那么你需要在部署时配置以下环境变量:
Expand Down
6 changes: 4 additions & 2 deletions docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform

- [Plugin Index and Submit][plugin-index] | [插件索引与提交][plugin-index-cn]
- [Plugin Development](Plugin-Development) | [插件开发](Plugin-Development.zh-CN)
- [Plugin SDK Docs][plugin-sdk] | [插件 SDK 文档][plugin-skd-cn]

---

<details>
<summary><h4>📝 License</h4></summary>
<details><summary><h4>📝 License</h4></summary>

[![][fossa-license-shield]][fossa-license-url]

Expand All @@ -52,4 +52,6 @@ This project is [MIT][license-url] licensed.
[license-url]: https://github.com/lobehub/lobe-chat/blob/main/LICENSE
[plugin-index]: https://github.com/lobehub/lobe-chat-plugins
[plugin-index-cn]: https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md
[plugin-sdk]: https://chat-plugin-sdk.lobehub.com
[plugin-skd-cn]: https://chat-plugin-sdk.lobehub.com
[profile-url]: https://github.com/lobehub
56 changes: 44 additions & 12 deletions docs/Plugin-Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

- [Custom Plugin Workflow](#custom-plugin-workflow)

- [1. Create and Start a Plugin Project](#1-create-and-start-a-plugin-project)
- [2. Add the Local Plugin in LobeChat Role Settings](#2-add-the-local-plugin-in-lobechat-role-settings)
- [3. Test the Plugin Functionality in a Session](#3-test-the-plugin-functionality-in-a-session)
- [**`1`** Create and Start a Plugin Project](#1-create-and-start-a-plugin-project)
- [**`2`** Add the Local Plugin in LobeChat Role Settings](#2-add-the-local-plugin-in-lobechat-role-settings)
- [**`3`** Test the Plugin Functionality in a Session](#3-test-the-plugin-functionality-in-a-session)

- [Local Plugin Development](#local-plugin-development)

Expand All @@ -19,6 +19,10 @@

- [Plugin Deployment and Publication](#plugin-deployment-and-publication)

- [Plugin Shield](#plugin-shield)

- [Link](#link)

## Plugin Composition

A LobeChat plugin consists of the following components:
Expand All @@ -30,11 +34,13 @@ A LobeChat plugin consists of the following components:
- **Server-side**: Implement the API capabilities described in the manifest.
- **Frontend UI** (optional): Implement the interface described in the manifest, which will be displayed in plugin messages to provide richer information display than plain text.

<br/>

## Custom Plugin Workflow

To integrate a plugin into LobeChat, you need to add and use a custom plugin in LobeChat. This section will guide you through the process.

### 1. Create and Start a Plugin Project
### **`1`** Create and Start a Plugin Project

First, you need to create a plugin project locally. You can use the [lobe-chat-plugin-template][lobe-chat-plugin-template-url] template we have prepared:

Expand All @@ -49,31 +55,31 @@ When you see `ready started server on 0.0.0.0:3400, url: http://localhost:3400`,

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259526-9ef25272-4312-429b-93bc-a95515727ed3.png)

### 2. Add the Local Plugin in LobeChat Role Settings
### **`2`** Add the Local Plugin in LobeChat Role Settings

Next, go to LobeChat, create a new assistant, and go to its session settings page:

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259643-1a9cc34a-76f3-4ccf-928b-129654670efd.png)

Click the "Add" button on the right side of "Plugin List" to open the custom plugin add dialog:
Click the <kbd>Add</kbd> button on the right side of "Plugin List" to open the custom plugin add dialog:

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259748-2ef6a244-39bb-483c-b359-f156ffcbe1a4.png)

Enter `http://localhost:3400/manifest-dev.json` in the "Plugin Manifest URL" field, which is the URL of the locally started plugin manifest.
Enter `http://localhost:3400/manifest-dev.json` in the `Plugin Manifest URL` field, which is the URL of the locally started plugin manifest.

At this point, you should see that the identifier of the plugin has been automatically recognized as `chat-plugin-template`. Then fill in the remaining form fields (only the title is required) and click the "Save" button to complete the custom plugin addition.
At this point, you should see that the identifier of the plugin has been automatically recognized as `chat-plugin-template`. Then fill in the remaining form fields (only the title is required) and click the <kbd>Save</kbd> button to complete the custom plugin addition.

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265259964-59f4906d-ae2e-4ec0-8b43-db36871d0869.png)

After adding the plugin, you can see the newly added plugin in the plugin list. If you need to modify the plugin's configuration, you can click the "Settings" button to make changes.
After adding the plugin, you can see the newly added plugin in the plugin list. If you need to modify the plugin's configuration, you can click the <kbd>Settings</kbd> button to make changes.

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260093-a0363c74-0b5b-48dd-b103-2db6b4a8262e.png)

### 3. Test the Plugin Functionality in a Session
### **`3`** Test the Plugin Functionality in a Session

Next, we need to test the functionality of the custom plugin.

Click the "Back" button to go back to the session area, and then send a message to the assistant: "What should I wear?" The assistant will try to ask you about your gender and current mood.
Click the <kbd>Back</kbd> button to go back to the session area, and then send a message to the assistant: "What should I wear?" The assistant will try to ask you about your gender and current mood.

![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/265260291-f0aa0e7c-0ffb-486c-a834-08e73d49896f.png)

Expand All @@ -83,6 +89,8 @@ After answering, the assistant will make a plugin call to retrieve recommended c

After completing these steps, you have learned the basic process of adding and using a custom plugin in LobeChat.

<br/>

## Local Plugin Development

In the previous workflow, we have learned how to add and use a plugin. Now let's focus on the development process of custom plugins.
Expand Down Expand Up @@ -248,15 +256,39 @@ const Render = memo(() => {
export default Render;
```

<br/>

## Plugin Deployment and Publication

After completing the plugin development, you can deploy the plugin using your preferred method. For example, you can use Vercel or package it as a Docker image for publication.

If you want more people to use your plugin, you are welcome to submit it for review in the plugin marketplace.

[![][submit-plugin-shield]][submit-plugin-url]

### Plugin Shield

[![lobe-chat-plugin](https://img.shields.io/badge/%F0%9F%A4%AF_LobeChat-plugin-cyan)](https://github.com/lobehub/lobe-chat-plugins)

```markdown
[![lobe-chat-plugin](https://img.shields.io/badge/%F0%9F%A4%AF_LobeChat-plugin-cyan)](https://github.com/lobehub/lobe-chat-plugins)
```

<br/>

## Link

- **📘 Pluging SDK Docs**: <https://chat-plugin-sdk.lobehub.com>
- **🚀 chat-plugin-template**: <https://github.com/lobehub/chat-plugin-template>
- **🧩 chat-plugin-sdk**: <https://github.com/lobehub/chat-plugin-sdk>
- **🚪 chat-plugin-sdk**: <https://github.com/lobehub/chat-plugin-gateway>
- **🏪 lobe-chat-plugins**: <https://github.com/lobehub/lobe-chat-plugins>

<!-- LINK GROUP -->

[fetch-plugin-message-url]: https://github.com/lobehub/chat-plugin-template
[lobe-chat-plugin-template-url]: https://github.com/lobehub/chat-plugin-template
[manifest-docs-url]: https://github.com/lobehub/chat-plugin-sdk/tree/master/docs/manifest.zh-CN.md
[manifest-docs-url]: https://chat-plugin-sdk.lobehub.com/guides/plugin-manifest
[plugin-error-type-url]: https://github.com/lobehub/chat-plugin-template
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-50E3C2?style=for-the-badge
[submit-plugin-url]: https://github.com/lobehub/lobe-chat-plugins
Loading

0 comments on commit 7c1df27

Please sign in to comment.