Update rag_bm.py

This commit is contained in:
YangQianli92 2024-04-17 13:17:42 +08:00 committed by GitHub
parent 2a90da81b6
commit 4bf9cfa51b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -58,9 +58,9 @@ class RAGExample:
logger.info("Loading Exists index!")
logger.info(f"Index Path:{output_dir}")
self.engine = SimpleEngine.from_index(
index_config=FAISSIndexConfig(),
index_config=FAISSIndexConfig(persist_path=output_dir),
ranker_configs=[ColbertRerankConfig()],
retriever_configs=[FAISSRetrieverConfig(persist_path=output_dir), BM25RetrieverConfig()],
retriever_configs=[FAISSRetrieverConfig(), BM25RetrieverConfig()],
)
else:
logger.info("Loading index from document!")