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目录中找到更多示例。
有兴趣贡献吗?转到贡献指南以获取更多详细信息。