目前agent infra及rag框架已经搭好

This commit is contained in:
minorQAQ committed 2026-05-18 17:26:20 +08:00
1 parent 447f313217
commit 20316a4453
1 file changed
+2 -3
+2 -3
View File
@@ -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)