add workaround code

This commit is contained in:
yichuan520030910320
2025-07-07 23:13:47 +00:00
parent 6fc57eb48e
commit 637dab379e
6 changed files with 98 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import asyncio
from leann.api import LeannChat
from pathlib import Path
INDEX_DIR = Path("./test_pdf_index")
INDEX_DIR = Path("./test_pdf_index_huawei")
INDEX_PATH = str(INDEX_DIR / "pdf_documents.leann")
async def main():
@@ -10,8 +10,8 @@ async def main():
chat = LeannChat(index_path=INDEX_PATH)
query = "What is the main idea of RL and give me 5 exapmle of classic RL algorithms?"
query = "Based on the paper, what are the main techniques LEANN explores to reduce the storage overhead and DLPM explore to achieve Fairness and Efiiciency trade-off?"
response = chat.ask(query,top_k=20,recompute_beighbor_embeddings=True,complexity=64,beam_width=1)
# query = "什么是盘古大模型以及盘古开发过程中遇到了什么阴暗面,任务令一般在什么城市颁发"
response = chat.ask(query,top_k=20,recompute_beighbor_embeddings=True,complexity=32,beam_width=1)
print(f"\n[PHASE 2] Response: {response}")
if __name__ == "__main__":