From 28cb4df127aaad194791c7eb2f8a3f4f8c304c24 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 27 May 2025 17:41:35 +0800 Subject: [PATCH] Fix: raptor overloading (#7889) ### What problem does this PR solve? #7840 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/svr/task_executor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rag/svr/task_executor.py b/rag/svr/task_executor.py index 1c21274a4..e068285fe 100644 --- a/rag/svr/task_executor.py +++ b/rag/svr/task_executor.py @@ -537,7 +537,8 @@ async def do_handle_task(task): # bind LLM for raptor chat_model = LLMBundle(task_tenant_id, LLMType.CHAT, llm_name=task_llm_id, lang=task_language) # run RAPTOR - chunks, token_count = await run_raptor(task, chat_model, embedding_model, vector_size, progress_callback) + async with kg_limiter: + chunks, token_count = await run_raptor(task, chat_model, embedding_model, vector_size, progress_callback) # Either using graphrag or Standard chunking methods elif task.get("task_type", "") == "graphrag": if not task_parser_config.get("graphrag", {}).get("use_graphrag", False):