Created
October 23, 2025 10:23
-
-
Save larkintuckerllc/0d1903bbd070f218844bdc52d7776858 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from langchain_community.document_loaders import DirectoryLoader, TextLoader | |
| def main(): | |
| loader = DirectoryLoader("./data/", glob="**/*.txt", loader_cls=TextLoader) | |
| documents = loader.load() | |
| print(f"Total characters: {len(documents[0].page_content)}") | |
| print(documents[0].page_content[:500]) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment