writinwaters commited on
Commit
a778d24
·
1 Parent(s): 678763e

Added two developer guide and removed from README ' builder docker image' and 'launch service from source' (#2590)

Browse files
docs/references/CONTRIBUTING.md → CONTRIBUTING.md RENAMED
@@ -1,16 +1,10 @@
1
- ---
2
- sidebar_position: 0
3
- slug: /contribution_guidelines
4
- ---
5
-
6
  # Contribution guidelines
7
 
8
- Thanks for wanting to contribute to RAGFlow. This document offers guidlines and major considerations for submitting your contributions.
9
 
10
  - To report a bug, file a [GitHub issue](https://github.com/infiniflow/ragflow/issues/new/choose) with us.
11
  - For further questions, you can explore existing discussions or initiate a new one in [Discussions](https://github.com/orgs/infiniflow/discussions).
12
 
13
-
14
  ## What you can contribute
15
 
16
  The list below mentions some contributions you can make, but it is not a complete list.
@@ -27,7 +21,7 @@ The list below mentions some contributions you can make, but it is not a complet
27
  ### General workflow
28
 
29
  1. Fork our GitHub repository.
30
- 2. Clone your fork to your local machine:
31
  `git clone git@github.com:<yourname>/ragflow.git`
32
  3. Create a local branch:
33
  `git checkout -b my-branch`
@@ -39,14 +33,16 @@ The list below mentions some contributions you can make, but it is not a complet
39
 
40
  ### Before filing a PR
41
 
42
- - Consider splitting a large PR into multiple smaller, standalone PRs to keep a traceable development history.
43
  - Ensure that your PR addresses just one issue, or keep any unrelated changes small.
44
  - Add test cases when contributing new features. They demonstrate that your code functions correctly and protect against potential issues from future changes.
45
- ### Describing your PR
 
46
 
47
  - Ensure that your PR title is concise and clear, providing all the required information.
48
- - Refer to a corresponding GitHub issue in your PR description if applicable.
49
  - Include sufficient design details for *breaking changes* or *API changes* in your description.
50
 
51
  ### Reviewing & merging a PR
52
- - Ensure that your PR passes all Continuous Integration (CI) tests before merging it.
 
 
 
 
 
 
 
1
  # Contribution guidelines
2
 
3
+ This document offers guidlines and major considerations for submitting your contributions to RAGFlow.
4
 
5
  - To report a bug, file a [GitHub issue](https://github.com/infiniflow/ragflow/issues/new/choose) with us.
6
  - For further questions, you can explore existing discussions or initiate a new one in [Discussions](https://github.com/orgs/infiniflow/discussions).
7
 
 
8
  ## What you can contribute
9
 
10
  The list below mentions some contributions you can make, but it is not a complete list.
 
21
  ### General workflow
22
 
23
  1. Fork our GitHub repository.
24
+ 2. Clone your fork to your local machine:
25
  `git clone git@github.com:<yourname>/ragflow.git`
26
  3. Create a local branch:
27
  `git checkout -b my-branch`
 
33
 
34
  ### Before filing a PR
35
 
36
+ - Consider splitting a large PR into multiple smaller, standalone PRs to keep a traceable development history.
37
  - Ensure that your PR addresses just one issue, or keep any unrelated changes small.
38
  - Add test cases when contributing new features. They demonstrate that your code functions correctly and protect against potential issues from future changes.
39
+
40
+ ### Describing your PR
41
 
42
  - Ensure that your PR title is concise and clear, providing all the required information.
43
+ - Refer to a corresponding GitHub issue in your PR description if applicable.
44
  - Include sufficient design details for *breaking changes* or *API changes* in your description.
45
 
46
  ### Reviewing & merging a PR
47
+
48
+ Ensure that your PR passes all Continuous Integration (CI) tests before merging it.
README.md CHANGED
@@ -42,8 +42,6 @@
42
  - 🔎 [System Architecture](#-system-architecture)
43
  - 🎬 [Get Started](#-get-started)
44
  - 🔧 [Configurations](#-configurations)
45
- - 🛠️ [Build RAGFlow image](#-build-ragflow-image)
46
- - 🛠️ [Launch service from source for development](#-launch-service-from-source-for-development)
47
  - 📚 [Documentation](#-documentation)
48
  - 📜 [Roadmap](#-roadmap)
49
  - 🏄 [Community](#-community)
@@ -188,7 +186,7 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
188
 
189
  > See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
190
 
191
- _The show is now on!_
192
 
193
  ## 🔧 Configurations
194
 
@@ -210,79 +208,6 @@ Updates to the above configurations require a reboot of all containers to take e
210
  > $ docker-compose -f docker/docker-compose.yml up -d
211
  > ```
212
 
213
- ## 🛠️ Build RAGFlow image
214
-
215
- To build the Docker images from source:
216
-
217
- ```bash
218
- $ git clone https://github.com/infiniflow/ragflow.git
219
- $ cd ragflow/
220
- $ docker build -f Dockerfile.scratch -t infiniflow/ragflow:dev .
221
- ```
222
-
223
- ## 🛠️ Launch service from source for development
224
-
225
- To launch the service from source:
226
-
227
- 1. Clone the repository:
228
-
229
- ```bash
230
- $ git clone https://github.com/infiniflow/ragflow.git
231
- $ cd ragflow/
232
- ```
233
-
234
- 2. Install all python dependencies in a newly created virtual environment named `.venv`:
235
-
236
- ```bash
237
- $ curl -sSL https://install.python-poetry.org | python3 -
238
- $ $HOME/.local/bin/poetry install --sync --no-root
239
- ```
240
-
241
- 3. Copy the entry script and configure environment variables:
242
-
243
- ```bash
244
- # Adjust configurations according to your actual situation (the following two export commands are newly added):
245
- # - Comment out `LD_LIBRARY_PATH`, if it is configured.
246
- # - Optional: Add Hugging Face mirror.
247
- source ~/.venv/bin/activate
248
- export PYTHONPATH=$(pwd)
249
- export HF_ENDPOINT=https://hf-mirror.com
250
- ```
251
-
252
- 4. Launch the third-party services (MinIO, Elasticsearch, Redis, and MySQL):
253
-
254
- ```bash
255
- $ docker compose -f docker/docker-compose-base.yml up -d
256
- ```
257
-
258
- 5. Adjust configurations
259
- Add the following line to `/etc/hosts` to resolve all hosts in `docker/service_conf.yaml` to `127.0.0.1`:
260
-
261
- ```
262
- 127.0.0.1 es01 mysql minio redis
263
- ```
264
-
265
- Edit `docker/service_conf.yaml` to change mysql port to `5455` and es port to `1200`, as specified in `docker/.env`.
266
-
267
- 6. Launch the RAGFlow backend service:
268
- Comment out the `nginx` line in `docker/entrypoint.sh` and run the script:
269
-
270
- ```bash
271
- $ bash docker/entrypoint.sh
272
- ```
273
-
274
- 7. Launch the frontend service:
275
-
276
- ```bash
277
- $ cd web
278
- $ npm install --force
279
- $ vim .umirc.ts
280
- # Update proxy.target to http://127.0.0.1:9380
281
- $ npm run dev
282
- ```
283
-
284
- 8. In your web browser, enter `http://127.0.0.1/`.
285
-
286
  ## 📚 Documentation
287
 
288
  - [Quickstart](https://ragflow.io/docs/dev/)
@@ -302,4 +227,4 @@ See the [RAGFlow Roadmap 2024](https://github.com/infiniflow/ragflow/issues/162)
302
 
303
  ## 🙌 Contributing
304
 
305
- RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community. If you would like to be a part, review our [Contribution Guidelines](./docs/references/CONTRIBUTING.md) first.
 
42
  - 🔎 [System Architecture](#-system-architecture)
43
  - 🎬 [Get Started](#-get-started)
44
  - 🔧 [Configurations](#-configurations)
 
 
45
  - 📚 [Documentation](#-documentation)
46
  - 📜 [Roadmap](#-roadmap)
47
  - 🏄 [Community](#-community)
 
186
 
187
  > See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
188
 
189
+ _The show is on!_
190
 
191
  ## 🔧 Configurations
192
 
 
208
  > $ docker-compose -f docker/docker-compose.yml up -d
209
  > ```
210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
  ## 📚 Documentation
212
 
213
  - [Quickstart](https://ragflow.io/docs/dev/)
 
227
 
228
  ## 🙌 Contributing
229
 
230
+ RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community. If you would like to be a part, review our [Contribution Guidelines](./CONTRIBUTING.md) first.
README_ja.md CHANGED
@@ -194,79 +194,6 @@
194
  > $ docker-compose up -d
195
  > ```
196
 
197
- ## 🛠️ ソースからビルドする
198
-
199
- ソースからDockerイメージをビルドするには:
200
-
201
- ```bash
202
- $ git clone https://github.com/infiniflow/ragflow.git
203
- $ cd ragflow/
204
- $ docker build -t infiniflow/ragflow:v0.11.0 .
205
- $ cd ragflow/docker
206
- $ chmod +x ./entrypoint.sh
207
- $ docker compose up -d
208
- ```
209
-
210
- ## 🛠️ ソースコードからサービスを起動する方法
211
-
212
- ソースコードからサービスを起動する場合は、以下の手順に従ってください:
213
-
214
- 1. リポジトリをクローンします
215
- ```bash
216
- $ git clone https://github.com/infiniflow/ragflow.git
217
- $ cd ragflow/
218
- ```
219
-
220
- 2. 仮想環境を作成します(AnacondaまたはMinicondaがインストールされていることを確認してください)
221
- ```bash
222
- $ conda create -n ragflow python=3.11.0
223
- $ conda activate ragflow
224
- $ pip install -r requirements.txt
225
- ```
226
- CUDAのバージョンが12.0以上の場合、以下の追加コマンドを実行してください:
227
- ```bash
228
- $ pip uninstall -y onnxruntime-gpu
229
- $ pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
230
- ```
231
-
232
- 3. エントリースクリプトをコピーし、環境変数を設定します
233
- ```bash
234
- $ cp docker/entrypoint.sh .
235
- $ vi entrypoint.sh
236
- ```
237
- 以下のコマンドで Python のパスとragflowプロジェクトのパスを取得します:
238
- ```bash
239
- $ which python
240
- $ pwd
241
- ```
242
-
243
- `which python` の出力を `PY` の値として、`pwd` の出力を `PYTHONPATH` の値として設定します。
244
-
245
- `LD_LIBRARY_PATH` が既に設定されている場合は、コメントアウトできます。
246
-
247
- ```bash
248
- # 実際の状況に応じて設定を調整してください。以下の二つの export は新たに追加された設定です
249
- PY=${PY}
250
- export PYTHONPATH=${PYTHONPATH}
251
- # オプション:Hugging Face ミラーを追加
252
- export HF_ENDPOINT=https://hf-mirror.com
253
- ```
254
-
255
- 4. 基本サービスを起動します
256
- ```bash
257
- $ cd docker
258
- $ docker compose -f docker-compose-base.yml up -d
259
- ```
260
-
261
- 5. 設定ファイルを確認します
262
- **docker/.env** 内の設定が**conf/service_conf.yaml**内の設定と一致していることを確認してください。**service_conf.yaml**内の関連サービスのIPアドレスとポートは、ローカルマシンのIPアドレスとコンテナが公開するポートに変更する必要があります。
263
-
264
- 6. サービスを起動します
265
- ```bash
266
- $ chmod +x ./entrypoint.sh
267
- $ bash ./entrypoint.sh
268
- ```
269
-
270
  ## 📚 ドキュメンテーション
271
 
272
  - [Quickstart](https://ragflow.io/docs/dev/)
@@ -286,4 +213,4 @@ $ bash ./entrypoint.sh
286
 
287
  ## 🙌 コントリビュート
288
 
289
- RAGFlow はオープンソースのコラボレーションによって発展してきました。この精神に基づき、私たちはコミュニティからの多様なコントリビュートを受け入れています。 参加を希望される方は、まず [コントリビューションガイド](./docs/references/CONTRIBUTING.md)をご覧ください。
 
194
  > $ docker-compose up -d
195
  > ```
196
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  ## 📚 ドキュメンテーション
198
 
199
  - [Quickstart](https://ragflow.io/docs/dev/)
 
213
 
214
  ## 🙌 コントリビュート
215
 
216
+ RAGFlow はオープンソースのコラボレーションによって発展してきました。この精神に基づき、私たちはコミュニティからの多様なコントリビュートを受け入れています。 参加を希望される方は、まず [コントリビューションガイド](./CONTRIBUTING.md)をご覧ください。
README_ko.md CHANGED
@@ -198,111 +198,6 @@
198
  > $ docker-compose up -d
199
  > ```
200
 
201
- ## 🛠️ 소스에서 빌드하기
202
-
203
- Docker 이미지를 소스에서 빌드하려면:
204
-
205
- ```bash
206
- $ git clone https://github.com/infiniflow/ragflow.git
207
- $ cd ragflow/
208
- $ docker build -t infiniflow/ragflow:dev .
209
- $ cd ragflow/docker
210
- $ chmod +x ./entrypoint.sh
211
- $ docker compose up -d
212
- ```
213
-
214
-
215
- ## 🛠️ 소스에서 서비스 시작하기
216
-
217
- 서비스를 소스에서 시작하려면:
218
-
219
- 1. 레포지토리를 클론하세요:
220
-
221
- ```bash
222
- $ git clone https://github.com/infiniflow/ragflow.git
223
- $ cd ragflow/
224
- ```
225
-
226
- 2. 가상 환경을 생성하고, Anaconda 또는 Miniconda가 설치되어 있는지 확인하세요:
227
- ```bash
228
- $ conda create -n ragflow python=3.11.0
229
- $ conda activate ragflow
230
- $ pip install -r requirements.txt
231
- ```
232
-
233
- ```bash
234
- # CUDA 버전이 12.0보다 높은 경우, 다음 명령어를 추가로 실행하세요:
235
- $ pip uninstall -y onnxruntime-gpu
236
- $ pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
237
- ```
238
-
239
- 3. 진입 스크립트를 복사하고 환경 변수를 설정하세요:
240
- ```bash
241
- # 파이썬 경로를 받아옵니다:
242
- $ which python
243
- # RAGFlow 프로젝트 경로를 받아옵니다:
244
- $ pwd
245
- ```
246
-
247
- ```bash
248
- $ cp docker/entrypoint.sh .
249
- $ vi entrypoint.sh
250
- ```
251
-
252
- ```bash
253
- # 실제 상황에 맞게 설정 조정하기 (다음 두 개의 export 명령어는 새로 추가되었습니다):
254
- # - `which python`의 결과를 `PY`에 할당합니다.
255
- # - `pwd`의 결과를 `PYTHONPATH`에 할당합니다.
256
- # - `LD_LIBRARY_PATH`가 설정되어 있는 경우 주석 처리합니다.
257
- # - 선택 사항: Hugging Face 미러 추가.
258
- PY=${PY}
259
- export PYTHONPATH=${PYTHONPATH}
260
- export HF_ENDPOINT=https://hf-mirror.com
261
- ```
262
-
263
- 4. 다른 서비스(MinIO, Elasticsearch, Redis, MySQL)를 시작하세요:
264
- ```bash
265
- $ cd docker
266
- $ docker compose -f docker-compose-base.yml up -d
267
- ```
268
-
269
- 5. 설정 파일을 확인하여 다음 사항을 확인하세요:
270
- - **docker/.env**의 설정이 **conf/service_conf.yaml**의 설정과 일치하는지 확인합니다.
271
- - **service_conf.yaml**의 관련 서비스에 대한 IP 주소와 포트가 로컬 머신의 IP 주소와 컨테이너에서 노출된 포트와 일치하는지 확인합니다.
272
-
273
-
274
- 6. RAGFlow 백엔드 서비스를 시작합니다:
275
-
276
- ```bash
277
- $ chmod +x ./entrypoint.sh
278
- $ bash ./entrypoint.sh
279
- ```
280
-
281
- 7. 프론트엔드 서비스를 시작합니다:
282
-
283
- ```bash
284
- $ cd web
285
- $ npm install --registry=https://registry.npmmirror.com --force
286
- $ vim .umirc.ts
287
- # proxy.target을 http://127.0.0.1:9380로 업데이트합니다.
288
- $ npm run dev
289
- ```
290
-
291
- 8. 프론트엔드 서비스를 배포합니다:
292
-
293
- ```bash
294
- $ cd web
295
- $ npm install --registry=https://registry.npmmirror.com --force
296
- $ umi build
297
- $ mkdir -p /ragflow/web
298
- $ cp -r dist /ragflow/web
299
- $ apt install nginx -y
300
- $ cp ../docker/nginx/proxy.conf /etc/nginx
301
- $ cp ../docker/nginx/nginx.conf /etc/nginx
302
- $ cp ../docker/nginx/ragflow.conf /etc/nginx/conf.d
303
- $ systemctl start nginx
304
- ```
305
-
306
  ## 📚 문서
307
 
308
  - [Quickstart](https://ragflow.io/docs/dev/)
@@ -322,4 +217,4 @@ $ docker compose up -d
322
 
323
  ## 🙌 컨트리뷰션
324
 
325
- RAGFlow는 오픈소스 협업을 통해 발전합니다. 이러한 정신을 바탕으로, 우리는 커뮤니티의 다양한 기여를 환영합니다. 참여하고 싶으시다면, 먼저 [가이드라인](./docs/references/CONTRIBUTING.md)을 검토해 주세요.
 
198
  > $ docker-compose up -d
199
  > ```
200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  ## 📚 문서
202
 
203
  - [Quickstart](https://ragflow.io/docs/dev/)
 
217
 
218
  ## 🙌 컨트리뷰션
219
 
220
+ RAGFlow는 오픈소스 협업을 통해 발전합니다. 이러한 정신을 바탕으로, 우리는 커뮤니티의 다양한 기여를 환영합니다. 참여하고 싶으시다면, 먼저 [가이드라인](./CONTRIBUTING.md)을 검토해 주세요.
README_zh.md CHANGED
@@ -192,108 +192,6 @@
192
  > $ docker compose -f docker-compose-CN.yml up -d
193
  > ```
194
 
195
- ## 🛠️ 源码编译、安装 Docker 镜像
196
-
197
- 如需从源码安装 Docker 镜像:
198
-
199
- ```bash
200
- $ git clone https://github.com/infiniflow/ragflow.git
201
- $ cd ragflow/
202
- $ docker build -t infiniflow/ragflow:v0.11.0 .
203
- $ cd ragflow/docker
204
- $ chmod +x ./entrypoint.sh
205
- $ docker compose up -d
206
- ```
207
-
208
- ## 🛠️ 源码启动服务
209
-
210
- 如需从源码启动服务,请参考以下步骤:
211
-
212
- 1. 克隆仓库
213
-
214
- ```bash
215
- $ git clone https://github.com/infiniflow/ragflow.git
216
- $ cd ragflow/
217
- ```
218
-
219
- 2. 创建虚拟环境(确保已安装 Anaconda 或 Miniconda)
220
-
221
- ```bash
222
- $ conda create -n ragflow python=3.11.0
223
- $ conda activate ragflow
224
- $ pip install -r requirements.txt
225
- ```
226
- 如果 cuda > 12.0,需额外执行以下命令:
227
- ```bash
228
- $ pip uninstall -y onnxruntime-gpu
229
- $ pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
230
- ```
231
-
232
- 3. 拷贝入口脚本并配置环境变量
233
-
234
- ```bash
235
- $ cp docker/entrypoint.sh .
236
- $ vi entrypoint.sh
237
- ```
238
- 使用以下命令获取python路径及ragflow项目路径:
239
- ```bash
240
- $ which python
241
- $ pwd
242
- ```
243
-
244
- 将上述 `which python` 的输出作为 `PY` 的值,将 `pwd` 的输出作为 `PYTHONPATH` 的值。
245
-
246
- `LD_LIBRARY_PATH` 如果环境已经配置好,可以注释掉。
247
-
248
- ```bash
249
- # 此处配置需要按照实际情况调整,两个 export 为新增配置
250
- PY=${PY}
251
- export PYTHONPATH=${PYTHONPATH}
252
- # 可选:添加 Hugging Face 镜像
253
- export HF_ENDPOINT=https://hf-mirror.com
254
- ```
255
-
256
- 4. 启动基础服务
257
-
258
- ```bash
259
- $ cd docker
260
- $ docker compose -f docker-compose-base.yml up -d
261
- ```
262
-
263
- 5. 检查配置文件
264
- 确保**docker/.env**中的配置与**conf/service_conf.yaml**中配置一致, **service_conf.yaml**中相关服务的IP地址与端口应该改成本机IP地址及容器映射出来的端口。
265
-
266
- 6. 启动服务
267
-
268
- ```bash
269
- $ chmod +x ./entrypoint.sh
270
- $ bash ./entrypoint.sh
271
- ```
272
-
273
- 7. 启动WebUI服务
274
-
275
- ```bash
276
- $ cd web
277
- $ npm install --registry=https://registry.npmmirror.com --force
278
- $ vim .umirc.ts
279
- # 修改proxy.target为http://127.0.0.1:9380
280
- $ npm run dev
281
- ```
282
-
283
- 8. 部署WebUI服务
284
-
285
- ```bash
286
- $ cd web
287
- $ npm install --registry=https://registry.npmmirror.com --force
288
- $ umi build
289
- $ mkdir -p /ragflow/web
290
- $ cp -r dist /ragflow/web
291
- $ apt install nginx -y
292
- $ cp ../docker/nginx/proxy.conf /etc/nginx
293
- $ cp ../docker/nginx/nginx.conf /etc/nginx
294
- $ cp ../docker/nginx/ragflow.conf /etc/nginx/conf.d
295
- $ systemctl start nginx
296
- ```
297
  ## 📚 技术文档
298
 
299
  - [Quickstart](https://ragflow.io/docs/dev/)
@@ -313,7 +211,7 @@ $ systemctl start nginx
313
 
314
  ## 🙌 贡献指南
315
 
316
- RAGFlow 只有通过开源协作才能蓬勃发展。秉持这一精神,我们欢迎来自社区的各种贡献。如果您有意参与其中,请查阅我们的 [贡献者指南](./docs/references/CONTRIBUTING.md) 。
317
 
318
  ## 🤝 商务合作
319
 
 
192
  > $ docker compose -f docker-compose-CN.yml up -d
193
  > ```
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  ## 📚 技术文档
196
 
197
  - [Quickstart](https://ragflow.io/docs/dev/)
 
211
 
212
  ## 🙌 贡献指南
213
 
214
+ RAGFlow 只有通过开源协作才能蓬勃发展。秉持这一精神,我们欢迎来自社区的各种贡献。如果您有意参与其中,请查阅我们的 [贡献者指南](./CONTRIBUTING.md) 。
215
 
216
  ## 🤝 商务合作
217
 
docs/guides/_category_.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
- "label": "User Guides",
3
  "position": 2,
4
  "link": {
5
  "type": "generated-index",
6
- "description": "RAGFlow User Guides"
7
  }
8
  }
 
1
  {
2
+ "label": "Guides",
3
  "position": 2,
4
  "link": {
5
  "type": "generated-index",
6
+ "description": "Guides for RAGFlow users and developers."
7
  }
8
  }
docs/guides/agentic_rag/_category_.json CHANGED
@@ -3,6 +3,6 @@
3
  "position": 3,
4
  "link": {
5
  "type": "generated-index",
6
- "description": "RAGFlow v0.8.0 introduces an agent mechanism, featuring a no-code workflow editor on the front end and a comprehensive graph-based task orchestration framework on the back end."
7
  }
8
  }
 
3
  "position": 3,
4
  "link": {
5
  "type": "generated-index",
6
+ "description": "RAGFlow v0.8.0 introduces an agent mechanism, featuring a no-code workflow editor on the front end and a comprehensive graph-based task orchestration framework on the backend."
7
  }
8
  }
docs/guides/agentic_rag/agent_introduction.md CHANGED
@@ -53,9 +53,9 @@ Please review the flowing description of the RAG-specific components before you
53
  | -------------- | ------------------------------------------------------------ |
54
  | **Retrieval** | A component that retrieves information from specified knowledge bases and returns 'Empty response' if no information is found. Ensure the correct knowledge bases are selected. |
55
  | **Generate** | A component that prompts the LLM to generate responses. You must ensure the prompt is set correctly. |
56
- | **Answer** | A component that serves as the interface between human and the bot, receiving user inputs and displaying the agent's responses. |
57
  | **Categorize** | A component that uses the LLM to classify user inputs into predefined categories. Ensure you specify the name, description, and examples for each category, along with the corresponding next component. |
58
- | **Message** | A component that sends out a static message. If multiple messages are supplied, it randomly selects one to send. Ensure its downstream is **Answer**, the interface component. |
59
  | **Relevant** | A component that uses the LLM to assess whether the upstream output is relevant to the user's latest query. Ensure you specify the next component for each judge result. |
60
  | **Rewrite** | A component that refines a user query if it fails to retrieve relevant information from the knowledge base. It repeats this process until the predefined looping upper limit is reached. Ensure its upstream is **Relevant** and downstream is **Retrieval**. |
61
  | **Keyword** | A component that retrieves top N search results from wikipedia.org. Ensure the TopN value is set properly before use. |
@@ -63,8 +63,8 @@ Please review the flowing description of the RAG-specific components before you
63
  :::caution NOTE
64
 
65
  - Ensure **Rewrite**'s upstream component is **Relevant** and downstream component is **Retrieval**.
66
- - Ensure the downstream component of **Message** is **Answer**.
67
- - The downstream component of **Begin** is always **Answer**.
68
 
69
  :::
70
 
 
53
  | -------------- | ------------------------------------------------------------ |
54
  | **Retrieval** | A component that retrieves information from specified knowledge bases and returns 'Empty response' if no information is found. Ensure the correct knowledge bases are selected. |
55
  | **Generate** | A component that prompts the LLM to generate responses. You must ensure the prompt is set correctly. |
56
+ | **Interact** | A component that serves as the interface between human and the bot, receiving user inputs and displaying the agent's responses. |
57
  | **Categorize** | A component that uses the LLM to classify user inputs into predefined categories. Ensure you specify the name, description, and examples for each category, along with the corresponding next component. |
58
+ | **Message** | A component that sends out a static message. If multiple messages are supplied, it randomly selects one to send. Ensure its downstream is **Interact**, the interface component. |
59
  | **Relevant** | A component that uses the LLM to assess whether the upstream output is relevant to the user's latest query. Ensure you specify the next component for each judge result. |
60
  | **Rewrite** | A component that refines a user query if it fails to retrieve relevant information from the knowledge base. It repeats this process until the predefined looping upper limit is reached. Ensure its upstream is **Relevant** and downstream is **Retrieval**. |
61
  | **Keyword** | A component that retrieves top N search results from wikipedia.org. Ensure the TopN value is set properly before use. |
 
63
  :::caution NOTE
64
 
65
  - Ensure **Rewrite**'s upstream component is **Relevant** and downstream component is **Retrieval**.
66
+ - Ensure the downstream component of **Message** is **Interact**.
67
+ - The downstream component of **Begin** is always **Interact**.
68
 
69
  :::
70
 
docs/guides/agentic_rag/general_purpose_chatbot.md CHANGED
@@ -26,7 +26,7 @@ To create a general-purpose chatbot agent using our template:
26
  3. On the **agent template** page, hover over the card on **General-purpose chatbot** and click **Use this template**.
27
  *You are now directed to the **no-code workflow editor** page.*
28
 
29
- ![workflow_editor](https://github.com/user-attachments/assets/9fc6891c-7784-43b8-ab4a-3b08a9e551c4)
30
 
31
  :::tip NOTE
32
  RAGFlow's no-code editor spares you the trouble of coding, making agent development effortless.
@@ -40,10 +40,9 @@ Here’s a breakdown of each component and its role and requirements in the chat
40
  - Function: Sets the opening greeting for the user.
41
  - Purpose: Establishes a welcoming atmosphere and prepares the user for interaction.
42
 
43
- - **Answer**
44
  - Function: Serves as the interface between human and the bot.
45
  - Role: Acts as the downstream component of **Begin**.
46
- - Note: Though named "Answer", it does not engage with the LLM.
47
 
48
  - **Retrieval**
49
  - Function: Retrieves information from specified knowledge base(s).
@@ -78,7 +77,7 @@ Here’s a breakdown of each component and its role and requirements in the chat
78
 
79
  4. Click **Relevant** to review or change its settings:
80
  *You may retain the current settings, but feel free to experiment with changes to understand how the agent operates.*
81
- ![relevant_settings](https://github.com/user-attachments/assets/f582cc1c-0dd5-499c-813a-294dbfb941dd)
82
 
83
  5. Click **Rewrite** to select a different model for query rewriting or update the maximum loop times for query rewriting:
84
  ![choose_model](https://github.com/user-attachments/assets/2bac1d6c-c4f1-42ac-997b-102858c3f550)
 
26
  3. On the **agent template** page, hover over the card on **General-purpose chatbot** and click **Use this template**.
27
  *You are now directed to the **no-code workflow editor** page.*
28
 
29
+ ![workflow_editor](https://github.com/user-attachments/assets/52e7dc62-4bf5-4fbb-ab73-4a6e252065f0)
30
 
31
  :::tip NOTE
32
  RAGFlow's no-code editor spares you the trouble of coding, making agent development effortless.
 
40
  - Function: Sets the opening greeting for the user.
41
  - Purpose: Establishes a welcoming atmosphere and prepares the user for interaction.
42
 
43
+ - **Interact**
44
  - Function: Serves as the interface between human and the bot.
45
  - Role: Acts as the downstream component of **Begin**.
 
46
 
47
  - **Retrieval**
48
  - Function: Retrieves information from specified knowledge base(s).
 
77
 
78
  4. Click **Relevant** to review or change its settings:
79
  *You may retain the current settings, but feel free to experiment with changes to understand how the agent operates.*
80
+ ![relevant_settings](https://github.com/user-attachments/assets/9ff7fdd8-7a69-4ee2-bfba-c7fb8029150f)
81
 
82
  5. Click **Rewrite** to select a different model for query rewriting or update the maximum loop times for query rewriting:
83
  ![choose_model](https://github.com/user-attachments/assets/2bac1d6c-c4f1-42ac-997b-102858c3f550)
docs/guides/develop/_category_.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "label": "Develop",
3
+ "position": 10,
4
+ "link": {
5
+ "type": "generated-index",
6
+ "description": "Guides for Hardcore Developers"
7
+ }
8
+ }
docs/guides/develop/build_docker_image.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ sidebar_position: 1
3
+ slug: /build_docker_image
4
+ ---
5
+
6
+ # Build a RAGFlow Docker Image
7
+
8
+ A guide explaining how to build a RAGFlow Docker image from its source code. By following this guide, you'll be able to create a local Docker image that can be used for development, debugging, or testing purposes.
9
+
10
+ ## Target Audience
11
+
12
+ - Developers who have added new features or modified the existing code and require a Docker image to view and debug their changes.
13
+ - Testers looking to explore the latest features of RAGFlow in a Docker image.
14
+
15
+ ## Prerequisites
16
+
17
+ - CPU &ge; 4 cores
18
+ - RAM &ge; 16 GB
19
+ - Disk &ge; 50 GB
20
+ - Docker &ge; 24.0.0 & Docker Compose &ge; v2.26.1
21
+
22
+ :::tip NOTE
23
+ If you have not installed Docker on your local machine (Windows, Mac, or Linux), see the [Install Docker Engine](https://docs.docker.com/engine/install/) guide.
24
+ :::
25
+
26
+ ## Build a RAGFlow Docker Image
27
+
28
+ To build a RAGFlow Docker image from source code:
29
+
30
+ ### Git Clone the Repository
31
+
32
+ ```bash
33
+ git clone https://github.com/infiniflow/ragflow.git
34
+ ```
35
+
36
+ ### Build the Docker Image
37
+
38
+ Navigate to the `ragflow` directory where the Dockerfile and other necessary files are located. Now you can build the Docker image using the provided Dockerfile. The command below specifies which Dockerfile to use and tages the image with a name for reference purpose.
39
+
40
+ ```bash
41
+ cd ragflow/
42
+ docker build -f Dockerfile.scratch -t infiniflow/ragflow:dev .
43
+ ```
docs/guides/develop/launch_ragflow_from_source.md ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ sidebar_position: 2
3
+ slug: /launch_ragflow_from_source
4
+ ---
5
+
6
+ # Launch the RAGFlow Service from Source
7
+
8
+ A guide explaining how to set up a RAGFlow service from its source code. By following this guide, you'll be able to debug using the source code.
9
+
10
+ ## Target Audience
11
+
12
+ Developers who have added new features or modified existing code and wish to debug using the source code, *provided that* their machine has the target deployment environment set up.
13
+
14
+ ## Prerequisites
15
+
16
+ - CPU &ge; 4 cores
17
+ - RAM &ge; 16 GB
18
+ - Disk &ge; 50 GB
19
+ - Docker &ge; 24.0.0 & Docker Compose &ge; v2.26.1
20
+
21
+ :::tip NOTE
22
+ If you have not installed Docker on your local machine (Windows, Mac, or Linux), see the [Install Docker Engine](https://docs.docker.com/engine/install/) guide.
23
+ :::
24
+
25
+ ## Launch the Service from Source
26
+
27
+ To launch the RAGFlow service from source code:
28
+
29
+ ### Clone the RAGFlow Repository
30
+
31
+ ```bash
32
+ git clone https://github.com/infiniflow/ragflow.git
33
+ cd ragflow/
34
+ ```
35
+
36
+ ### Install Python dependencies
37
+
38
+ 1. Install Poetry:
39
+
40
+ ```bash
41
+ curl -sSL https://install.python-poetry.org | python3 -
42
+ ```
43
+
44
+ 2. Configure Poetry:
45
+
46
+ ```bash
47
+ export POETRY_VIRTUALENVS_CREATE=true POETRY_VIRTUALENVS_IN_PROJECT=true
48
+ ```
49
+
50
+ 3. Install Python dependencies:
51
+
52
+ ```bash
53
+ ~/.local/bin/poetry install --sync --no-root
54
+ ```
55
+ *A virtual environment named `.venv` is created, and all Python dependencies are installed into the new environment.*
56
+
57
+ ### Launch Third-party Services
58
+
59
+ The following command launches the 'base' services (MinIO, Elasticsearch, Redis, and MySQL) using Docker Compose:
60
+
61
+ ```bash
62
+ docker compose -f docker/docker-compose-base.yml up -d
63
+ ```
64
+
65
+ ### Update `host` and `port` Settings for Third-party Services
66
+
67
+ 1. Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/service_conf.yaml** to `127.0.0.1`:
68
+
69
+ ```
70
+ 127.0.0.1 es01 mysql minio redis
71
+ ```
72
+
73
+ 2. In **docker/service_conf.yaml**, update mysql port to `5455` and es port to `1200`, as specified in **docker/.env**.
74
+
75
+ ### Launch the RAGFlow Backend Service
76
+
77
+ 1. Comment out the `nginx` line in **docker/entrypoint.sh**.
78
+
79
+ ```
80
+ # /usr/sbin/nginx
81
+ ```
82
+
83
+ 2. Activate the Python virtual environment:
84
+
85
+ ```bash
86
+ source .venv/bin/activate
87
+ export PYTHONPATH=$(pwd)
88
+ ```
89
+
90
+ 3. **Optional:** If you cannot access HuggingFace, set the HF_ENDPOINT environment variable to use a mirror site:
91
+
92
+ ```bash
93
+ export HF_ENDPOINT=https://hf-mirror.com
94
+ ```
95
+
96
+ 4. Run the **entrypoint.sh** script to launch the backend service:
97
+
98
+ ```
99
+ bash docker/entrypoint.sh
100
+ ```
101
+
102
+ ### Launch the RAGFlow frontend service
103
+
104
+ 1. Navigate to the `web` directory and install the frontend dependencies:
105
+
106
+ ```bash
107
+ cd web
108
+ npm install --force
109
+ ```
110
+
111
+ 2. Update `proxy.target` in **.umirc.ts** to `http://127.0.0.1:9380`:
112
+
113
+ ```bash
114
+ vim .umirc.ts
115
+ ```
116
+
117
+ 3. Start up the RAGFlow frontend service:
118
+
119
+ ```bash
120
+ npm run dev
121
+ ```
122
+
123
+ *The following message appears, showing the IP address and port number of your frontend service:*
124
+
125
+ ![](https://github.com/user-attachments/assets/0daf462c-a24d-4496-a66f-92533534e187)
126
+
127
+ ### Access the RAGFlow service
128
+
129
+ In your web browser, enter `http://127.0.0.1:<PORT>/`, ensuring the port number matches that shown in the screenshot above.
docs/references/_category_.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "label": "References",
3
- "position": 3,
4
  "link": {
5
  "type": "generated-index",
6
- "description": "RAGFlow References"
7
  }
8
  }
 
1
  {
2
  "label": "References",
3
+ "position": 4,
4
  "link": {
5
  "type": "generated-index",
6
+ "description": "Miscellaneous References"
7
  }
8
  }