Skip to content

Commit

Permalink
知识库导入文档separator、prependInfo改为非必填
Browse files Browse the repository at this point in the history
  • Loading branch information
userpj committed Dec 27, 2024
1 parent 7c0ffaf commit efa8bc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/BasisModule/Platform/KnowledgeBase/knowledgebase.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions python/core/console/knowledge_base/data_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="正则表达式")


Expand Down

0 comments on commit efa8bc2

Please sign in to comment.