Skip to content

Commit

Permalink
📝 docs: Add topics usage
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 authored Nov 1, 2023
1 parent 1e1b21b commit 2b18a80
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 35 deletions.
32 changes: 16 additions & 16 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community includes:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

## Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct that could reasonably be considered inappropriate in a
- Other conduct that could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand All @@ -116,13 +116,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ This ensures you're working on the most current version of Lobe Chat. Stay fresh

Thank you for making Lobe Chat even more magical. We can't wait to see what you create! 🌠

Happy Coding! 🚀🦄
Happy Coding! 🚀🦄
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ Please be aware that LobeChat is currently under active development, and feedbac
![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670883-33c43a5c-a512-467e-855c-fa299548cce5.png)

#### `1` Function Calling Plugin System
By establishing a versatile plugin system, ChatGPT becomes capable of delivering real-time news updates and enhancing your ability to interact with documents and e-commerce data more effectively. This extended functionality positions ChatGPT as a valuable resource across diverse domains. If you have an interest in creating plugins, we offer comprehensive component development documentation, software development kits (SDKs), and pre-made templates in the [🧩 Plugin System](#-Plugin-System) section below. Join us in our collective efforts to empower ChatGPT, making it both more potent and user-friendly.

By establishing a versatile plugin system, ChatGPT becomes capable of delivering real-time news updates and enhancing your ability to interact with documents and e-commerce data more effectively. This extended functionality positions ChatGPT as a valuable resource across diverse domains. If you have an interest in creating plugins, we offer comprehensive component development documentation, software development kits (SDKs), and pre-made templates in the [🧩 Plugin System](#-Plugin-System) section below. Join us in our collective efforts to empower ChatGPT, making it both more potent and user-friendly.

<br/>

Expand Down
12 changes: 6 additions & 6 deletions docs/Deploy-with-Azure-OpenAI.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ After completing the above field configuration, click on "Check". If the prompt

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:

| Environment Variable | Required | Description | Default Value | Example |
| -------------------- | -------- | --------------------------------------------------------------------------------- | ------------------ | ------------------------------------------------------------- |
| `USE_AZURE_OPENAI` | Yes | Set this value to `1` to enable Azure OpenAI configuration | - | `1` |
| `AZURE_API_KEY` | Yes | This is the API key you applied for on the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` |
| `OPENAI_PROXY_URL` | Yes | Azure API address, can be found in the "Keys and Endpoints" section | - | `https://docs-test-001.openai.azure.com` |
| Environment Variable | Required | Description | Default Value | Example |
| -------------------- | -------- | --------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------------- |
| `USE_AZURE_OPENAI` | Yes | Set this value to `1` to enable Azure OpenAI configuration | - | `1` |
| `AZURE_API_KEY` | Yes | This is the API key you applied for on the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` |
| `OPENAI_PROXY_URL` | Yes | Azure API address, can be found in the "Keys and Endpoints" section | - | `https://docs-test-001.openai.azure.com` |
| `AZURE_API_VERSION` | No | Azure's API version, follows the YYYY-MM-DD format | 2023-08-01-preview | `2023-05-15`, refer to [latest version][azure-api-version-url] |
| `ACCESS_CODE` | No | Add a password to access this service, the password should be 6 digits or letters | - | `awCT74` or `e3@09!` |
| `ACCESS_CODE` | No | Add a password to access this service, the password should be 6 digits or letters | - | `awCT74` or `e3@09!` |

> **Note**\
> When you enable `USE_AZURE_OPENAI` on the server side, users will not be able to modify and use the OpenAI key in the front-end configuration.
Expand Down
5 changes: 4 additions & 1 deletion docs/Home.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform

### 🤯 LobeChat Usage

- [Custom Agents Guide](Agents) | [自定义助手指南](Agents.zh-CN)
- [Custom Agents Guide](Usage-Agents) | [助手自定义](Usage-Agents.zh-CN)
- [Topics Guide](Usage-Topics) | [指南话题](Usage-Topics.zh-CN)

---

Expand Down Expand Up @@ -45,6 +46,8 @@ LobeChat is a open-source, extensible ([Function Calling][fc-url]), high-perform

- [Lighthouse Report](Lighthouse) | [性能测试](Lighthouse.zh-CN)

---

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

[![][fossa-license-shield]][fossa-license-url]
Expand Down
18 changes: 9 additions & 9 deletions docs/Agents.md → docs/Usage-Agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#### TOC

- [Adding Custom Agents](#adding-custom-agents)
- [A. Add through the Agent Marketplace](#a-add-through-the-agent-marketplace)
- [B. Create a Custom Agent](#b-create-a-custom-agent)
- [`A` Add through the Agent Marketplace](#a-add-through-the-agent-marketplace)
- [`B` Create a Custom Agent](#b-create-a-custom-agent)
- [Basic Concepts of Prompts](#basic-concepts-of-prompts)
- [How to write a structured prompt](#how-to-write-a-structured-prompt)
- [How to improve quality and effectiveness](#how-to-improve-quality-and-effectiveness)
Expand Down Expand Up @@ -55,7 +55,7 @@ Generative AI is very useful, but it requires human guidance. In most cases, gen
Let's look at a basic example of a discussion question:

> *"What are the most urgent environmental issues our planet faces, and what can individuals do to help address these problems?"*
> _"What are the most urgent environmental issues our planet faces, and what can individuals do to help address these problems?"_
We can turn this into a simple prompt by answering the following question upfront.

Expand Down Expand Up @@ -88,7 +88,7 @@ After formulating effective prompts for discussion questions, you now need to re

A simple iteration method is to generate multiple outputs and examine them to understand the concepts and structure used by agent. Once the outputs have been evaluated, you can select the most suitable ones and combine them into a coherent answer. Another iterative approach is to start gradually and then expand step by step. This requires more than one prompt: an initial prompt for writing the first one or two paragraphs, followed by additional prompts to expand on the content already written. Here's a potential philosophical discussion prompt:

> *"Is mathematics invented or discovered? Explain your answer with careful reasoning."*
> _"Is mathematics invented or discovered? Explain your answer with careful reasoning."_
Add it to a simple prompt like this:

Expand Down Expand Up @@ -184,11 +184,11 @@ The presence penalty parameter can be seen as a punishment for repetitive conten

Frequency penalty is a mechanism that penalizes frequent occurrences of new vocabulary in the generated text, reducing the likelihood of the model repeating the same words. The higher the value, the more likely it is to reduce repeated words.

- `-2.0` When the morning news starts playing, I noticed that my TV now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now *(The most frequent word is "now" with a percentage of 44.79%)*
- `-1.0` He always watches the news in the morning, watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching *(The most frequent word is "watching" with a percentage of 57.69%)*
- `0.0` When the morning sun shines into the small restaurant, a tired mailman appears at the door, holding a bag of mail in his hand. The owner warmly prepares breakfast for him, and he starts sorting the mail while enjoying his breakfast. ***(The most frequent word is "the" with a percentage of 8.45%)***
- `1.0` A deep sleep girl is awakened by a warm sunbeam. She sees the first ray of sunlight in the morning, surrounded by the sounds of birds and the fragrance of flowers, everything is full of vitality. *(The most frequent word is "the" with a percentage of 5.45%)*
- `2.0` Every morning, he sits on the balcony to have breakfast. In the gentle sunset, everything looks very peaceful. However, one day, as he was about to pick up his breakfast, an optimistic little bird flew by, bringing him a good mood for the day. *(The most frequent word is "the" with a percentage of 4.94%)*
- `-2.0` When the morning news starts playing, I noticed that my TV now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now _(The most frequent word is "now" with a percentage of 44.79%)_
- `-1.0` He always watches the news in the morning, watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching watching _(The most frequent word is "watching" with a percentage of 57.69%)_
- `0.0` When the morning sun shines into the small restaurant, a tired mailman appears at the door, holding a bag of mail in his hand. The owner warmly prepares breakfast for him, and he starts sorting the mail while enjoying his breakfast. **_(The most frequent word is "the" with a percentage of 8.45%)_**
- `1.0` A deep sleep girl is awakened by a warm sunbeam. She sees the first ray of sunlight in the morning, surrounded by the sounds of birds and the fragrance of flowers, everything is full of vitality. _(The most frequent word is "the" with a percentage of 5.45%)_
- `2.0` Every morning, he sits on the balcony to have breakfast. In the gentle sunset, everything looks very peaceful. However, one day, as he was about to pick up his breakfast, an optimistic little bird flew by, bringing him a good mood for the day. _(The most frequent word is "the" with a percentage of 4.94%)_

## Further Reading

Expand Down
File renamed without changes.
31 changes: 31 additions & 0 deletions docs/Usage-Topics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Topic Guide

#### TOC

- [Explanation of Agent and Topic Concepts](#explanation-of-agent-and-topic-concepts)
- [User Guide](#user-guide)

## Explanation of Agent and Topic Concepts

In the official ChatGPT app, there is only the concept of topics, as shown in the figure, the sidebar contains the user's historical conversation topic list.

> **Note**
>
> However, in our use, we actually find that this mode has many problems, such as the information indexing of historical conversations is too scattered, and when dealing with some repetitive tasks, it is difficult to have a stable entrance. For example, I hope there is a stable entrance to allow ChatGPT to help me translate documents. In this mode, I need to constantly create new topics and then set the translation Prompt I created before. When there are high-frequency tasks, this will be a very low-efficiency interaction form.
![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602474-fe7cb3f3-8eb7-40d3-a69f-6615393bbd4e.png)

Therefore, in LobeChat, we introduced the concept of `Agent`. The agent is a complete functional module, and each agent has its own responsibilities and tasks. The agent can help you handle various tasks and provide professional advice and guidance.

At the same time, we index the topic into each agent. The advantage of this is that each agent has an independent topic list, you can choose the corresponding agent according to the current task, and quickly switch historical conversation records. This way is more in line with the user's use habits of common chat software, and improves the interaction efficiency.

![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602489-89893e61-2791-4083-9b57-ed80884ad58b.png)

<br/>

## User Guide

![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602496-fd72037a-735e-4cc2-aa56-2994bceaba81.png)

- **Save Topic:** During the chat, if you want to save the current context and start a new topic, you can click the save button next to the send button.
- **Topic List:** Clicking on the topic in the list can quickly switch historical conversation records and continue the conversation. You can also click the star icon <kbd>⭐️</kbd> to bookmark the topic to the top, or rename and delete the topic through the more button on the right.
31 changes: 31 additions & 0 deletions docs/Usage-Topics.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 话题指南

#### TOC

- [助手与话题概念解析](#助手与话题概念解析)
- [使用指南](#使用指南)

## 助手与话题概念解析

在 ChatGPT 官方应用中,只存在话题的概念,如图所示,在侧边栏中是用户的历史对话话题列表。

> **Note**
>
> 但在我们的使用过程中其实会发现这种模式存在很多问题,比如历史对话的信息索引过于分散问题,同时当处理一些重复任务时很难有一个稳定的入口,比如我希望有一个稳定的入口可以让 ChatGPT 帮助我翻译文档,在这个模式下,我需要不断新建新的话题同时再设置我之前创建好的翻译 Prompt 设定,当有高频任务存在时,这将是一个效率很低的交互形式。
![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602474-fe7cb3f3-8eb7-40d3-a69f-6615393bbd4e.png)

因此在 LobeChat 中,我们引入了 **助手** 的概念。助手是一个完整的功能模块,每个助手都有自己的职责和任务。助手可以帮助你处理各种任务,并提供专业的建议和指导。

与此同时,我们将话题索引到每个助手内部。这样做的好处是,每个助手都有一个独立的话题列表,你可以根据当前任务选择对应的助手,并快速切换历史对话记录。这种方式更符合用户对常见聊天软件的使用习惯,提高了交互的效率。

![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602489-89893e61-2791-4083-9b57-ed80884ad58b.png)

<br/>

## 使用指南

![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602496-fd72037a-735e-4cc2-aa56-2994bceaba81.png)

- \*\* 保存话题:\*\* 在聊天过程中,如果想要保存当前上下文并开启新的话题,可以点击发送按钮旁边的保存按钮。
- 话题列表:点击列表中的话题可以快速切换历史对话记录,并继续对话。你还可以通过点击星标图标 <kbd>⭐️</kbd> 将话题收藏置顶,或者通过右侧更多按钮对话题进行重命名和删除操作。
3 changes: 2 additions & 1 deletion docs/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

#### 🤯 LobeChat Usage

- [Custom Agents Guide](Agents) | [中文](Agents.zh-CN)
- [Custom Agents Guide](Usage-Agents) | [中文](Usage-Agents.zh-CN)
- [Topics Guide](Usage-Topics) | [中文](Usage-Topics.zh-CN)

#### 🛳 Self Hosting

Expand Down

0 comments on commit 2b18a80

Please sign in to comment.