Skip to main content

Embedding Suite

PyPI

GitHub last commit

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 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"]

You can serve API keys from your .env or explicitly add them as in the below examples.

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)

Mistral

from embedding_suite import EmbeddingSuiteClient

client = EmbeddingSuiteClient(provider_configs={"mistral": {
    "api_key": "XXX"}})

embeddings = client.generate_embeddings(
    model="mistral:mistral-embed", inputs=inputs)

Metadata

Release files for embedding-suite 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for embedding-suite 0.1.7
File Size Uploaded
embedding_suite-0.1.7.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for embedding-suite 0.1.7
File Interpreter ABI Platform
embedding_suite-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / embedding_suite-0.1.7.tar.gz

Download URL embedding_suite-0.1.7.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b538b85e8b8dafb9ea933cb4e80621d89e6378369ac166f5122ae71fab2fb8e1
BLAKE2b-256 checksum
How to use checksums
8672e9213997987d3dcc2d6696df33adcdfcbf09dbce9bedb80355ceb21dbc8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.18

Release files / embedding_suite-0.1.7-py3-none-any.whl

Download URL embedding_suite-0.1.7-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9de1d94ec03253ff1239aa44f181998c551627a32a06051e40562a78264fb89
BLAKE2b-256 checksum
How to use checksums
08efeed6d34e03984186354f95e91355fe58fe8f67f57322a8e18b4eccc890f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.18

Release history Release notifications | RSS feed

This release

0.1.7 This release

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page