A Vector Database Implementation in GoLang
Supports the following APIs:
// This creates an instance of a vector DB. You can create multiple vector DBs as required.
db:= NewVectorDB()
// Creates a collection. A collection is a set of one or more documents.
err := db.CreateCollection(collectionName)
// Add a Document to the Collection. You can add one or more Documents to a Collection.
err = db.AddDocument(collectionName, documentID, document)
// Add a Document to the Collection with Metadata. You can add one or more Documents to a Collection.
err = db.AddDocument(collectionName, documentID, document, metadata[])
// You can query a Collection to find the "closest matching" document to the input "phrase"
nearestID, err := db.Query(collectionName, phrase)
// You can query a Collection to find the "closest matching" document to the input "phrase". Only look for documents that match the provided "Metadata"
nearestID, err := db.Query(collectionName, phrase, metadata)