mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-22 00:54:50 +08:00
Fix: limit the depth of DFS (#6101)
### What problem does this PR solve? #6085 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
b5ba8b783a
commit
485bc7d7d6
@ -118,6 +118,8 @@ class RagTokenizer:
|
||||
|
||||
def dfs_(self, chars, s, preTks, tkslist):
|
||||
res = s
|
||||
if len(tkslist) >= 2048:
|
||||
return res
|
||||
# if s > MAX_L or s>= len(chars):
|
||||
if s >= len(chars):
|
||||
tkslist.append(preTks)
|
||||
|
Loading…
x
Reference in New Issue
Block a user