feat: excel清理优化
This commit is contained in:
1 parent
87ac58c394
commit
ca5782b6cd
16 files changed
+132
-27
No files matched your search
@@ -29,12 +29,15 @@ class TableConfig(BaseModel):
|
||||
"""
|
||||
Excel/CSV 表格线性化配置。
|
||||
|
||||
用途:约束进入 Dify 前每段可容纳的完整原始行总字符数。
|
||||
逻辑:table_linearize 在 Excel/CSV 分支读取该值;Dify 同步仍按空行分段,
|
||||
因此本值应低于 Dify 的 max_tokens 能承载的保守字符数。
|
||||
用途:约束 Excel/CSV 表格进入 Dify 前,每个段可容纳的完整原始数据行总字符数。
|
||||
逻辑:仅 table_linearize 的表格分支读取该值;它在加入下一行会超限时于上一完整行结束,
|
||||
保证一条原始 Excel 行不会被切断。Dify 仍按空行分段,因此本值应低于
|
||||
Dify 的 max_tokens 能承载的保守字符数,避免 Dify 二次截断表格行。
|
||||
"""
|
||||
|
||||
segment_max_chars: int = 480
|
||||
# Excel/CSV 表格专用:每段最多累计约 1000 个字符,并且只在完整数据行之间换段。
|
||||
# 该值不是普通文档的 chunk.max_chars,也不是 Dify 的 Token 上限。
|
||||
table_segment_max_chars: int = 1000
|
||||
|
||||
|
||||
class CleanConfig(BaseModel):
|
||||
|
||||
Reference in new issue
Block a user