Skip to content

armgit / LEANN

Public Imported from GitHub
0

[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.

default main cli to openai add data dict as a args

yichuan5200309103200544f96b790b
diff --git a/examples/main_cli_example.py b/examples/main_cli_example.py
index 4475bb8..00b9eb6 100644
--- a/examples/main_cli_example.py
+++ b/examples/main_cli_example.py
@@ -20,7 +20,7 @@ async def main(args):
print("Loading documents...")
documents = SimpleDirectoryReader(
- "examples/data",
+ args.data_dir,
recursive=True,
encoding="utf-8",
required_exts=[".pdf", ".txt", ".md"],
@@ -104,6 +104,12 @@ if __name__ == "__main__":
default="./test_doc_files",
help="Directory where the Leann index will be stored.",
)
+ parser.add_argument(
+ "--data-dir",
+ type=str,
+ default="examples/data",
+ help="Directory containing documents to index (PDF, TXT, MD files).",
+ )
args = parser.parse_args()
asyncio.run(main(args))