mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 04:32:53 +00:00
perf: chunk filter
This commit is contained in:
@@ -147,7 +147,7 @@ export const fileDownload = ({
|
||||
* overlapLen - The size of the before and after Text
|
||||
* maxLen > overlapLen
|
||||
*/
|
||||
export const splitText_token = ({ text, maxLen }: { text: string; maxLen: number }) => {
|
||||
export const splitText2Chunks = ({ text, maxLen }: { text: string; maxLen: number }) => {
|
||||
const overlapLen = Math.floor(maxLen * 0.3); // Overlap length
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user