Skip to content

Commit

Permalink
fix ElemCharacterTextSplitter version error
Browse files Browse the repository at this point in the history
  • Loading branch information
gulixin0922 committed Sep 19, 2023
1 parent 8067aa1 commit 826eade
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/bisheng-langchain/bisheng_langchain/text_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,16 @@ def __init__(
self,
separators: Optional[List[str]] = None,
keep_separator: bool = True,
is_separator_regex: bool = False,
**kwargs: Any,
) -> None:
"""Create a new TextSplitter."""
super().__init__(
separators=separators,
keep_separator=keep_separator,
is_separator_regex=is_separator_regex,
**kwargs
)
self._separators = separators or ["\n\n", "\n", " ", ""]
self._is_separator_regex = is_separator_regex
self._is_separator_regex = False

def split_documents(self, documents: Iterable[Document]) -> List[Document]:
texts, metadatas = [], []
Expand Down Expand Up @@ -152,5 +150,3 @@ def create_documents(
documents.append(new_doc)
return documents



0 comments on commit 826eade

Please sign in to comment.