API Reference
KademliaNode
Methods
start()
: Starts the node and listens for connections.stop()
: Stops the node.bootstrap(bootstrap\_host, bootstrap\_port)
: Bootstraps the node to an existing network.add\_vector(db\_id, vector\_id, vector, metadata=None)
: Adds a vector to the database.query\_vector(db\_id, vector\_id)
: Queries a vector from the database.set\_local\_db\_manager(db\_manager)
: Sets the local database manager.get\_value(key)
: Retrieves a value from the DHT by key.
VectorDBManager
Methods
create\_database(dim)
: Creates a new vector database with the specified dimensions and returns the database ID.get\_database(db\_id)
: Retrieves a database by its ID.get\_vector\_hash(db\_id, vector\_id)
: Retrieves the hash of a vector by its ID.get\_log\_hash(db\_id, vector\_id)
: Retrieves the log hash of a vector by its ID.
Last updated