cleaned code
This commit is contained in:
@@ -195,8 +195,6 @@ class LightRAG:
|
|||||||
list[dict[str, Any]],
|
list[dict[str, Any]],
|
||||||
] = chunking_by_token_size
|
] = chunking_by_token_size
|
||||||
|
|
||||||
chunking_func_kwargs: dict = field(default_factory=dict)
|
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
os.makedirs(self.log_dir, exist_ok=True)
|
os.makedirs(self.log_dir, exist_ok=True)
|
||||||
log_file = os.path.join(self.log_dir, "lightrag.log")
|
log_file = os.path.join(self.log_dir, "lightrag.log")
|
||||||
@@ -581,12 +579,11 @@ class LightRAG:
|
|||||||
}
|
}
|
||||||
for dp in self.chunking_func(
|
for dp in self.chunking_func(
|
||||||
doc["content"],
|
doc["content"],
|
||||||
split_by_character=split_by_character,
|
split_by_character,
|
||||||
split_by_character_only=split_by_character_only,
|
split_by_character_only,
|
||||||
overlap_token_size=self.chunk_overlap_token_size,
|
self.chunk_overlap_token_size,
|
||||||
max_token_size=self.chunk_token_size,
|
self.chunk_token_size,
|
||||||
tiktoken_model=self.tiktoken_model_name,
|
self.tiktoken_model_name,
|
||||||
**self.chunking_func_kwargs,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user