MCPcopy Create free account
hub / github.com/CL-lau/SQL-GPT / split_documents_2texts

Method split_documents_2texts

model/data_connection.py:72–84  ·  view source on GitHub ↗
(
            documents: list[Document],
            chunk_size: int = 300,
            chunk_overlap: int = 0
    )

Source from the content-addressed store, hash-verified

70
71 @staticmethod
72 def split_documents_2texts(
73 documents: list[Document],
74 chunk_size: int = 300,
75 chunk_overlap: int = 0
76 ) -> list:
77 splitter = RecursiveCharacterTextSplitter(
78 chunk_size=chunk_size,
79 chunk_overlap=chunk_overlap
80 )
81 content = ""
82 for document in documents:
83 content += document.page_content
84 return splitter.split_text(content)
85
86 @staticmethod
87 def crawl_file(url: str) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected