A simple, no bs vector database for experimentation and prototyping
Project description
Vectorim
A simple, no BS vector database for experimentation and prototyping. This Vector "DB" is not designed for performance or scale, and will probably choke your machine under more than a few thousand entries. It is to be used in scripting and experimenting with new ideas, without the hassle of actually using a database. It just keeps the vectors next to your data in a class, and pickles it on each update (if enabled). This way the db can be saved across runs avoiding re-embeddding. Usage:
from vectorim import Vectorim
# create a database
vector_db = Vectorim([[1.0, 0.4, ...], ...], ["Vectorim", "Is", "The", "Best", "Database", ...], file_path="my_db.pkl")
# search!
scores, data = vector_db.search([0.69, 0.42, ...], top_k=3)
# that's it really
For the sake of laziness, vectors/matrices can be either lists/nested-lists of floats or numpy arrays of corresponding dimensions. OpenAI API returns a list of floats as of now, but working with numpy is nicer so internally everything is converted to that format. Shouldn't really bother you as it's hidden, just use any one of them.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vectorim-0.0.1.tar.gz.
File metadata
- Download URL: vectorim-0.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
352890cc67aad0b000ed7eff02ecf0023a09692829820c44a4a4b45f2ab82213
|
|
| MD5 |
6ea0b49aa7ce8e95941a6852d81f19ec
|
|
| BLAKE2b-256 |
a682036b0a3f7f9e0fdd4d77e633f059c138c2fcf803f11edecc3551eaa81842
|
File details
Details for the file vectorim-0.0.1-py3-none-any.whl.
File metadata
- Download URL: vectorim-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c2d748dc1b0775e871663a6139aeadee15f329c3ac3c4f45dde5576aba174ee
|
|
| MD5 |
96331edabb38a69c2f802b0cec6ff382
|
|
| BLAKE2b-256 |
8d48c67e8ce677347945799acc6226be901c43162dd463a4b1cf0eb8287c2a79
|