iota
1.0.0

IOTA - Eine minimale lokale Einbettungsdatenbank .
Dieses Projekt wurde mit dem Ziel durchgeführt, einige meiner Lieblingsfunktionen aus vorhandenen Vektorspeichern zu reproduzieren und gleichzeitig Minimalismus und Einfachheit beizubehalten.
Wichtig
Dies ist keineswegs skalierbar, sollte aber für kleinere Projekte ausreichen.
Installieren Sie das Paket über PYPI:
pip install iotadbHier ist ein sehr einfaches Beispiel:
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 " ) Weitere Beispiele finden Sie im Verzeichnis /examples .
Interessiert an einem Beitrag? Weitere Informationen finden Sie in den Beitragshandbuch.