perf: text splitter (#4584)

* perf: text splitter

* update doc
This commit is contained in:
Archer
2025-04-17 19:08:04 +08:00
committed by GitHub
parent cdbc1d5590
commit 22fc7dddfb
7 changed files with 103 additions and 473 deletions

View File

@@ -0,0 +1,3 @@
export const getTextValidLength = (chunk: string) => {
return chunk.replaceAll(/[\s\n]/g, '').length;
};