diff --git a/src/agent/tools/tool_rag.py b/src/agent/tools/tool_rag.py index affac4a..9fee23b 100644 --- a/src/agent/tools/tool_rag.py +++ b/src/agent/tools/tool_rag.py @@ -82,8 +82,8 @@ def rerank_documents(query: str, documents: List[str]) -> List[float]: # ---------- 文本分块 ---------- def split_into_chunks(text: str) -> List[str]: splitter = RecursiveCharacterTextSplitter( - chunk_size=CHUNK_SIZE, - chunk_overlap=CHUNK_OVERLAP, + chunk_size=RAG_CHUNK_SIZE, + chunk_overlap=RAG_CHUNK_OVERLAP, separators=["\n\n", "\n", " ", ""] ) return splitter.split_text(text) @@ -370,4 +370,3 @@ class RAGTool(BaseTool): async def _arun(self, **kwargs): # 直接调用同步版本 return self._run(**kwargs) - \ No newline at end of file