Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A Python framework for building vector based applications. Encode, query and analyse data using vectors.
Install via pip! Compatible with any OS.
pip install vectorai
If you require the nightly version due to on-going improvements, you can install the nightly version using:
pip install vectorai-nightly
Note: while the nightly version will still pass automated tests, it may not be stable.
Check out our quickstart notebook on how to make a text/image/audio search engine in 5 minutes: quickstart.ipynb
from vectorai import ViClient, request_api_key
api_key = request_api_key(username=<username>, email=<email>, description=<description>, referral_code="github_referred")
vi_client = ViClient(username=username, api_key=api_key)
from vectorai.models.deployed import ViText2Vec
text_encoder = ViText2Vec(username, api_key)
documents = [
{
'_id': 0,
'color': 'red'
},
{
'_id': 1,
'color': 'blue'
}
]
# Insert the data
vi_client.insert_documents('test-collection', documents, models={'color': text_encoder.encode})
# Search the data
vi_client.search('test-collection', text_encoder.encode('maroon'), 'color_vector_', page_size=2)
# Get Recommendations
vi_client.search_by_id('test-collection', '1', 'color_vector_', page_size=2)
Vector AI has powerful visualisations to allow you to analyse your vectors as easily as possible - in 1 line of code.
vi_client.plot_dimensionality_reduced_vectors(documents,
point_label='title',
dim_reduction_field='_dr_ivis',
cluster_field='centroid_title', cluster_label='centroid_title')
vi_client.plot_2d_cosine_similarity(
documents,
documents[0:2],
vector_fields=['use_vector_'],
label='name',
anchor_document=documents[0]
)
Compare vectors and their search performance on your documents easily!
VectorHub is Vector AI's main model repository. Models from VectorHub are built with scikit-learn interfaces and all have examples of Vector AI integration. If you are looking to experiment with new off-the-shelf models, we recommend giving VectorHub models a go - all of them have been tested on Colab and are able to be used in as little as 3 lines of code!
Ensure that any vector fields contain a '_vector_' in its name and that any ID fields have the name '_id'.
For example:
example_item = {
'_id': 'James',
'skills_vector_': [0.123, 0.456, 0.789, 0.987, 0.654, 0.321]
}
The following will not be recognised as ID columns or vector columns.
example_item = {
'name_id': 'James',
'skillsvector_': [0.123, 0.456, 0.789, 0.987, 0.654, 0.321]
}
The Python SDK is designed to provide a way for Pythonistas to unlock the power of VectorAI in as few lines as code as possible. It exposes all the elements of an API through our open-sourced automation tool and is the main way our data scientists and engineers interact with the VectorAI engine for quick prototyping before developers utilise API requests.
Note: The VectorAI SDK is built on the development server which can sometimes cause errors. However, this is important to ensure that users are able to access the most cutting-edge features as required. If you run into such issues, we recommend creating a GitHub Issue if it is non-urgent, but feel free to ping the Discord channel for more urgent enquiries.
Creating a multi-language AI fashion assistant: https://fashionfiesta.me | Blog
Do share with us any blogs or websites you create with Vector AI!
FAQs
A Python framework for building vector based applications. Encode, query and analyse data using vectors.
We found that vectorai-nightly demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.