Skip to content

Commit 4de6f47

Browse files
author
zhangping24
committed
Merge branch 'main' into support_baidu_vdb
2 parents 04aa11a + 9c6c6c5 commit 4de6f47

File tree

493 files changed

+30233
-4058
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

493 files changed

+30233
-4058
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050

5151
# https://github.com/astral-sh/ruff-action
5252
- name: Static check with Ruff
53-
uses: astral-sh/ruff-action@v2
53+
uses: astral-sh/ruff-action@v3
5454
with:
55-
version: ">=0.8.2"
55+
version: ">=0.11.x"
5656
args: "check"
5757

5858
- name: Build ragflow:nightly-slim

.gitignore

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ sdk/python/ragflow.egg-info/
3636
sdk/python/build/
3737
sdk/python/dist/
3838
sdk/python/ragflow_sdk.egg-info/
39+
40+
# Exclude dep files
41+
libssl*.deb
42+
tika-server*.jar*
43+
cl100k_base.tiktoken
44+
chrome*
3945
huggingface.co/
4046
nltk_data/
4147

@@ -44,3 +50,146 @@ nltk_data/
4450
.lh/
4551
.venv
4652
docker/data
53+
54+
55+
#--------------------------------------------------#
56+
# The following was generated with gitignore.nvim: #
57+
#--------------------------------------------------#
58+
# Gitignore for the following technologies: Node
59+
60+
# Logs
61+
logs
62+
*.log
63+
npm-debug.log*
64+
yarn-debug.log*
65+
yarn-error.log*
66+
lerna-debug.log*
67+
.pnpm-debug.log*
68+
69+
# Diagnostic reports (https://nodejs.org/api/report.html)
70+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
71+
72+
# Runtime data
73+
pids
74+
*.pid
75+
*.seed
76+
*.pid.lock
77+
78+
# Directory for instrumented libs generated by jscoverage/JSCover
79+
lib-cov
80+
81+
# Coverage directory used by tools like istanbul
82+
coverage
83+
*.lcov
84+
85+
# nyc test coverage
86+
.nyc_output
87+
88+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
89+
.grunt
90+
91+
# Bower dependency directory (https://bower.io/)
92+
bower_components
93+
94+
# node-waf configuration
95+
.lock-wscript
96+
97+
# Compiled binary addons (https://nodejs.org/api/addons.html)
98+
build/Release
99+
100+
# Dependency directories
101+
node_modules/
102+
jspm_packages/
103+
104+
# Snowpack dependency directory (https://snowpack.dev/)
105+
web_modules/
106+
107+
# TypeScript cache
108+
*.tsbuildinfo
109+
110+
# Optional npm cache directory
111+
.npm
112+
113+
# Optional eslint cache
114+
.eslintcache
115+
116+
# Optional stylelint cache
117+
.stylelintcache
118+
119+
# Microbundle cache
120+
.rpt2_cache/
121+
.rts2_cache_cjs/
122+
.rts2_cache_es/
123+
.rts2_cache_umd/
124+
125+
# Optional REPL history
126+
.node_repl_history
127+
128+
# Output of 'npm pack'
129+
*.tgz
130+
131+
# Yarn Integrity file
132+
.yarn-integrity
133+
134+
# dotenv environment variable files
135+
.env
136+
.env.development.local
137+
.env.test.local
138+
.env.production.local
139+
.env.local
140+
141+
# parcel-bundler cache (https://parceljs.org/)
142+
.cache
143+
.parcel-cache
144+
145+
# Next.js build output
146+
.next
147+
out
148+
149+
# Nuxt.js build / generate output
150+
.nuxt
151+
dist
152+
153+
# Gatsby files
154+
.cache/
155+
# Comment in the public line in if your project uses Gatsby and not Next.js
156+
# https://nextjs.org/blog/next-9-1#public-directory-support
157+
# public
158+
159+
# vuepress build output
160+
.vuepress/dist
161+
162+
# vuepress v2.x temp and cache directory
163+
.temp
164+
165+
# Docusaurus cache and generated files
166+
.docusaurus
167+
168+
# Serverless directories
169+
.serverless/
170+
171+
# FuseBox cache
172+
.fusebox/
173+
174+
# DynamoDB Local files
175+
.dynamodb/
176+
177+
# TernJS port file
178+
.tern-port
179+
180+
# Stores VSCode versions used for testing VSCode extensions
181+
.vscode-test
182+
183+
# yarn v2
184+
.yarn/cache
185+
.yarn/unplugged
186+
.yarn/build-state.yml
187+
.yarn/install-state.gz
188+
.pnp.*
189+
190+
# Serverless Webpack directories
191+
.webpack/
192+
193+
# SvelteKit build / generate output
194+
.svelte-kit
195+

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \
5959
apt install -y libatk-bridge2.0-0 && \
6060
apt install -y libpython3-dev libgtk-4-1 libnss3 xdg-utils libgbm-dev && \
6161
apt install -y libjemalloc-dev && \
62-
apt install -y python3-pip pipx nginx unzip curl wget git vim less
62+
apt install -y python3-pip pipx nginx unzip curl wget git vim less && \
63+
apt install -y ghostscript
6364

