Skip to main content

The official Mixedbread AI integration for Haystack

Project description

Mixedbread AI Haystack Integration

PyPI version Python versions

Mixedbread AI integration for Haystack. This package provides seamless access to Mixedbread's multimodal AI capabilities, enabling intelligent search that understands meaning across text, images, code, PDFs, and diverse document types. Use our state of the art embedding and reranking models as part of your haystack workflows.

Components

  • MixedbreadTextEmbedder - State-of-the-art embedding models that generate vectors capturing deep contextual meaning for single texts and queries
  • MixedbreadDocumentEmbedder - Embed full documents using advanced embedding models
  • MixedbreadReranker - Powerful semantic reranking that significantly boosts search relevance
  • MixedbreadDocumentParser - Layout-aware document parsing supporting PDF, PPTX, HTML and more formats
  • MixedbreadVectorStoreRetriever - AI-native search engine that enables conversational queries across multimodal data

Installation

pip install mixedbread-ai-haystack

Quick Start

Get your API key from the Mixedbread Platform and set it as an environment variable:

export MXBAI_API_KEY="your-api-key"

Basic Usage

from mixedbread_ai_haystack import MixedbreadTextEmbedder

embedder = MixedbreadTextEmbedder(model="mixedbread-ai/mxbai-embed-large-v1")
result = embedder.run(text="What is the capital of France?")
embedding = result["embedding"]

Async Support

All components support async operations:

import asyncio

async def embed_text():
    embedder = MixedbreadTextEmbedder()
    result = await embedder.run_async(text="Async embedding example")
    return result["embedding"]

embedding = asyncio.run(embed_text())

Examples

See the examples/ directory for complete usage examples:

Testing

# Install dev dependencies
pip install -e .[dev]

# Run all tests
python run_tests.py all

# Run only unit tests
python run_tests.py unit

# Run only integration tests (requires API key)
python run_tests.py integration

# Run specific test files
python run_tests.py tests/test_text_embedder.py

Documentation

Learn more at mixedbread.com/docs:

License

Apache 2.0 License

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

mixedbread_ai_haystack-2.1.3.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

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

mixedbread_ai_haystack-2.1.3-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file mixedbread_ai_haystack-2.1.3.tar.gz.

File metadata

  • Download URL: mixedbread_ai_haystack-2.1.3.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mixedbread_ai_haystack-2.1.3.tar.gz
Algorithm Hash digest
SHA256 476322bf979335c54aed4e5d893077eef4989f408ead9d67a763d4fbdc5923ad
MD5 51ed526301a4f78dd4c4221fef935fc5
BLAKE2b-256 57ad6ab246b67c32b2e6bdeec184e417451b77f1bc1f399801e627033c7da67c

See more details on using hashes here.

File details

Details for the file mixedbread_ai_haystack-2.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mixedbread_ai_haystack-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f370b4a1ddbc3fe46560ae537270f9844c3f6b8e5b9dc4bed894ce8fed465935
MD5 7e68df5005ab624bab737ac4de71056b
BLAKE2b-256 ccf45aa6b4075938d9fef424e0d02f51d80076da0d565b9dd17617cdf04a22da

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