2024-03-31 23:08:41 +08:00
|
|
|
|
<div align="center">
|
|
|
|
|
<a href="https://demo.ragflow.io/">
|
2024-04-01 10:54:11 +08:00
|
|
|
|
<img src="web/src/assets/logo-with-text.png" width="350" alt="ragflow logo">
|
2024-03-31 23:08:41 +08:00
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p align="center">
|
|
|
|
|
<a href="./README.md">English</a> |
|
2024-04-04 10:26:39 +09:00
|
|
|
|
<a href="./README_zh.md">简体中文</a> |
|
2025-01-26 14:14:58 +08:00
|
|
|
|
<a href="./README_tzh.md">繁体中文</a> |
|
2024-08-22 13:33:01 +09:00
|
|
|
|
<a href="./README_ja.md">日本語</a> |
|
2024-11-12 08:26:14 +07:00
|
|
|
|
<a href="./README_ko.md">한국어</a> |
|
2025-01-21 00:22:29 -03:00
|
|
|
|
<a href="./README_id.md">Bahasa Indonesia</a> |
|
|
|
|
|
<a href="/README_pt_br.md">Português (Brasil)</a>
|
2024-03-31 23:08:41 +08:00
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<p align="center">
|
2024-10-29 21:05:38 +08:00
|
|
|
|
<a href="https://x.com/intent/follow?screen_name=infiniflowai" target="_blank">
|
|
|
|
|
<img src="https://img.shields.io/twitter/follow/infiniflow?logo=X&color=%20%23f5f5f5" alt="follow on X(Twitter)">
|
2024-04-25 14:31:54 +08:00
|
|
|
|
</a>
|
2024-03-31 23:08:41 +08:00
|
|
|
|
<a href="https://demo.ragflow.io" target="_blank">
|
2024-10-29 21:05:38 +08:00
|
|
|
|
<img alt="Static Badge" src="https://img.shields.io/badge/Online-Demo-4e6b99">
|
|
|
|
|
</a>
|
2024-03-31 23:08:41 +08:00
|
|
|
|
<a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
|
2025-03-13 15:09:29 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/docker_pull-ragflow:v0.17.2-brightgreen" alt="docker pull infiniflow/ragflow:v0.17.2">
|
2024-10-29 21:05:38 +08:00
|
|
|
|
</a>
|
|
|
|
|
<a href="https://github.com/infiniflow/ragflow/releases/latest">
|
|
|
|
|
<img src="https://img.shields.io/github/v/release/infiniflow/ragflow?color=blue&label=Latest%20Release" alt="Latest Release">
|
|
|
|
|
</a>
|
2024-05-30 18:00:02 +08:00
|
|
|
|
<a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
|
2024-10-29 21:05:38 +08:00
|
|
|
|
<img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?labelColor=d4eaf7&color=2e6cc4" alt="license">
|
|
|
|
|
</a>
|
2024-03-31 23:08:41 +08:00
|
|
|
|
</p>
|
|
|
|
|
|
2024-06-01 16:24:10 +08:00
|
|
|
|
<h4 align="center">
|
|
|
|
|
<a href="https://ragflow.io/docs/dev/">Document</a> |
|
2024-12-27 10:48:11 +08:00
|
|
|
|
<a href="https://github.com/infiniflow/ragflow/issues/4214">Roadmap</a> |
|
2024-06-01 16:24:10 +08:00
|
|
|
|
<a href="https://twitter.com/infiniflowai">Twitter</a> |
|
2024-06-12 10:18:46 +08:00
|
|
|
|
<a href="https://discord.gg/4XxujFgUN7">Discord</a> |
|
2024-06-01 16:24:10 +08:00
|
|
|
|
<a href="https://demo.ragflow.io">Demo</a>
|
|
|
|
|
</h4>
|
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
## 💡 RAGFlow 是什么?
|
|
|
|
|
|
2024-05-14 18:46:39 +08:00
|
|
|
|
[RAGFlow](https://ragflow.io/) 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
2024-05-27 14:01:52 +08:00
|
|
|
|
## 🎮 Demo 试用
|
|
|
|
|
|
|
|
|
|
请登录网址 [https://demo.ragflow.io](https://demo.ragflow.io) 试用 demo。
|
2025-01-21 00:22:29 -03:00
|
|
|
|
|
2024-06-07 19:01:09 +08:00
|
|
|
|
<div align="center" style="margin-top:20px;margin-bottom:20px;">
|
|
|
|
|
<img src="https://github.com/infiniflow/ragflow/assets/7248/2f6baa3e-1092-4f11-866d-36f6a9d075e5" width="1200"/>
|
2024-11-01 13:31:34 +08:00
|
|
|
|
<img src="https://github.com/user-attachments/assets/504bbbf1-c9f7-4d83-8cc5-e9cb63c26db6" width="1200"/>
|
2024-06-07 19:01:09 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
2024-07-18 11:20:15 +08:00
|
|
|
|
## 🔥 近期更新
|
2024-05-12 13:40:47 +08:00
|
|
|
|
|
2025-03-05 17:54:34 +08:00
|
|
|
|
- 2025-02-28 结合互联网搜索(Tavily),对于任意大模型实现类似 Deep Research 的推理功能.
|
2025-02-05 14:24:30 +08:00
|
|
|
|
- 2025-02-05 更新硅基流动的模型列表,增加了对 Deepseek-R1/DeepSeek-V3 的支持。
|
2025-01-26 14:14:58 +08:00
|
|
|
|
- 2025-01-26 优化知识图谱的提取和应用,提供了多种配置选择。
|
2025-02-28 16:09:40 +08:00
|
|
|
|
- 2024-12-18 升级了 DeepDoc 的文档布局分析模型。
|
2024-12-04 12:23:31 +08:00
|
|
|
|
- 2024-12-04 支持知识库的 Pagerank 分数。
|
2024-11-22 16:47:45 +08:00
|
|
|
|
- 2024-11-22 完善了 Agent 中的变量定义和使用。
|
|
|
|
|
- 2024-11-01 对解析后的 chunk 加入关键词抽取和相关问题生成以提高召回的准确度。
|
2024-09-29 16:29:02 +08:00
|
|
|
|
- 2024-08-22 支持用 RAG 技术实现从自然语言到 SQL 语句的转换。
|
2024-09-30 16:21:56 +08:00
|
|
|
|
|
|
|
|
|
## 🎉 关注项目
|
2025-01-21 00:22:29 -03:00
|
|
|
|
|
|
|
|
|
⭐️ 点击右上角的 Star 关注 RAGFlow,可以获取最新发布的实时通知 !🌟
|
|
|
|
|
|
2024-09-30 16:21:56 +08:00
|
|
|
|
<div align="center" style="margin-top:20px;margin-bottom:20px;">
|
|
|
|
|
<img src="https://github.com/user-attachments/assets/18c9707e-b8aa-4caf-a154-037089c105ba" width="1200"/>
|
|
|
|
|
</div>
|
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
## 🌟 主要功能
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
### 🍭 **"Quality in, quality out"**
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
2024-04-01 14:01:21 +08:00
|
|
|
|
- 基于[深度文档理解](./deepdoc/README.md),能够从各类复杂格式的非结构化数据中提取真知灼见。
|
2024-04-01 10:54:11 +08:00
|
|
|
|
- 真正在无限上下文(token)的场景下快速完成大海捞针测试。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
### 🍱 **基于模板的文本切片**
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
|
|
|
|
- 不仅仅是智能,更重要的是可控可解释。
|
|
|
|
|
- 多种文本模板可供选择
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
### 🌱 **有理有据、最大程度降低幻觉(hallucination)**
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
|
|
|
|
- 文本切片过程可视化,支持手动调整。
|
|
|
|
|
- 有理有据:答案提供关键引用的快照并支持追根溯源。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
2024-03-31 23:12:25 +08:00
|
|
|
|
### 🍔 **兼容各类异构数据源**
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
2024-05-31 09:44:59 +01:00
|
|
|
|
- 支持丰富的文件类型,包括 Word 文档、PPT、excel 表格、txt 文件、图片、PDF、影印件、复印件、结构化数据、网页等。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
### 🛀 **全程无忧、自动化的 RAG 工作流**
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
|
|
|
|
- 全面优化的 RAG 工作流可以支持从个人应用乃至超大型企业的各类生态系统。
|
|
|
|
|
- 大语言模型 LLM 以及向量模型均支持配置。
|
|
|
|
|
- 基于多路召回、融合重排序。
|
|
|
|
|
- 提供易用的 API,可以轻松集成到各类企业系统。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
## 🔎 系统架构
|
|
|
|
|
|
|
|
|
|
<div align="center" style="margin-top:20px;margin-bottom:20px;">
|
|
|
|
|
<img src="https://github.com/infiniflow/ragflow/assets/12318111/d6ac5664-c237-4200-a7c2-a4a00691b485" width="1000"/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
## 🎬 快速开始
|
|
|
|
|
|
|
|
|
|
### 📝 前提条件
|
|
|
|
|
|
2024-04-19 18:02:53 +08:00
|
|
|
|
- CPU >= 4 核
|
2024-04-24 19:22:00 +08:00
|
|
|
|
- RAM >= 16 GB
|
2024-04-25 14:00:48 +08:00
|
|
|
|
- Disk >= 50 GB
|
2024-04-11 10:13:43 +08:00
|
|
|
|
- Docker >= 24.0.0 & Docker Compose >= v2.26.1
|
2024-03-31 23:08:41 +08:00
|
|
|
|
> 如果你并没有在本机安装 Docker(Windows、Mac,或者 Linux), 可以参考文档 [Install Docker Engine](https://docs.docker.com/engine/install/) 自行安装。
|
|
|
|
|
|
|
|
|
|
### 🚀 启动服务器
|
|
|
|
|
|
2024-06-03 17:01:02 +08:00
|
|
|
|
1. 确保 `vm.max_map_count` 不小于 262144:
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
> 如需确认 `vm.max_map_count` 的大小:
|
|
|
|
|
>
|
2024-04-01 10:54:11 +08:00
|
|
|
|
> ```bash
|
2024-03-31 23:08:41 +08:00
|
|
|
|
> $ sysctl vm.max_map_count
|
|
|
|
|
> ```
|
|
|
|
|
>
|
2024-04-07 09:41:53 +08:00
|
|
|
|
> 如果 `vm.max_map_count` 的值小于 262144,可以进行重置:
|
2024-03-31 23:08:41 +08:00
|
|
|
|
>
|
|
|
|
|
> ```bash
|
|
|
|
|
> # 这里我们设为 262144:
|
|
|
|
|
> $ sudo sysctl -w vm.max_map_count=262144
|
|
|
|
|
> ```
|
|
|
|
|
>
|
|
|
|
|
> 你的改动会在下次系统重启时被重置。如果希望做永久改动,还需要在 **/etc/sysctl.conf** 文件里把 `vm.max_map_count` 的值再相应更新一遍:
|
|
|
|
|
>
|
|
|
|
|
> ```bash
|
|
|
|
|
> vm.max_map_count=262144
|
|
|
|
|
> ```
|
|
|
|
|
|
|
|
|
|
2. 克隆仓库:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ git clone https://github.com/infiniflow/ragflow.git
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
3. 进入 **docker** 文件夹,利用提前编译好的 Docker 镜像启动服务器:
|
|
|
|
|
|
2025-03-04 19:21:28 +08:00
|
|
|
|
> [!CAUTION]
|
|
|
|
|
> 请注意,目前官方提供的所有 Docker 镜像均基于 x86 架构构建,并不提供基于 ARM64 的 Docker 镜像。
|
|
|
|
|
> 如果你的操作系统是 ARM64 架构,请参考[这篇文档](https://ragflow.io/docs/dev/build_docker_image)自行构建 Docker 镜像。
|
|
|
|
|
|
2025-03-13 15:09:29 +08:00
|
|
|
|
> 运行以下命令会自动下载 RAGFlow slim Docker 镜像 `v0.17.2-slim`。请参考下表查看不同 Docker 发行版的描述。如需下载不同于 `v0.17.2-slim` 的 Docker 镜像,请在运行 `docker compose` 启动服务之前先更新 **docker/.env** 文件内的 `RAGFLOW_IMAGE` 变量。比如,你可以通过设置 `RAGFLOW_IMAGE=infiniflow/ragflow:v0.17.2` 来下载 RAGFlow 镜像的 `v0.17.2` 完整发行版。
|
2024-10-10 19:24:54 +08:00
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
```bash
|
2025-02-19 13:19:36 +08:00
|
|
|
|
$ cd ragflow/docker
|
|
|
|
|
$ docker compose -f docker-compose.yml up -d
|
2024-03-31 23:08:41 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-12-12 09:57:52 +08:00
|
|
|
|
| RAGFlow image tag | Image size (GB) | Has embedding models? | Stable? |
|
2025-03-02 18:47:06 +08:00
|
|
|
|
| ----------------- | --------------- | --------------------- | ------------------------ |
|
2025-03-13 15:09:29 +08:00
|
|
|
|
| v0.17.2 | ≈9 | :heavy_check_mark: | Stable release |
|
|
|
|
|
| v0.17.2-slim | ≈2 | ❌ | Stable release |
|
2025-01-21 00:22:29 -03:00
|
|
|
|
| nightly | ≈9 | :heavy_check_mark: | _Unstable_ nightly build |
|
2025-02-28 16:09:40 +08:00
|
|
|
|
| nightly-slim | ≈2 | ❌ | _Unstable_ nightly build |
|
2024-12-09 12:44:57 +08:00
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
> [!TIP]
|
2024-12-13 18:57:22 +08:00
|
|
|
|
> 如果你遇到 Docker 镜像拉不下来的问题,可以在 **docker/.env** 文件内根据变量 `RAGFLOW_IMAGE` 的注释提示选择华为云或者阿里云的相应镜像。
|
2025-01-21 00:22:29 -03:00
|
|
|
|
>
|
2024-12-13 18:57:22 +08:00
|
|
|
|
> - 华为云镜像名:`swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow`
|
|
|
|
|
> - 阿里云镜像名:`registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow`
|
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
4. 服务器启动成功后再次确认服务器状态:
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
```bash
|
|
|
|
|
$ docker logs -f ragflow-server
|
|
|
|
|
```
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
|
|
|
|
_出现以下界面提示说明服务器启动成功:_
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
2025-01-21 00:22:29 -03:00
|
|
|
|
____ ___ ______ ______ __
|
2024-09-29 16:28:07 +08:00
|
|
|
|
/ __ \ / | / ____// ____// /____ _ __
|
|
|
|
|
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
2025-01-21 00:22:29 -03:00
|
|
|
|
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
|
|
|
|
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
* Running on all addresses (0.0.0.0)
|
2024-04-01 10:54:11 +08:00
|
|
|
|
```
|
2025-01-21 00:22:29 -03:00
|
|
|
|
|
2025-02-28 16:09:40 +08:00
|
|
|
|
> 如果您在没有看到上面的提示信息出来之前,就尝试登录 RAGFlow,你的浏览器有可能会提示 `network anormal` 或 `网络异常`。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
2024-04-08 19:20:57 +08:00
|
|
|
|
5. 在你的浏览器中输入你的服务器对应的 IP 地址并登录 RAGFlow。
|
|
|
|
|
> 上面这个例子中,您只需输入 http://IP_OF_YOUR_MACHINE 即可:未改动过配置则无需输入端口(默认的 HTTP 服务端口 80)。
|
2024-12-10 10:19:50 +08:00
|
|
|
|
6. 在 [service_conf.yaml.template](./docker/service_conf.yaml.template) 文件的 `user_default_llm` 栏配置 LLM factory,并在 `API_KEY` 栏填写和你选择的大模型相对应的 API key。
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
2024-06-01 16:24:10 +08:00
|
|
|
|
> 详见 [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup)。
|
2024-04-01 10:54:11 +08:00
|
|
|
|
|
|
|
|
|
_好戏开始,接着奏乐接着舞!_
|
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
## 🔧 系统配置
|
|
|
|
|
|
|
|
|
|
系统配置涉及以下三份文件:
|
|
|
|
|
|
|
|
|
|
- [.env](./docker/.env):存放一些基本的系统环境变量,比如 `SVR_HTTP_PORT`、`MYSQL_PASSWORD`、`MINIO_PASSWORD` 等。
|
2024-12-10 10:19:50 +08:00
|
|
|
|
- [service_conf.yaml.template](./docker/service_conf.yaml.template):配置各类后台服务。
|
2024-09-29 18:24:24 +08:00
|
|
|
|
- [docker-compose.yml](./docker/docker-compose.yml): 系统依赖该文件完成启动。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
2024-12-10 10:19:50 +08:00
|
|
|
|
请务必确保 [.env](./docker/.env) 文件中的变量设置与 [service_conf.yaml.template](./docker/service_conf.yaml.template) 文件中的配置保持一致!
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
2024-12-10 12:11:39 +08:00
|
|
|
|
如果不能访问镜像站点 hub.docker.com 或者模型站点 huggingface.co,请按照 [.env](./docker/.env) 注释修改 `RAGFLOW_IMAGE` 和 `HF_ENDPOINT`。
|
2024-09-29 18:24:24 +08:00
|
|
|
|
|
2024-12-10 12:11:39 +08:00
|
|
|
|
> [./docker/README](./docker/README.md) 解释了 [service_conf.yaml.template](./docker/service_conf.yaml.template) 用到的环境变量设置和服务配置。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
2024-09-29 18:24:24 +08:00
|
|
|
|
如需更新默认的 HTTP 服务端口(80), 可以在 [docker-compose.yml](./docker/docker-compose.yml) 文件中将配置 `80:80` 改为 `<YOUR_SERVING_PORT>:80`。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
> 所有系统配置都需要通过系统重启生效:
|
2024-04-01 10:54:11 +08:00
|
|
|
|
>
|
2024-03-31 23:08:41 +08:00
|
|
|
|
> ```bash
|
2025-02-19 13:19:36 +08:00
|
|
|
|
> $ docker compose -f docker-compose.yml up -d
|
2024-03-31 23:08:41 +08:00
|
|
|
|
> ```
|
|
|
|
|
|
2024-11-19 12:31:20 +08:00
|
|
|
|
### 把文档引擎从 Elasticsearch 切换成为 Infinity
|
2024-11-19 11:31:11 +08:00
|
|
|
|
|
|
|
|
|
RAGFlow 默认使用 Elasticsearch 存储文本和向量数据. 如果要切换为 [Infinity](https://github.com/infiniflow/infinity/), 可以按照下面步骤进行:
|
|
|
|
|
|
|
|
|
|
1. 停止所有容器运行:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
$ docker compose -f docker/docker-compose.yml down -v
|
|
|
|
|
```
|
2025-02-19 16:51:33 +08:00
|
|
|
|
Note: `-v` 将会删除 docker 容器的 volumes,已有的数据会被清空。
|
2024-11-19 11:31:11 +08:00
|
|
|
|
|
|
|
|
|
2. 设置 **docker/.env** 目录中的 `DOC_ENGINE` 为 `infinity`.
|
|
|
|
|
|
|
|
|
|
3. 启动容器:
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-02-19 13:19:36 +08:00
|
|
|
|
$ docker compose -f docker-compose.yml up -d
|
2024-11-19 11:31:11 +08:00
|
|
|
|
```
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
> [!WARNING]
|
2024-11-19 11:31:11 +08:00
|
|
|
|
> Infinity 目前官方并未正式支持在 Linux/arm64 架构下的机器上运行.
|
|
|
|
|
|
2024-10-02 19:43:22 +08:00
|
|
|
|
## 🔧 源码编译 Docker 镜像(不含 embedding 模型)
|
2024-09-29 17:27:15 +08:00
|
|
|
|
|
2024-12-09 12:44:57 +08:00
|
|
|
|
本 Docker 镜像大小约 2 GB 左右并且依赖外部的大模型和 embedding 服务。
|
2024-09-29 17:27:15 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git clone https://github.com/infiniflow/ragflow.git
|
|
|
|
|
cd ragflow/
|
2024-12-09 12:44:57 +08:00
|
|
|
|
docker build --build-arg LIGHTEN=1 --build-arg NEED_MIRROR=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```
|
|
|
|
|
|
2024-10-02 19:43:22 +08:00
|
|
|
|
## 🔧 源码编译 Docker 镜像(包含 embedding 模型)
|
2024-09-29 17:27:15 +08:00
|
|
|
|
|
|
|
|
|
本 Docker 大小约 9 GB 左右。由于已包含 embedding 模型,所以只需依赖外部的大模型服务即可。
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
git clone https://github.com/infiniflow/ragflow.git
|
|
|
|
|
cd ragflow/
|
2024-12-09 12:44:57 +08:00
|
|
|
|
docker build --build-arg NEED_MIRROR=1 -f Dockerfile -t infiniflow/ragflow:nightly .
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 🔨 以源代码启动服务
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
1. 安装 uv。如已经安装,可跳过本步骤:
|
|
|
|
|
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```bash
|
2025-01-14 11:49:43 +08:00
|
|
|
|
pipx install uv
|
2025-02-24 20:15:40 +08:00
|
|
|
|
export UV_INDEX=https://mirrors.aliyun.com/pypi/simple
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
2. 下载源代码并安装 Python 依赖:
|
|
|
|
|
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```bash
|
|
|
|
|
git clone https://github.com/infiniflow/ragflow.git
|
|
|
|
|
cd ragflow/
|
2025-01-14 11:49:43 +08:00
|
|
|
|
uv sync --python 3.10 --all-extras # install RAGFlow dependent python modules
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
3. 通过 Docker Compose 启动依赖的服务(MinIO, Elasticsearch, Redis, and MySQL):
|
|
|
|
|
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```bash
|
|
|
|
|
docker compose -f docker/docker-compose-base.yml up -d
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
在 `/etc/hosts` 中添加以下代码,将 **conf/service_conf.yaml** 文件中的所有 host 地址都解析为 `127.0.0.1`:
|
|
|
|
|
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```
|
2024-11-12 14:59:41 +08:00
|
|
|
|
127.0.0.1 es01 infinity mysql minio redis
|
2025-01-21 00:22:29 -03:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
4. 如果无法访问 HuggingFace,可以把环境变量 `HF_ENDPOINT` 设成相应的镜像站点:
|
2024-09-29 17:27:15 +08:00
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
export HF_ENDPOINT=https://hf-mirror.com
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
5. 启动后端服务:
|
|
|
|
|
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```bash
|
|
|
|
|
source .venv/bin/activate
|
|
|
|
|
export PYTHONPATH=$(pwd)
|
|
|
|
|
bash docker/launch_backend_service.sh
|
|
|
|
|
```
|
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
6. 安装前端依赖:
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```bash
|
|
|
|
|
cd web
|
2024-12-30 18:19:58 +08:00
|
|
|
|
npm install
|
2025-01-21 00:22:29 -03:00
|
|
|
|
```
|
|
|
|
|
7. 启动前端服务:
|
|
|
|
|
|
2024-09-29 17:27:15 +08:00
|
|
|
|
```bash
|
2025-01-21 00:22:29 -03:00
|
|
|
|
npm run dev
|
|
|
|
|
```
|
2024-09-29 17:27:15 +08:00
|
|
|
|
|
2025-01-21 00:22:29 -03:00
|
|
|
|
_以下界面说明系统已经成功启动:_
|
2024-09-29 17:27:15 +08:00
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
2024-04-15 17:01:18 +08:00
|
|
|
|
## 📚 技术文档
|
2024-04-08 19:20:57 +08:00
|
|
|
|
|
2024-06-01 16:24:10 +08:00
|
|
|
|
- [Quickstart](https://ragflow.io/docs/dev/)
|
2024-10-09 19:38:10 +08:00
|
|
|
|
- [User guide](https://ragflow.io/docs/dev/category/guides)
|
2024-06-07 09:06:46 +08:00
|
|
|
|
- [References](https://ragflow.io/docs/dev/category/references)
|
2024-06-01 16:24:10 +08:00
|
|
|
|
- [FAQ](https://ragflow.io/docs/dev/faq)
|
2024-04-08 19:20:57 +08:00
|
|
|
|
|
2024-03-31 23:08:41 +08:00
|
|
|
|
## 📜 路线图
|
|
|
|
|
|
2024-12-27 10:48:11 +08:00
|
|
|
|
详见 [RAGFlow Roadmap 2025](https://github.com/infiniflow/ragflow/issues/4214) 。
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
## 🏄 开源社区
|
|
|
|
|
|
2024-04-15 10:51:32 +08:00
|
|
|
|
- [Discord](https://discord.gg/4XxujFgUN7)
|
2024-03-31 23:08:41 +08:00
|
|
|
|
- [Twitter](https://twitter.com/infiniflowai)
|
2024-06-01 16:24:10 +08:00
|
|
|
|
- [GitHub Discussions](https://github.com/orgs/infiniflow/discussions)
|
2024-03-31 23:08:41 +08:00
|
|
|
|
|
|
|
|
|
## 🙌 贡献指南
|
|
|
|
|
|
2024-09-26 16:15:57 +08:00
|
|
|
|
RAGFlow 只有通过开源协作才能蓬勃发展。秉持这一精神,我们欢迎来自社区的各种贡献。如果您有意参与其中,请查阅我们的 [贡献者指南](./CONTRIBUTING.md) 。
|
2024-04-01 13:51:41 +08:00
|
|
|
|
|
2024-07-22 16:14:40 +08:00
|
|
|
|
## 🤝 商务合作
|
|
|
|
|
|
|
|
|
|
- [预约咨询](https://aao615odquw.feishu.cn/share/base/form/shrcnjw7QleretCLqh1nuPo1xxh)
|
|
|
|
|
|
2024-04-01 13:51:41 +08:00
|
|
|
|
## 👥 加入社区
|
|
|
|
|
|
2024-12-04 10:11:20 +08:00
|
|
|
|
扫二维码添加 RAGFlow 小助手,进 RAGFlow 交流群。
|
2024-04-01 13:51:41 +08:00
|
|
|
|
|
|
|
|
|
<p align="center">
|
2024-12-04 10:11:20 +08:00
|
|
|
|
<img src="https://github.com/infiniflow/ragflow/assets/7248/bccf284f-46f2-4445-9809-8f1030fb7585" width=50% height=50%>
|
2024-04-01 13:51:41 +08:00
|
|
|
|
</p>
|