6465
RUN if [ "$NEED_MIRROR" == "1" ]; then \
6566
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple && \
@@ -199,6 +200,7 @@ COPY graphrag graphrag
199200
COPY agentic_reasoning agentic_reasoning
200201
COPY pyproject.toml uv.lock ./
201202
COPY mcp mcp
203+
COPY plugin plugin
202204

203205
COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template
204206
COPY docker/entrypoint.sh ./

Dockerfile.scratch.oc9

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ADD ./rag ./rag
3333
ADD ./requirements.txt ./requirements.txt
3434
ADD ./agent ./agent
3535
ADD ./graphrag ./graphrag
36+
ADD ./plugin ./plugin
3637

3738
RUN dnf install -y openmpi openmpi-devel python3-openmpi
3839
ENV C_INCLUDE_PATH /usr/include/openmpi-x86_64:$C_INCLUDE_PATH

README.md

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
</div>
66

77
<p align="center">
8-
<a href="./README.md">English</a> |
9-
<a href="./README_zh.md">简体中文</a> |
10-
<a href="./README_tzh.md">繁体中文</a> |
11-
<a href="./README_ja.md">日本語</a> |
12-
<a href="./README_ko.md">한국어</a> |
13-
<a href="./README_id.md">Bahasa Indonesia</a> |
14-
<a href="/README_pt_br.md">Português (Brasil)</a>
8+
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-DBEDFA"></a>
9+
<a href="./README_tzh.md"><img alt="繁體中文文件" src="https://img.shields.io/badge/繁體中文-DFE0E5"></a>
10+
<a href="./README_zh.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a>
11+
<a href="./README_ja.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-DFE0E5"></a>
12+
<a href="./README_ko.md"><img alt="한국어" src="https://img.shields.io/badge/한국어-DFE0E5"></a>
13+
<a href="./README_id.md"><img alt="Bahasa Indonesia" src="https://img.shields.io/badge/Bahasa Indonesia-DFE0E5"></a>
14+
<a href="./README_pt_br.md"><img alt="Português(Brasil)" src="https://img.shields.io/badge/Português(Brasil)-DFE0E5"></a>
1515
</p>
1616

1717
<p align="center">
@@ -22,14 +22,17 @@
2222
<img alt="Static Badge" src="https://img.shields.io/badge/Online-Demo-4e6b99">
2323
</a>
2424
<a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
25-
<img src="https://img.shields.io/badge/docker_pull-ragflow:v0.18.0-brightgreen" alt="docker pull infiniflow/ragflow:v0.18.0">
25+
<img src="https://img.shields.io/docker/pulls/infiniflow/ragflow?label=Docker%20Pulls&color=0db7ed&logo=docker&logoColor=white&style=flat-square" alt="docker pull infiniflow/ragflow:v0.19.0">
2626
</a>
2727
<a href="https://github.com/infiniflow/ragflow/releases/latest">
2828
<img src="https://img.shields.io/github/v/release/infiniflow/ragflow?color=blue&label=Latest%20Release" alt="Latest Release">
2929
</a>
3030
<a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
3131
<img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?labelColor=d4eaf7&color=2e6cc4" alt="license">
3232
</a>
33+
<a href="https://deepwiki.com/infiniflow/ragflow">
34+
<img alt="Ask DeepWiki" src="https://deepwiki.com/badge.svg">
35+
</a>
3336
</p>
3437

3538
<h4 align="center">
@@ -40,6 +43,12 @@
4043
<a href="https://demo.ragflow.io">Demo</a>
4144
</h4>
4245

46+
#
47+
48+
<div align="center">
49+
<a href="https://trendshift.io/repositories/9064" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9064" alt="infiniflow%2Fragflow | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
50+
</div>
51+
4352
<details open>
4453
<summary><b>📕 Table of Contents</b></summary>
4554

@@ -78,11 +87,11 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
7887

7988
## 🔥 Latest Updates
8089

90+
- 2025-05-23 Adds a Python/JavaScript code executor component to Agent.
91+
- 2025-05-05 Supports cross-language query.
8192
- 2025-03-19 Supports using a multi-modal model to make sense of images within PDF or DOCX files.
8293
- 2025-02-28 Combined with Internet search (Tavily), supports reasoning like Deep Research for any LLMs.
83-
- 2025-01-26 Optimizes knowledge graph extraction and application, offering various configuration options.
8494
- 2024-12-18 Upgrades Document Layout Analysis model in DeepDoc.
85-
- 2024-11-01 Adds keyword extraction and related question generation to the parsed chunks to improve the accuracy of retrieval.
8695
- 2024-08-22 Support text to SQL statements through RAG.
8796

8897
## 🎉 Stay Tuned
@@ -137,8 +146,10 @@ releases! 🌟
137146
- RAM >= 16 GB
138147
- Disk >= 50 GB
139148
- Docker >= 24.0.0 & Docker Compose >= v2.26.1
140-
> If you have not installed Docker on your local machine (Windows, Mac, or Linux),
141-
> see [Install Docker Engine](https://docs.docker.com/engine/install/).
149+
- [gVisor](https://gvisor.dev/docs/user_guide/install/): Required only if you intend to use the code executor (sandbox) feature of RAGFlow.
150+
151+
> [!TIP]
152+
> If you have not installed Docker on your local machine (Windows, Mac, or Linux), see [Install Docker Engine](https://docs.docker.com/engine/install/).
142153
143154
### 🚀 Start up the server
144155

@@ -176,7 +187,7 @@ releases! 🌟
176187
> All Docker images are built for x86 platforms. We don't currently offer Docker images for ARM64.
177188
> If you are on an ARM64 platform, follow [this guide](https://ragflow.io/docs/dev/build_docker_image) to build a Docker image compatible with your system.
178189
179-
> The command below downloads the `v0.18.0-slim` edition of the RAGFlow Docker image. See the following table for descriptions of different RAGFlow editions. To download a RAGFlow edition different from `v0.18.0-slim`, update the `RAGFLOW_IMAGE` variable accordingly in **docker/.env** before using `docker compose` to start the server. For example: set `RAGFLOW_IMAGE=infiniflow/ragflow:v0.18.0` for the full edition `v0.18.0`.
190+
> The command below downloads the `v0.19.0-slim` edition of the RAGFlow Docker image. See the following table for descriptions of different RAGFlow editions. To download a RAGFlow edition different from `v0.19.0-slim`, update the `RAGFLOW_IMAGE` variable accordingly in **docker/.env** before using `docker compose` to start the server. For example: set `RAGFLOW_IMAGE=infiniflow/ragflow:v0.19.0` for the full edition `v0.19.0`.
180191
181192
```bash
182193
$ cd ragflow/docker
@@ -189,8 +200,8 @@ releases! 🌟
189200
190201
| RAGFlow image tag | Image size (GB) | Has embedding models? | Stable? |
191202
|-------------------|-----------------|-----------------------|--------------------------|
192-
| v0.18.0 | &approx;9 | :heavy_check_mark: | Stable release |
193-
| v0.18.0-slim | &approx;2 | ❌ | Stable release |
203+
| v0.19.0 | &approx;9 | :heavy_check_mark: | Stable release |
204+
| v0.19.0-slim | &approx;2 | ❌ | Stable release |
194205
| nightly | &approx;9 | :heavy_check_mark: | _Unstable_ nightly build |
195206
| nightly-slim | &approx;2 | ❌ | _Unstable_ nightly build |
196207
@@ -318,7 +329,7 @@ docker build --platform linux/amd64 -f Dockerfile -t infiniflow/ragflow:nightly
318329
Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/.env** to `127.0.0.1`:
319330
320331
```
321-
127.0.0.1 es01 infinity mysql minio redis
332+
127.0.0.1 es01 infinity mysql minio redis sandbox-executor-manager
322333
```
323334
324335
4. If you cannot access HuggingFace, set the `HF_ENDPOINT` environment variable to use a mirror site:
@@ -327,20 +338,31 @@ docker build --platform linux/amd64 -f Dockerfile -t infiniflow/ragflow:nightly
327338
export HF_ENDPOINT=https://hf-mirror.com
328339
```
329340
330-
5. Launch backend service:
341+
5. If your operating system does not have jemalloc, please install it as follows:
342+
343+
```bash
344+
# ubuntu
345+
sudo apt-get install libjemalloc-dev
346+
# centos
347+
sudo yum install jemalloc
348+
```
349+
350+
6. Launch backend service:
331351
332352
```bash
333353
source .venv/bin/activate
334354
export PYTHONPATH=$(pwd)
335355
bash docker/launch_backend_service.sh
336356
```
337357
338-
6. Install frontend dependencies:
358+
7. Install frontend dependencies:
359+
339360
```bash
340361
cd web
341362
npm install
342363
```
343-
7. Launch frontend service:
364+
365+
8. Launch frontend service:
344366
345367
```bash
346368
npm run dev
@@ -350,6 +372,13 @@ docker build --platform linux/amd64 -f Dockerfile -t infiniflow/ragflow:nightly
350372
351373
![](https://github.com/user-attachments/assets/0daf462c-a24d-4496-a66f-92533534e187)
352374
375+
9. Stop RAGFlow front-end and back-end service after development is complete:
376+
377+
```bash
378+
pkill -f "ragflow_server.py|task_executor.py"
379+
```
380+
381+
353382
## 📚 Documentation
354383
355384
- [Quickstart](https://ragflow.io/docs/dev/)
@@ -373,4 +402,4 @@ See the [RAGFlow Roadmap 2025](https://github.com/infiniflow/ragflow/issues/4214
373402
## 🙌 Contributing
374403
375404
RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community.
376-
If you would like to be a part, review our [Contribution Guidelines](./CONTRIBUTING.md) first.
405+
If you would like to be a part, review our [Contribution Guidelines](https://ragflow.io/docs/dev/contributing) first.

0 commit comments

Comments
 (0)