httpie for embeddings. Embed anything from the command line.
Project description
vemb
httpie for embeddings. Embed text, images, audio, video, and PDFs from the command line.
pipx install vemb
export GEMINI_API_KEY=your_key
vemb text "hello world"
Powered by Gemini Embedding 2, the first natively multimodal embedding model.
Install
pipx install vemb
# or
pip install vemb
Get a free API key at https://aistudio.google.com/apikey
export GEMINI_API_KEY=your_key
Commands
vemb text "hello world" # embed text
vemb image photo.jpg # embed image (PNG, JPEG)
vemb audio clip.mp3 # embed audio (MP3, WAV)
vemb video clip.mp4 # embed video (MP4, MOV)
vemb pdf doc.pdf # embed PDF
vemb similar photo1.jpg photo2.jpg # cosine similarity between two files
vemb search ./photos "sunset at beach" # search a directory
Output
Default output is JSON:
{
"model": "gemini-embedding-2-preview",
"dimensions": 768,
"values": [0.012, -0.034, ...]
}
Options:
vemb text "hello" --compact # just the vector array
vemb text "hello" --numpy # numpy format
vemb text "hello" --dim 768 # set dimensions (128-3072)
vemb text "hello" --task RETRIEVAL_QUERY # set task type
Search
Search indexes a directory and finds files similar to your query:
vemb search ./photos "sunset at beach" --top 5
Embeddings are cached in .vemb/cache.json inside the searched directory. Unchanged files won't be re-embedded on subsequent searches.
License
MIT
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 vemb-0.1.0.tar.gz.
File metadata
- Download URL: vemb-0.1.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b31cc2e8656e50dc653109eb96f3d0164ad69f2d789d83ca27abaab6dc792fe
|
|
| MD5 |
00d52f6f8665e75c9e14a6d1d64000cb
|
|
| BLAKE2b-256 |
d429e55e28103d0c8fe627d4fbf12ae33874a23bc1cf41081dc97c1fe062c419
|
File details
Details for the file vemb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vemb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d8e80880934888e9da02427a8871077ef9f9e86a0eced09ac141a8529d2866
|
|
| MD5 |
db0191c767fdc95d07aed1727b2a9d55
|
|
| BLAKE2b-256 |
18a30c6eedd8602631a18461c49b868c42c62f023b27f55d82b34a12559b7e63
|