[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.
Python aifaissgpt-osslangchainllama-indexllmlocalstorageoffline-firstollamaprivacypythonragretrieval-augmented-generationvector-databasevector-searchvectors
fix cli if there is no other type of doc to make it robust
yichuan520030910320710e83b1fdad
diff --git a/packages/leann-core/src/leann/cli.py b/packages/leann-core/src/leann/cli.pyindex 3563265..49fffb3 100644--- a/packages/leann-core/src/leann/cli.py+++ b/packages/leann-core/src/leann/cli.py@@ -356,13 +356,20 @@ Examples:".py",".jl",]- other_docs = SimpleDirectoryReader(- docs_dir,- recursive=True,- encoding="utf-8",- required_exts=code_extensions,- ).load_data(show_progress=True)- documents.extend(other_docs)+ # Try to load other file types, but don't fail if none are found+ try:+ other_docs = SimpleDirectoryReader(+ docs_dir,+ recursive=True,+ encoding="utf-8",+ required_exts=code_extensions,+ ).load_data(show_progress=True)+ documents.extend(other_docs)+ except ValueError as e:+ if "No files found" in str(e):+ print("No additional files found for other supported types.")+ else:+ raise eall_texts = []