iota
1.0.0

IOTA - Basis data embedding lokal minimal .
Proyek ini dilakukan dengan tujuan mereproduksi beberapa fitur favorit saya dari toko vektor yang ada sambil mempertahankan minimalis dan kesederhanaan.
Penting
Ini sama sekali tidak dapat diskalakan, tetapi harus cukup untuk proyek yang lebih kecil.
Instal paket melalui PYPI:
pip install iotadbBerikut adalah contoh yang sangat sederhana:
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 " ) Lebih banyak contoh dapat ditemukan di direktori /examples .
Tertarik berkontribusi? Pergilah ke panduan kontribusi untuk lebih jelasnya.