A simple, unified interface for generating embeddings from various providers.
Project description
Embedding Suite
A simple, unified interface for generating text embeddings from various providers. (This is heavily modeled on Andrew Ng's AI Suite, which does the same thing for Large Language Models.)
This is a work-in-progress, though is fully functional as described below. On the roadmap are new providers, an easier method for managing API keys, an easier way to optionally also install providers' packages, perhaps use of HTTP endpoints in lieu of providers' packages, perhaps multimodal embeddings...
Installation
(You'll need to install the provider's SDK separately.)
Pip
pip install embedding-suite
Poetry
poetry add embedding-suite
UV (recommended)
uv add embedding-suite
Example Usage
inputs = ["First sentence", "Second sentence"]
OpenAI
from embedding_suite import EmbeddingSuiteClient
client = EmbeddingSuiteClient(provider_configs={"openai": {
"api_key": "XXX"}})
embeddings = client.generate_embeddings(
model="openai:text-embedding-3-large", inputs=inputs)
Cohere
from embedding_suite import EmbeddingSuiteClient
client = EmbeddingSuiteClient(provider_configs={"cohere": {
"api_key": "XXX"}})
embeddings = client.generate_embeddings(
model="cohere:embed-english-v3.0", inputs=inputs)
VoyageAI
from embedding_suite import EmbeddingSuiteClient
client = EmbeddingSuiteClient(provider_configs={"voyageai": {
"api_key": "XXX"}})
embeddings = client.generate_embeddings(
model="voyage:voyage-3", inputs=inputs)
Sentence Transformers
from embedding_suite import EmbeddingSuiteClient
client = EmbeddingSuiteClient(provider_configs={"sentencetransformers": {}})
embeddings = client.generate_embeddings(
model="sentencetransformers:all-mpnet-base-v2", inputs=inputs)
Huggingface
from embedding_suite import EmbeddingSuiteClient
client = EmbeddingSuiteClient(provider_configs={"huggingface": {
"api_key": "XXX"}})
embeddings = client.generate_embeddings(
model="huggingface:sentence-transformers/sentence-t5-large", inputs=inputs)
Project details
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 embedding_suite-0.1.6.tar.gz.
File metadata
- Download URL: embedding_suite-0.1.6.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
631f4692d507327aafa468505ee7f263656652e7e2e415bc22d93b5a2e000f33
|
|
| MD5 |
96300940ec432c15b6cd6874d6327731
|
|
| BLAKE2b-256 |
65508af21a6bacf56889334a67131eff9864efba134a583f4d32c2950a8c2a92
|
File details
Details for the file embedding_suite-0.1.6-py3-none-any.whl.
File metadata
- Download URL: embedding_suite-0.1.6-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9a40c93694fb3aa023075f9701cd5ace1436a760c47345942883ef7f4a9acce
|
|
| MD5 |
2c4141593055953ecd45df89ddc3e1f2
|
|
| BLAKE2b-256 |
4ba2133cf980d8bf3f7d856271a05f331ef83adaaa4a71c5bca266feb25a7407
|