Skip to content

Commit

Permalink
perf: splitter
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Dec 7, 2023
1 parent 7f0dcc1 commit 883045c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/global/common/string/textSplitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const splitText2Chunks = (props: {
tokens: number;
overlapRatio?: number;
} => {
let { text = '', chunkLen, overlapRatio = 0.2, customReg = ['\n'] } = props;
let { text = '', chunkLen, overlapRatio = 0.2, customReg = [] } = props;
const splitMarker = 'SPLIT_HERE_SPLIT_HERE';
const codeBlockMarker = 'CODE_BLOCK_LINE_MARKER';
const overlapLen = Math.round(chunkLen * overlapRatio);
Expand Down

0 comments on commit 883045c

Please sign in to comment.