Skip to main content

Hush workflow LLM, embedding, and reranking providers

Project description

hush-providers

LLM, embedding, and reranking provider integrations for Hush workflows.

PyPI Python

Installation

pip install hush-providers

Quick Start

LLM (chain = prompt + LLM combined)

from hush.core import Hush, GraphOp, START, END, PARENT
from hush.providers import chain

async def main():
    with GraphOp(name="chat") as graph:
        chat = chain(
            resource="gpt-4o",
            template={"system": "You are a helpful assistant.", "user": "{question}"},
            question=PARENT["question"],
        )
        START >> chat >> END

    result = await Hush(graph).run(inputs={"question": "What is Python?"})
    print(result["content"])

Embedding

from hush.providers import EmbeddingOp

embed = EmbeddingOp.of(resource="bge-m3", texts=PARENT["documents"])

Reranking

from hush.providers import RerankOp

rerank = RerankOp.of(resource="bge-reranker", query=PARENT["query"], documents=PARENT["docs"])

Supported Providers

Type Providers
LLM OpenAI, Azure OpenAI, Google Gemini, vLLM
Embedding OpenAI/vLLM, TEI, HuggingFace, ONNX
Reranking vLLM, Pinecone, Cohere, HuggingFace, ONNX

Configuration

Providers are configured via YAML resource files:

# resources.yaml
llm:
  gpt-4o:
    type: openai
    model: gpt-4o
    api_key: ${OPENAI_API_KEY}

embeddings:
  bge-m3:
    type: onnx
    model_path: /models/bge-m3

Feature Flags

Install only the providers you need:

pip install "hush-providers[openai]"       # OpenAI + Azure
pip install "hush-providers[gemini]"       # Google Gemini
pip install "hush-providers[onnx]"         # ONNX Runtime
pip install "hush-providers[all-light]"    # All without PyTorch
pip install "hush-providers[all]"          # Everything

Rust Backend

All providers have native Rust implementations via hush-providers (crate) — direct HTTP calls without Python overhead.

Related Packages

Package Description
hush-icore Core workflow engine (required)
hush-telemetry Tracing with token/cost tracking
hush-serve Serve workflows as HTTP APIs

License

Apache 2.0

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

hush_providers-0.1.9.tar.gz (59.7 kB view details)

Uploaded Source

Built Distribution

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

hush_providers-0.1.9-py3-none-any.whl (92.0 kB view details)

Uploaded Python 3

File details

Details for the file hush_providers-0.1.9.tar.gz.

File metadata

  • Download URL: hush_providers-0.1.9.tar.gz
  • Upload date:
  • Size: 59.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hush_providers-0.1.9.tar.gz
Algorithm Hash digest
SHA256 7981a646c3eb8cef8c4f0a9d77887ead3e1dc4ca63f4d36fd3faf72e654523b2
MD5 f9a2c8532be80e3b3792c2db4214e4ff
BLAKE2b-256 10310102f26899a1aa899a36cff41f34ea559cd37fb77656da53914de7212037

See more details on using hashes here.

File details

Details for the file hush_providers-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: hush_providers-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 92.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hush_providers-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 66be812813c11a2538e098b05d27f5777df2bb43b16dd0913c33f1c49b0fc093
MD5 81c4caee8dab5bb42200d4147dd5d163
BLAKE2b-256 4bbfb897961c7d4f68ce0d27ddb6a31c0a49a6417c9faa49b72ef3c05fea1258

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