Skip to content

Commit

Permalink
docs (#165)
Browse files Browse the repository at this point in the history
* perf: log

* README

* docs
  • Loading branch information
c121914yu authored Aug 10, 2023
1 parent 4dc0fd3 commit a0c397c
Show file tree
Hide file tree
Showing 9 changed files with 209 additions and 34 deletions.
Binary file added .github/imgs/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
80 changes: 69 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,106 @@
<div align="center">

<a href="https://fastgpt.run/"><img src="/.github/imgs/logo.png" width="100" height="100" alt="fastgpt logo"></a>

# FastGPT

FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景!

</div>

<p align="center">
<a href="https://fastgpt.run/">线上体验</a>
·
<a href="https://doc.fastgpt.run/docs/intro">相关文档</a>
·
<a href="https://doc.fastgpt.run/docs/develop/dev">本地开发</a>
·
<a href="https://doc.fastgpt.run/docs/category/deploy">快速部署</a>
·
<a href="#powered-by">相关项目</a>
</p>

## 🛸 在线体验

🎉 [fastgpt.run](https://fastgpt.run/)(服务器在新加坡,部分地区可能无法直连)
[fastgpt.run](https://fastgpt.run/)(服务器在新加坡,部分地区可能无法直连)

| | |
| ---------------------------------- | ---------------------------------- |
| ![Demo](./.github/imgs/intro1.png) | ![Demo](./.github/imgs/intro2.png) |
| ![Demo](./.github/imgs/intro3.png) | ![Demo](./.github/imgs/intro4.png) |

## 💡 功能

1. 强大的可视化编排,轻松构建 AI 应用
- [x] 提供简易模式,无需操作编排
- [x] 用户对话前引导
- [x] 全局变量
- [x] 知识库搜索
- [x] 多 LLM 模型对话
- [x] 文本内容提取成结构化数据
- [x] HTTP 扩展
- [ ] 沙盒 JS 运行模块
- [ ] 连续对话引导
- [ ] 对话多路线选择
- [ ] 源文件引用追踪
2. 丰富的知识库预处理
- [x] 多库复用,混用
- [x] chunk 记录修改和删除
- [x] 支持直接分段导入
- [x] 支持 QA 拆分导入
- [x] 支持手动输入内容
- [ ] 支持 url 读取导入
- [x] 支持 CSV 批量导入问答对
- [ ] 支持知识库单独设置向量模型
- [ ] 源文件存储
3. 多种效果测试渠道
- [x] 知识库单点搜索测试
- [x] 对话时反馈引用并可修改与删除
- [x] 完整上下文呈现
- [ ] 完整模块中间值呈现
4. OpenAPI
- [x] completions 接口(对齐 GPT 接口)
- [ ] 知识库 CRUD
5. 运营功能
- [x] 免登录分享窗口
- [x] Iframe 一键嵌入
- [ ] 统一查阅对话记录

## 👨‍💻 开发

项目技术栈: NextJs + TS + ChakraUI + Mongo + Postgres(Vector 插件)

- [快开始本地开发](https://doc.fastgpt.run/docs/develop/dev)
- [部署 FastGPT](https://doc.fastgpt.run/docs/category/deploy)
- [系统配置文件说明](https://doc.fastgpt.run/docs/category/data-config)
- [多模型配置](https://doc.fastgpt.run/docs/develop/data_config/chat_models)
- [V3 升级 V4 初始化](https://doc.fastgpt.run/docs/develop/deploy/v4init)

## :point_right: RoadMap
<!-- ## :point_right: RoadMap
- [FastGpt RoadMap](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte)
- [FastGpt RoadMap](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte) -->

## 🏘️ 社区交流群

| 交流群 | 小助手 |
| ------------------------------------------------- | ---------------------------------------------- |
| ![](https://otnvvf-imgs.oss.laf.run/wxqun300.jpg) | ![](https://otnvvf-imgs.oss.laf.run/wx300.jpg) |

## Powered by

- [TuShan: 5 分钟搭建后台管理系统](https://github.com/msgbyte/tushan)
- [Laf: 3 分钟快速接入三方应用](https://github.com/labring/laf)
- [Sealos: 快速部署集群应用](https://github.com/labring/sealos)
- [One API: 令牌管理 & 二次分发,支持 Azure](https://github.com/songquanpeng/one-api)

## 👀 其他

- [FastGpt 常见问题](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
- [docker 部署教程视频](https://www.bilibili.com/video/BV1jo4y147fT/)
- [公众号接入视频教程](https://www.bilibili.com/video/BV1xh4y1t7fy/)
- [FastGpt 知识库演示](https://www.bilibili.com/video/BV1Wo4y1p7i1/)

## 第三方生态
## 💪 相关项目

- [Laf: 3 分钟快速接入三方应用](https://github.com/labring/laf)
- [Sealos: 快速部署集群应用](https://github.com/labring/sealos)
- [One API: 多模型管理,支持 Azure、文心一言等](https://github.com/songquanpeng/one-api)
- [TuShan: 5 分钟搭建后台管理系统](https://github.com/msgbyte/tushan)

## 🤝 第三方生态

- [luolinAI: 企微机器人,开箱即用](https://github.com/luolin-ai/FastGPT-Enterprise-WeChatbot)

Expand Down
115 changes: 115 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<div align="center">
<a href="https://fastgpt.run/"><img src="/.github/imgs/logo.png" width="100" height="100" alt="fastgpt logo"></a>

# FastGPT

FastGPT is a knowledge-based question answering system based on the LLM language model, providing out-of-the-box capabilities for data processing, model invocation, and more. It also allows for complex question answering scenarios through visual workflow orchestration using Flow!

</div>

<p align="center">
<a href="https://fastgpt.run/">Online</a>
·
<a href="https://doc.fastgpt.run/docs/intro">Document</a>
·
<a href="https://doc.fastgpt.run/docs/develop/dev">Development</a>
·
<a href="https://doc.fastgpt.run/docs/category/deploy">Deploy</a>
·
<a href="#powered-by">Power By</a>
</p>

## 🛸 Online

[fastgpt.run](https://fastgpt.run/)
| | |
| ---------------------------------- | ---------------------------------- |
| ![Demo](./.github/imgs/intro1.png) | ![Demo](./.github/imgs/intro2.png) |
| ![Demo](./.github/imgs/intro3.png) | ![Demo](./.github/imgs/intro4.png) |

## 💡 Features

1. Powerful visual orchestration for easy AI application building

- [x] Provides a simple mode without the need for orchestration operations
- [x] User dialogue pre-guidance
- [x] Global variables
- [x] Knowledge base search
- [x] Multi-LLM model dialogue
- [x] Extraction of text content into structured data
- [x] HTTP extension
- [ ] Sandbox JS runtime module
- [ ] Continuous dialogue guidance
- [ ] Dialogue multi-path selection
- [ ] Source file reference tracking

2. Rich knowledge base preprocessing

- [x] Multiple library reuse and mixing
- [x] Chunk record modification and deletion
- [x] Supports direct segment import
- [x] Supports QA split import
- [x] Supports manual input content
- [ ] Supports URL import reading
- [x] Supports batch import of Q&A pairs in CSV format
- [ ] Supports separate vector model settings for knowledge bases
- [ ] Source file storage

3. Multiple effect testing channels

- [x] Knowledge base single point search testing
- [x] Feedback references and ability to modify and delete during dialogue
- [x] Complete context presentation
- [ ] Complete module intermediate value presentation

4. OpenAPI

- [x] completions interface (aligned with GPT interface)
- [ ] Knowledge base CRUD

5. Operational functions

- [x] Login-free sharing window
- [x] One-click embedding with Iframe
- [ ] Unified access to dialogue records

## 👨‍💻 Development

Project tech stack: NextJs + TS + ChakraUI + Mongo + Postgres (Vector plugin)

- [Getting Started with Local Development](https://doc.fastgpt.run/docs/develop/dev)
- [Deploying FastGPT](https://doc.fastgpt.run/docs/category/deploy)
- [System Configuration File Explanation](https://doc.fastgpt.run/docs/category/data-config)
- [Multi-model Configuration](https://doc.fastgpt.run/docs/develop/data_config/chat_models)
- [V3 Upgrade V4 Initialization](https://doc.fastgpt.run/docs/develop/deploy/v4init)

<!-- ## :point_right: RoadMap
- [FastGpt RoadMap](https://kjqvjse66l.feishu.cn/docx/RVUxdqE2WolDYyxEKATcM0XXnte) -->

<!-- ## 🏘️ Community
| Community Group | Assistant |
| ------------------------------------------------- | ---------------------------------------------- |
| ![](https://otnvvf-imgs.oss.laf.run/wxqun300.jpg) | ![](https://otnvvf-imgs.oss.laf.run/wx300.jpg) | -->

## 👀 Others

- [FastGpt FAQ](https://kjqvjse66l.feishu.cn/docx/HtrgdT0pkonP4kxGx8qcu6XDnGh)
- [Docker Deployment Tutorial Video](https://www.bilibili.com/video/BV1jo4y147fT/)
- [Official Account Integration Video Tutorial](https://www.bilibili.com/video/BV1xh4y1t7fy/)
- [FastGpt Knowledge Base Demo](https://www.bilibili.com/video/BV1Wo4y1p7i1/)

## 💪 Related Projects

- [Laf: 3-minute quick access to third-party applications](https://github.com/labring/laf)
- [Sealos: Rapid deployment of cluster applications](https://github.com/labring/sealos)
- [One API: Multi-model management, supports Azure, Wenxin Yiyuan, etc.](https://github.com/songquanpeng/one-api)
- [TuShan: Build a backend management system in 5 minutes](https://github.com/msgbyte/tushan)

## 🤝 Third-party Ecosystem

- [luolinAI: Enterprise WeChat bot, ready to use](https://github.com/luolin-ai/FastGPT-Enterprise-WeChatbot)

## 🌟 Star History

[![Star History Chart](https://api.star-history.com/svg?repos=labring/FastGPT&type=Date)](https://star-history.com/#labring/FastGPT&Date)
2 changes: 1 addition & 1 deletion client/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function App({ Component, pageProps }: AppProps) {
return (
<>
<Head>
<title>{feConfigs?.systemTitle || 'FastAI'}</title>
<title>{feConfigs?.systemTitle || 'FastGPT'}</title>
<meta name="description" content="Embedding + LLM, Build AI knowledge base" />
<meta
name="viewport"
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/api/openapi/v1/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export async function dispatchModules({
}
async function moduleRun(module: RunningModuleItemType): Promise<any> {
if (res.closed) return Promise.resolve();
console.log('run=========', module.flowType);
// console.log('run=========', module.flowType);

if (stream && detail && module.showStatus) {
responseStatus({
Expand Down
2 changes: 1 addition & 1 deletion client/src/service/events/generateVector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export async function generateVector(): Promise<any> {

// delete data from training
await TrainingData.findByIdAndDelete(data._id);
console.log(`生成向量成功: ${data._id}`);
// console.log(`生成向量成功: ${data._id}`);

reduceQueue();
generateVector();
Expand Down
2 changes: 1 addition & 1 deletion client/src/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const defaultChatData: InitChatResponse = {
chatId: '',
appId: '',
app: {
name: 'FastAI',
name: 'FastGPT',
avatar: '/icon/logo.png',
intro: '',
canUse: false
Expand Down
34 changes: 18 additions & 16 deletions docSite/docs/develop/data_config/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,36 @@ sidebar_position: 1

# Quick Introduction

Due to the limitations of environment variables in configuring complex content, the new version of FastGPT uses ConfigMap to mount configuration files. You can find the default configuration file at client/data/config.json.
In the development environment, you need to make a copy of config.json as config.local.json for it to take effect.
This configuration file includes customization of the frontend page, system-level parameters, and AI dialogue models, etc.
Due to the limitations of environment variables in configuring complex content, the new version of FastGPT uses ConfigMap to mount the configuration file. You can see the default configuration file in `client/data/config.json`. You can refer to [docker-compose deployment](/docs/develop/deploy/docker) to mount the configuration file.

In the development environment, you need to make a copy of `config.json` as `config.local.json` for it to take effect.

This configuration file contains customization of the frontend page, system-level parameters, and AI dialogue models, etc.

## Brief Explanation of Basic Fields

Here, we will introduce some basic configuration fields.
Here are some basic configuration fields.

```json
// This configuration controls some styles of the frontend
"FeConfig": {
"show_emptyChat": true, // Whether to display the introduction page when the conversation page is empty
"show_register": false, // Whether to display the registration button (including forget password, register account, and third-party login)
"show_appStore": false, // Whether to display the app store (currently the permissions are not properly set, so it is useless to open it)
"show_userDetail": false, // Whether to display user details (account balance, OpenAI binding)
"show_git": true, // Whether to display Git
"systemTitle": "FastAI", // The title of the system
"authorText": "Made by FastAI Team.", // Signature
"gitLoginKey": "" // Git login credentials
"show_emptyChat": true, // Whether to display the introduction page when the conversation page is empty
"show_register": false, // Whether to display the registration button (including forget password, register account, and third-party login)
"show_appStore": false, // Whether to display the app store (currently the permission is not properly set, so it is useless to open it)
"show_userDetail": false, // Whether to display user details (account balance, OpenAI binding)
"show_git": true, // Whether to display Git
"systemTitle": "FastGPT", // The title of the system
"authorText": "Made by FastGPT Team.", // Signature
"gitLoginKey": "" // Git login credentials
}
```

```json
// This configuration file contains system-level parameters
"SystemParams": {
"gitLoginSecret": "", // Git login credentials
"vectorMaxProcess": 15, // Maximum number of processes for vector generation, set in combination with database performance and key
"qaMaxProcess": 15, // Maximum number of processes for QA generation, set in combination with database performance and key
"pgIvfflatProbe": 20 // pg vector search probe. Can be ignored before setting up the index, usually only needed for more than 500,000 groups.
"gitLoginSecret": "", // Git login credentials
"vectorMaxProcess": 15, // Maximum number of processes for vector generation, set in combination with database performance and key
"qaMaxProcess": 15, // Maximum number of processes for QA generation, set in combination with database performance and key
"pgIvfflatProbe": 20 // pg vector search probe. Can be ignored before setting the index, usually only needed for more than 500,000 groups.
},
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 1

# 快速介绍

由于环境变量不利于配置复杂的内容,新版 FastGPT 采用了 ConfigMap 的形式挂载配置文件,你可以在 client/data/config.json 看到默认的配置文件。
由于环境变量不利于配置复杂的内容,新版 FastGPT 采用了 ConfigMap 的形式挂载配置文件,你可以在 client/data/config.json 看到默认的配置文件。可以参考 [docker-compose 部署](/docs/develop/deploy/docker) 来挂载配置文件。

开发环境下,你需要复制一份 config.json 成 config.local.json 文件才会生效。

Expand All @@ -22,8 +22,8 @@ sidebar_position: 1
"show_appStore": false, // 是否展示应用市场(不过目前权限还没做好,放开也没用)
"show_userDetail": false, // 是否展示用户详情(账号余额、OpenAI 绑定)
"show_git": true, // 是否展示 Git
"systemTitle": "FastAI", // 系统的 title
"authorText": "Made by FastAI Team.", // 签名
"systemTitle": "FastGPT", // 系统的 title
"authorText": "Made by FastGPT Team.", // 签名
"gitLoginKey": "" // Git 登录凭证
}
```
Expand Down

0 comments on commit a0c397c

Please sign in to comment.