Skip to main content

Unified vector storage and embedding utilities for FlexInfer services

Project description

Banner

flexinfer-vector-utils

Header

pipeline status coverage report

Unified vector storage and embedding utilities for FlexInfer services.

Features

  • Hybrid Embedder: Automatic fallback from OpenAI/vLLM to local sentence-transformers models.
  • Qdrant Storage: Generalized async client for Qdrant collection management and search.
  • Batching: Optimized batch processing for high-throughput embedding generation.

Usage

Embeddings

from vector_utils.embeddings import HybridEmbedder

# Tries OpenAI -> vLLM -> Local fallback
embedder = HybridEmbedder(
    openai_api_key="...",
    enable_local_fallback=True
)

embeddings = await embedder.embed_batch(["text1", "text2"])

Vector Store

from vector_utils.store import QdrantStore, VectorItem

store = QdrantStore(url="http://qdrant:6333", collection_name="docs")
await store.initialize()

await store.upsert([
    VectorItem(id="1", vector=[0.1, ...], payload={"type": "doc"})
])

Installation

pip install flexinfer-vector-utils
# With local fallback support
pip install "flexinfer-vector-utils[local]"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flexinfer_vector_utils-0.2.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file flexinfer_vector_utils-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flexinfer_vector_utils-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6816385bea7f3749f3f0aab012dbe0610f186b70d4e2cdc4d378e448237737f9
MD5 ba228194612b967f6685e192d0fb26eb
BLAKE2b-256 ad32f5e806776f345dc5ae772bc6651ac9d125655b3dccf88b93e6d1d792599b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page