mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 15:20:30 +08:00
fix(api): default delimiter must be a real newline, not the r"\n" escape (#17591)
This commit is contained in:
@@ -390,7 +390,7 @@ def get_parser_config(chunk_method, parser_config):
|
||||
"one": None,
|
||||
"knowledge_graph": {
|
||||
"chunk_token_num": 8192,
|
||||
"delimiter": r"\n",
|
||||
"delimiter": "\n",
|
||||
"entity_types": ["organization", "person", "location", "event", "time"],
|
||||
"raptor": {"use_raptor": False},
|
||||
"graphrag": {"use_graphrag": False},
|
||||
|
||||
@@ -425,7 +425,7 @@ class ParentChildConfig(Base):
|
||||
"""Dataset parser configuration for parent-child chunking."""
|
||||
|
||||
use_parent_child: Annotated[bool, Field(default=False)]
|
||||
children_delimiter: Annotated[str, Field(default=r"\n", min_length=1)]
|
||||
children_delimiter: Annotated[str, Field(default="\n", min_length=1)]
|
||||
|
||||
|
||||
class AutoMetadataField(Base):
|
||||
@@ -453,7 +453,7 @@ class ParserConfig(Base):
|
||||
auto_keywords: Annotated[int, Field(default=0, ge=0, le=32)]
|
||||
auto_questions: Annotated[int, Field(default=0, ge=0, le=10)]
|
||||
chunk_token_num: Annotated[int, Field(default=512, ge=1, le=2048)]
|
||||
delimiter: Annotated[str, Field(default=r"\n", min_length=1)]
|
||||
delimiter: Annotated[str, Field(default="\n", min_length=1)]
|
||||
graphrag: Annotated[GraphragConfig, Field(default_factory=lambda: GraphragConfig(use_graphrag=False))]
|
||||
html4excel: Annotated[bool, Field(default=False)]
|
||||
layout_recognize: Annotated[str, Field(default="DeepDOC")]
|
||||
|
||||
Reference in New Issue
Block a user