From f8f3df8a2146086cff5d97e63b05fcd30040c3d9 Mon Sep 17 00:00:00 2001 From: GuoQing Zhang Date: Wed, 17 Sep 2025 11:27:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=87=E5=88=86=E8=A7=84=E5=88=99?= =?UTF-8?q?=E4=BC=A0=E7=A9=BA=E6=95=B0=E7=BB=84=E4=B9=9F=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/bisheng/api/v1/schemas.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/bisheng/api/v1/schemas.py b/src/backend/bisheng/api/v1/schemas.py index d46331fd6..b93ed7dfb 100644 --- a/src/backend/bisheng/api/v1/schemas.py +++ b/src/backend/bisheng/api/v1/schemas.py @@ -535,9 +535,9 @@ class FileProcessBase(BaseModel): @model_validator(mode='before') @classmethod def check_separator_rule(cls, values: Any): - if values.get('separator', None) is None: + if not values.get('separator', None): values['separator'] = ['\n\n', '\n'] - if values.get('separator_rule', None) is None: + if not values.get('separator_rule', None): values['separator_rule'] = ['after' for _ in values['separator']] if values.get('chunk_size', None) is None: values['chunk_size'] = 1000