diff --git a/README.md b/README.md index 00f604dd9..357eba73b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Static Badge - docker pull infiniflow/ragflow:v0.7.0 + docker pull infiniflow/ragflow:v0.8.0 license @@ -64,16 +64,16 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io). ## 📌 Latest Updates +- 2024-07-08 Supports [Graph](./graph/README.md). + - 2024-06-27 Supports Markdown and Docx in the Q&A parsing method. Supports extracting images from Docx files. Supports extracting tables from Markdown files. - 2024-06-14 Supports PDF in the Q&A parsing method. - - 2024-06-06 Supports [Self-RAG](https://huggingface.co/papers/2310.11511), which is enabled by default in dialog settings. - 2024-05-30 Integrates [BCE](https://github.com/netease-youdao/BCEmbedding) and [BGE](https://github.com/FlagOpen/FlagEmbedding) reranker models. - 2024-05-28 Supports LLM Baichuan and VolcanoArk. - 2024-05-23 Supports [RAPTOR](https://arxiv.org/html/2401.18059v1) for better text retrieval. - 2024-05-21 Supports streaming output and text chunk retrieval API. - 2024-05-15 Integrates OpenAI GPT-4o. -- 2024-05-08 Integrates LLM DeepSeek-V2. ## 🌟 Key Features @@ -150,7 +150,7 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io). 3. Build the pre-built Docker images and start up the server: - > Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `RAGFLOW_VERSION` in **docker/.env** to the intended version, for example `RAGFLOW_VERSION=v0.7.0`, before running the following commands. + > Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `RAGFLOW_VERSION` in **docker/.env** to the intended version, for example `RAGFLOW_VERSION=v0.8.0`, before running the following commands. ```bash $ cd ragflow/docker diff --git a/README_ja.md b/README_ja.md index 5a9e0e331..be70db213 100644 --- a/README_ja.md +++ b/README_ja.md @@ -17,8 +17,8 @@ Static Badge - docker pull infiniflow/ragflow:v0.7.0 + docker pull infiniflow/ragflow:v0.8.0 license @@ -45,15 +45,15 @@ ## 📌 最新情報 +- 2024-07-08 [Graph](./graph/README.md) に対応しました。. - 2024-06-27 Q&A解析方式はMarkdownファイルとDocxファイルをサポートしています。Docxファイルからの画像の抽出をサポートします。Markdownファイルからテーブルを抽出することをサポートします。 - 2024-06-14 Q&A 解析メソッドは PDF ファイルをサポートしています。 - 2024-06-06 会話設定でデフォルトでチェックされている [Self-RAG](https://huggingface.co/papers/2310.11511) をサポートします。 -- 2024-05-30 [BCE](https://github.com/netease-youdao/BCEmbedding)、[BGE](https://github.com/FlagOpen/FlagEmbedding) reranker を統合。 +- 2024-05-30 [BCE](https://github.com/netease-youdao/BCEmbedding) 、[BGE](https://github.com/FlagOpen/FlagEmbedding) reranker を統合。 - 2024-05-28 LLM BaichuanとVolcanoArkを統合しました。 -- 2024-05-23 より良いテキスト検索のために[RAPTOR](https://arxiv.org/html/2401.18059v1)をサポート。 +- 2024-05-23 より良いテキスト検索のために [RAPTOR](https://arxiv.org/html/2401.18059v1) をサポート。 - 2024-05-21 ストリーミング出力とテキストチャンク取得APIをサポート。 - 2024-05-15 OpenAI GPT-4oを統合しました。 -- 2024-05-08 LLM DeepSeek-V2を統合しました。 ## 🌟 主な特徴 @@ -136,7 +136,7 @@ $ docker compose up -d ``` - > 上記のコマンドを実行すると、RAGFlowの開発版dockerイメージが自動的にダウンロードされます。 特定のバージョンのDockerイメージをダウンロードして実行したい場合は、docker/.envファイルのRAGFLOW_VERSION変数を見つけて、対応するバージョンに変更してください。 例えば、RAGFLOW_VERSION=v0.7.0として、上記のコマンドを実行してください。 + > 上記のコマンドを実行すると、RAGFlowの開発版dockerイメージが自動的にダウンロードされます。 特定のバージョンのDockerイメージをダウンロードして実行したい場合は、docker/.envファイルのRAGFLOW_VERSION変数を見つけて、対応するバージョンに変更してください。 例えば、RAGFLOW_VERSION=v0.8.0として、上記のコマンドを実行してください。 > コアイメージのサイズは約 9 GB で、ロードに時間がかかる場合があります。 @@ -198,7 +198,7 @@ ```bash $ git clone https://github.com/infiniflow/ragflow.git $ cd ragflow/ -$ docker build -t infiniflow/ragflow:v0.7.0 . +$ docker build -t infiniflow/ragflow:v0.8.0 . $ cd ragflow/docker $ chmod +x ./entrypoint.sh $ docker compose up -d diff --git a/README_zh.md b/README_zh.md index cfc0a92de..1a4a0109f 100644 --- a/README_zh.md +++ b/README_zh.md @@ -17,7 +17,7 @@ Static Badge - docker pull infiniflow/ragflow:v0.7.0 + docker pull infiniflow/ragflow:v0.8.0 license @@ -45,6 +45,7 @@ ## 📌 近期更新 +- 2024-07-08 支持 [Graph](./graph/README.md)。 - 2024-06-27 Q&A 解析方式支持 Markdown 文件和 Docx 文件。支持提取出 Docx 文件中的图片。支持提取出 Markdown 文件中的表格。 - 2024-06-14 Q&A 解析方式支持 PDF 文件。 - 2024-06-06 支持 [Self-RAG](https://huggingface.co/papers/2310.11511) ,在对话设置里面默认勾选。 @@ -53,7 +54,6 @@ - 2024-05-23 实现 [RAPTOR](https://arxiv.org/html/2401.18059v1) 提供更好的文本检索。 - 2024-05-21 支持流式结果输出和文本块获取API。 - 2024-05-15 集成大模型 OpenAI GPT-4o。 -- 2024-05-08 集成大模型 DeepSeek。 ## 🌟 主要功能 @@ -136,7 +136,7 @@ $ docker compose -f docker-compose-CN.yml up -d ``` - > 请注意,运行上述命令会自动下载 RAGFlow 的开发版本 docker 镜像。如果你想下载并运行特定版本的 docker 镜像,请在 docker/.env 文件中找到 RAGFLOW_VERSION 变量,将其改为对应版本。例如 RAGFLOW_VERSION=v0.7.0,然后运行上述命令。 + > 请注意,运行上述命令会自动下载 RAGFlow 的开发版本 docker 镜像。如果你想下载并运行特定版本的 docker 镜像,请在 docker/.env 文件中找到 RAGFLOW_VERSION 变量,将其改为对应版本。例如 RAGFLOW_VERSION=v0.8.0,然后运行上述命令。 > 核心镜像文件大约 9 GB,可能需要一定时间拉取。请耐心等待。 @@ -198,7 +198,7 @@ ```bash $ git clone https://github.com/infiniflow/ragflow.git $ cd ragflow/ -$ docker build -t infiniflow/ragflow:v0.7.0 . +$ docker build -t infiniflow/ragflow:v0.8.0 . $ cd ragflow/docker $ chmod +x ./entrypoint.sh $ docker compose up -d diff --git a/docs/guides/configure_knowledge_base.md b/docs/guides/configure_knowledge_base.md index c10f026dc..51321b7ee 100644 --- a/docs/guides/configure_knowledge_base.md +++ b/docs/guides/configure_knowledge_base.md @@ -124,7 +124,7 @@ RAGFlow uses multiple recall of both full-text search and vector search in its c ## Search for knowledge base -As of RAGFlow v0.7.0, the search feature is still in a rudimentary form, supporting only knowledge base search by name. +As of RAGFlow v0.8.0, the search feature is still in a rudimentary form, supporting only knowledge base search by name. ![search knowledge base](https://github.com/infiniflow/ragflow/assets/93570324/836ae94c-2438-42be-879e-c7ad2a59693e) diff --git a/docs/guides/manage_files.md b/docs/guides/manage_files.md index e2282277f..b1d39a6b2 100644 --- a/docs/guides/manage_files.md +++ b/docs/guides/manage_files.md @@ -45,11 +45,11 @@ You can link your file to one knowledge base or multiple knowledge bases at one ## Move file to specified folder -As of RAGFlow v0.7.0, this feature is *not* available. +As of RAGFlow v0.8.0, this feature is *not* available. ## Search files or folders -As of RAGFlow v0.7.0, the search feature is still in a rudimentary form, supporting only file and folder search in the current directory by name (files or folders in the child directory will not be retrieved). +As of RAGFlow v0.8.0, the search feature is still in a rudimentary form, supporting only file and folder search in the current directory by name (files or folders in the child directory will not be retrieved). ![search file](https://github.com/infiniflow/ragflow/assets/93570324/77ffc2e5-bd80-4ed1-841f-068e664efffe) @@ -81,4 +81,4 @@ RAGFlow's file management allows you to download an uploaded file: ![download_file](https://github.com/infiniflow/ragflow/assets/93570324/cf3b297f-7d9b-4522-bf5f-4f45743e4ed5) -> As of RAGFlow v0.7.0, bulk download is not supported, nor can you download an entire folder. +> As of RAGFlow v0.8.0, bulk download is not supported, nor can you download an entire folder. diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx index 921303ebd..64ba9010e 100644 --- a/docs/quickstart.mdx +++ b/docs/quickstart.mdx @@ -34,7 +34,7 @@ This section provides instructions on setting up the RAGFlow server on Linux. If `vm.max_map_count`. This value sets the maximum number of memory map areas a process may have. Its default value is 65530. While most applications require fewer than a thousand maps, reducing this value can result in abmornal behaviors, and the system will throw out-of-memory errors when a process reaches the limitation. - RAGFlow v0.7.0 uses Elasticsearch for multiple recall. Setting the value of `vm.max_map_count` correctly is crucial to the proper functioning of the Elasticsearch component. + RAGFlow v0.8.0 uses Elasticsearch for multiple recall. Setting the value of `vm.max_map_count` correctly is crucial to the proper functioning of the Elasticsearch component. Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `RAGFLOW_VERSION` in **docker/.env** to the intended version, for example `RAGFLOW_VERSION=v0.7.0`, before running the following commands. + > Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `RAGFLOW_VERSION` in **docker/.env** to the intended version, for example `RAGFLOW_VERSION=v0.8.0`, before running the following commands. ```bash $ cd ragflow/docker diff --git a/graph/canvas.py b/graph/canvas.py index 7309680b9..de161be4e 100644 --- a/graph/canvas.py +++ b/graph/canvas.py @@ -204,7 +204,8 @@ class Canvas(ABC): cpn = self.get_component(cpn_id) if not cpn["downstream"]: break - if self._find_loop(): raise OverflowError("Too much loops!") + loop = self._find_loop() + if loop: raise OverflowError(f"Too much loops: {loop}") if cpn["obj"].component_name.lower() in ["switch", "categorize", "relevant"]: switch_out = cpn["obj"].output()[1].iloc[0, 0] @@ -277,15 +278,18 @@ class Canvas(ABC): if len(path) < 2: return False - for l in range(1, len(path) // 2): + for l in range(2, len(path) // 2): pat = ",".join(path[0:l]) path_str = ",".join(path) if len(pat) >= len(path_str): return False - path_str = path_str[len(pat):] loop = max_loops - while path_str.find(pat) >= 0 and loop >= 0: + while path_str.find(pat) == 0 and loop >= 0: loop -= 1 - path_str = path_str[len(pat):] - if loop < 0: return True + if len(pat)+1 >= len(path_str): + return False + path_str = path_str[len(pat)+1:] + if loop < 0: + pat = " => ".join([p.split(":")[0] for p in path[0:l]]) + return pat + " => " + pat return False diff --git a/graph/component/categorize.py b/graph/component/categorize.py index a5c530e94..d18cab6fd 100644 --- a/graph/component/categorize.py +++ b/graph/component/categorize.py @@ -38,7 +38,7 @@ class CategorizeParam(GenerateParam): self.check_empty(self.category_description, "[Categorize] Category examples") for k, v in self.category_description.items(): if not k: raise ValueError(f"[Categorize] Category name can not be empty!") - if not v["to"]: raise ValueError(f"[Categorize] 'To' of category {k} can not be empty!") + if not v.get("to"): raise ValueError(f"[Categorize] 'To' of category {k} can not be empty!") def get_prompt(self): cate_lines = [] diff --git a/graph/component/generate.py b/graph/component/generate.py index 81d4d36bf..8b6525112 100644 --- a/graph/component/generate.py +++ b/graph/component/generate.py @@ -72,7 +72,10 @@ class Generate(ComponentBase): for para in self._param.parameters: cpn = self._canvas.get_component(para["component_id"])["obj"] _, out = cpn.output(allow_partial=False) - kwargs[para["key"]] = "\n - ".join(out["content"]) + if "content" not in out.columns: + kwargs[para["key"]] = "Nothing" + else: + kwargs[para["key"]] = "\n - ".join(out["content"]) kwargs["input"] = input for n, v in kwargs.items():