fix: ensure limit parameter is an integer in split_model initialization

--bug=1057597 --user=刘瑞斌 【知识库】通用知识库高级分段生成预览为空 https://www.tapd.cn/62980211/s/1719490
This commit is contained in:
CaptainB 2025-06-27 11:06:26 +08:00
parent d2f6d34a18
commit 173f7e8321

View File

@ -287,6 +287,8 @@ class SplitModel:
def __init__(self, content_level_pattern, with_filter=True, limit=100000):
self.content_level_pattern = content_level_pattern
self.with_filter = with_filter
if type(limit) is not int:
limit = int(limit)
if limit is None or limit > 100000:
limit = 100000
if limit < 50: