From 2760e99e18e980163082113ba65c0ebf1c2b7ba2 Mon Sep 17 00:00:00 2001 From: yichuan520030910320 Date: Tue, 22 Jul 2025 22:03:19 -0700 Subject: [PATCH] fix readme --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5c15664..88b9482 100755 --- a/README.md +++ b/README.md @@ -112,14 +112,12 @@ builder.add_text("Neural networks process complex data") builder.add_text("Leann is a great storage saving engine for RAG on your macbook") builder.build_index("knowledge.leann") # 2. Search with real-time embeddings -searcher = LeannSearcher("knowledge.leann") -results = searcher.search("programming languages", top_k=2, recompute_beighbor_embeddings=True) +results = LeannSearcher("knowledge.leann").search("programming languages", top_k=2) # 3. Chat with LEANN -chat = LeannChat(index_path="knowledge.leann", llm_config={"type": "ollama", "model": "llama3.2:1b"}) -response = chat.ask( +llm_config={"type": "ollama", "model": "llama3.2:1b"} +response = LeannChat(index_path="knowledge.leann",llm_config=llm_config ).ask( "Compare the two retrieved programming languages and say which one is more popular today.", top_k=2, - recompute_beighbor_embeddings=True, ) ```