From efa8bc2623cefd9be13473e160223a30ee85df69 Mon Sep 17 00:00:00 2001 From: userpj Date: Fri, 27 Dec 2024 11:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=A5=E8=AF=86=E5=BA=93=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E6=96=87=E6=A1=A3separator=E3=80=81prependInfo=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=9D=9E=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/BasisModule/Platform/KnowledgeBase/knowledgebase.md | 4 ++-- python/core/console/knowledge_base/data_class.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/BasisModule/Platform/KnowledgeBase/knowledgebase.md b/docs/BasisModule/Platform/KnowledgeBase/knowledgebase.md index f5503dbc9..27cd05692 100644 --- a/docs/BasisModule/Platform/KnowledgeBase/knowledgebase.md +++ b/docs/BasisModule/Platform/KnowledgeBase/knowledgebase.md @@ -300,10 +300,10 @@ class DocumentChoices(BaseModel): class DocumentChunker(BaseModel): choices: list[str] = Field(..., description="使用哪些chunker方法 (separator | pattern | onePage),separator:自定义切片—标识符,pattern:自定义切片—标识符中选择正则表达式,onePage:整文件切片") prependInfo: list[str] = Field( - ..., + None, description="chunker关联元数据,可选值为title (增加标题), filename(增加文件名)", ) - separator: Optional[DocumentSeparator] = Field(..., description="分隔符配置") + separator: Optional[DocumentSeparator] = Field(None, description="分隔符配置") pattern: Optional[DocumentPattern] = Field(None, description="正则表达式") class DocumentSeparator(BaseModel): diff --git a/python/core/console/knowledge_base/data_class.py b/python/core/console/knowledge_base/data_class.py index cc689f96f..13924959a 100644 --- a/python/core/console/knowledge_base/data_class.py +++ b/python/core/console/knowledge_base/data_class.py @@ -183,10 +183,10 @@ class DocumentChunker(BaseModel): description="使用哪些chunker方法 (separator | pattern | onePage),separator:自定义切片—标识符,pattern:自定义切片—标识符中选择正则表达式,onePage:整文件切片", ) prependInfo: list[str] = Field( - ..., + None, description="chunker关联元数据,可选值为title (增加标题), filename(增加文件名)", ) - separator: Optional[DocumentSeparator] = Field(..., description="分段符号") + separator: Optional[DocumentSeparator] = Field(None, description="分段符号") pattern: Optional[DocumentPattern] = Field(None, description="正则表达式")