瀏覽代碼

fix text split (#15426)

tags/1.0.1
Jyong 7 月之前
父節點
當前提交
f77f7e1437
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      api/core/rag/splitter/fixed_text_splitter.py

+ 4
- 1
api/core/rag/splitter/fixed_text_splitter.py 查看文件

@@ -88,7 +88,10 @@ class FixedRecursiveCharacterTextSplitter(EnhanceRecursiveCharacterTextSplitter)
break
# Now that we have the separator, split the text
if separator:
splits = text.split(separator)
if separator == " ":
splits = text.split()
else:
splits = text.split(separator)
else:
splits = list(text)
# Now go merging things, recursively splitting longer texts.

Loading…
取消
儲存