iota
1.0.0

IOTA-最小的本地嵌入數據庫。
該項目的目的是重現現有矢量商店中我最喜歡的一些功能,同時保持極簡主義和簡單性。
重要的
這絕不是可擴展的,但對於較小的項目就足夠了。
通過PYPI安裝軟件包:
pip install iotadb這是一個非常簡單的例子:
from iotadb import IotaDB , Document
# Define a list of documents
docs = [
Document ( text = "That is a happy dog" ),
Document ( text = "That is a very happy person" ),
Document ( text = "Today is a sunny day" )
]
# Create a collection
db = IotaDB ()
db . create_collection ( name = "my_collection" , documents = docs )
# Query documents within your collection
results = db . search ( "That is a happy person" , return_similarities = True )
for doc , score in results :
print ( f"Text: { doc . text } " )
print ( f"similarity: { score :.3f } n " )可以在/examples目錄中找到更多示例。
有興趣貢獻嗎?轉到貢獻指南以獲取更多詳細信息。