BestRAG
1.0.0


介紹Bestrag !這個Python庫利用了混合檢索增強的生成(RAG)方法來有效地存儲和檢索嵌入。通過將密集,稀疏和晚期相互作用嵌入結合在一起, BestRag為管理大型數據集提供了強大的解決方案。
混合抹布:利用密集,稀疏和晚期相互作用嵌入以增強性能。
?簡單集成:用於存儲和搜索嵌入的簡單API。
? PDF支持:直接從PDF文檔存儲嵌入。
要安裝BestRag ,只需運行:
pip install bestrag這是您可以在項目中使用Bestrag的方法:
from bestrag import BestRAG
rag = BestRAG (
url = "https://YOUR_QDRANT_URL" ,
api_key = "YOUR_API_KEY" ,
collection_name = "YOUR_COLLECTION_NAME"
)
# Store embeddings from a PDF
rag . store_pdf_embeddings ( "your_pdf_file.pdf" , "pdf_name" )
# Search using a query
results = rag . search ( query = "your search query" , limit = 10 )
print ( results )
# Delete particular pdf embeddings
rag . delete_pdf_embeddings ( "home/notes.pdf" )注意:Qdrant提供了一個免費的4GB存儲空間的免費層。要生成您的API密鑰和端點,請訪問QDRANT。
隨時為Bestrag做出貢獻!無論是報告錯誤,建議功能還是提交拉的請求,都歡迎您的貢獻。
該項目已根據MIT許可獲得許可。
由samadpls創建?