starpoint sdk
python-0.7.0
pip install starpoint
Nachdem Sie einen API -Schlüssel und eine Sammlung auf Ihrem Starpoint -Konto erstellt haben
from starpoint . db import Client
client = Client ( api_key = "YOUR_API_KEY_HERE" )
documents = [
{
"embeddings" : [ 0.1 , 0.2 , 0.3 , 0.4 , 0.5 ],
"metadata" : {
"label1" : "0" ,
"label2" : "1" ,
}
},
]
// Instead of collection_name you can also use collection_id = "COLLECTION_ID"
client . insert ( documents = documents , collection_name = "COLLECTION_NAME" )Stellen Sie sicher, dass Sie die Entwicklungsanforderungen installiert haben
pip install -r dev-requirements.txt
Unit -Tests sollten durchgeführt werden. Sie können sie über durchführen
pytest ./tests