Package: victo
VictoVicto is a AI Native, Lightweight, Plugable, Portable, Scalable Vector Database.IntroductionVector embeddings are the integral part of AI applications. There is a need for a database to store and effeciently retrive vectors. For which, Victo is a best choice.The highlevel architecture of Victo is,Database -> contains Collections -> contains VectorsThe DB operations supported by Victo are:Add a CollectionDelete a CollectionGet the count of collectionsList the collections in a databaseAdd a Vector RecordDelete a Vector RecordRetrive a Vector RecordQuery VectorGet the count of vectors in a collectionGet the list of vectors in a collectionThe Query vector works based on the vector distance calculation. Supported methods:Euclidean DistanceCosine SimilarityManhattan DistanceMinkowski Distance MethodSome of the usecases for Victo are:NLPGenerative AIRecommender SystemImage SearcheCommerceMachine LearningSocial NetworksBuilt WithPython 3.6CGetting StartedPip Installpip install victoFacadeFacade is the interface to execute DB operations on Victofrom victo import facade as fdAdd a new Collectionfd.newCollection(db, collection)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data
    collection  : string    : Eg: reports
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : stringDelete a Collectionfd.deleteCollection(db, collection)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data
    collection  : string    : Eg: reports
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : stringGet the count of Collections in a DBfd.collectionCount(db)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : string
    rs.count    : intGet the list of Collections in a DBfd.collectionList(db)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data    
Returns:
    returns a result set object (rs)
    rs.errCode      : int       
    rs.errMsg       : string
    rs.collections  : Array of stringAdd a vector records to a Collectionfd.putVector(db, collection, ai_model, hash, vdim, vp, is_normal, overwrite)

Arguments:
    db          : string            : Eg: /path/tp/victodb/data
    collection  : string            : Eg: reports
    ai_model    : string            : Eg: any_ai_model_used_for_vector_embedding (Max. 64 chars)
    hash        : string            : Eg: vector_id (Max. 64 chars)
    vdim        : int               : 768 (size of vector dimension - Max. 2048)
    vp          : Array of float    : Vector Embeddings
    is_normal   : bool              : True or False (normalize before save)
    overwrite   : bool              : True or False (overwrite if vector already exist) 
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : string
    rs.hash     : string    : Eg: vector_idQuery a single vector recors from a Collectionfd.getVector(db, collection, hash)

Arguments:
    db          : string            : Eg: /path/tp/victodb/data
    collection  : string            : Eg: reports
    hash        : string            : Eg: vector_id (Max. 64 chars)
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : string
    rs.node     : vector node
        node.ai_model   :   string
        node.hash       :   string
        node.normal     :   int     : 0 - normalized, 1 - not normalized
        node.vdim       :   int
        node.vp         :   array of floatQuery vector records based on a condition from a Collectionfd.queryVector(db, collection, ai_model, vdim, vp, vector_distance_method, query_limit, logical_op, k_value, p_value, do_normal, include_fault)

Arguments:
    db                      : string            : Eg: /path/tp/victodb/data
    collection              : string            : Eg: reports
    ai_model                : string            : Eg: any_ai_model_used_for_vector_embedding (Max. 64 chars)
    vdim                    : int               : 768 (size of vector dimension - Max. 2048) (input vector)
    vp                      : Array of float    : Vector Embeddings (input_vector)
    vector_distance_method  : int               : 0 - Euclidean, 1 - CosineSimilarity, 2 - Manhattan, 3 - Minkowski (Default: 0)
    query_limit             : int
    logical_op              : int               : 0 - equal, 1 - greater than, 2 - greater than or equal, -1 - less than, -2 - less than or equal (Default: 0)
    k_value                 : float             : value used for comparison while query (Default: 0)
    p_value                 : float             : (Default: 0)
    do_normal               : bool              : Do normalize before search (Default: False)
    include_fault           : bool              : (Default: False)
Returns:
    returns a result set object (rs)
    rs.errCode          : int       
    rs.errMsg           : string
    rs.queryCount       : int
    rs.faultCount       : int
    rs.queryVectorRS    : Array of vector result
        queryVectorRS.errCode   : int
        queryVectorRS.errMsg    : string
        queryVectorRS.ai_model  : string
        queryVectorRS.normal    : int
        queryVectorRS.hash      : string
        queryVectorRS.vdim      : int
        queryVectorRS.distance  : double      
    rs.faultVectorRS    : Array of vector result
        faultVectorRS.errCode   : int
        faultVectorRS.errMsg    : string
        faultVectorRS.ai_model  : string
        faultVectorRS.normal    : int
        faultVectorRS.hash      : string
        faultVectorRS.vdim      : int
        faultVectorRS.distance  : doubleDelete a vector record in a Collectionfd.deleteVector(db, collection, hash)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data
    collection  : string    : Eg: reports 
    hash        : string    : Eg: vector_id   
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : stringGet the count of vector records in a Collectionfd.vectorCount(db, collection)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data
    collection  : string    : Eg: reports    
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : string
    rs.count    : intGet the list of vector records in a Collectionfd.vectorList(db, collection)

Arguments:
    db          : string    : Eg: /path/tp/victodb/data    
    collection  : string    : Eg: reports  
Returns:
    returns a result set object (rs)
    rs.errCode  : int       
    rs.errMsg   : string
    rs.vectors  : Array of stringUsageThe sample project listedhereis a command line utility makes use ofCoherefor vector embedings and victo for storing and processing vector embeddings.RoadmapThe project right now is supported is only in MacOS. Work is in progress to be supported in Linux and WindowsAdd support for additional Vector distance calculation methods such as: Jaccard Similarity and Hamming DistanceContributingAny contributions you make aregreatly appreciated.If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Adding AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestLicenseDistributed under the MIT License. SeeLICENSEfor more information.AuthorsSree Hari -hari.tinyblitz@gmail.comVersion HistoryLatest: v0.0.19