Skip to main content

SIE integration for Haystack

Project description

sie-haystack

SIE integration for Haystack.

Installation

pip install sie-haystack

Imports

Preferred import paths follow Haystack's namespace convention:

from haystack_integrations.components.embedders.sie import (
    SIEDocumentEmbedder,
    SIETextEmbedder,
)
from haystack_integrations.components.rankers.sie import SIERanker
from haystack_integrations.components.extractors.sie import SIEExtractor

The legacy flat imports remain supported for compatibility:

from sie_haystack import SIEDocumentEmbedder, SIEExtractor, SIERanker, SIETextEmbedder

Usage

from haystack import Document
from haystack_integrations.components.embedders.sie import SIEDocumentEmbedder, SIETextEmbedder
from haystack_integrations.components.rankers.sie import SIERanker

# Embed a query
text_embedder = SIETextEmbedder(base_url="http://localhost:8080", model="BAAI/bge-m3")
result = text_embedder.run(text="What is machine learning?")
query_embedding = result["embedding"]

# Embed documents
doc_embedder = SIEDocumentEmbedder(base_url="http://localhost:8080", model="BAAI/bge-m3")
docs = [Document(content="Python is a programming language.")]
result = doc_embedder.run(documents=docs)
embedded_docs = result["documents"]

# Rerank documents
ranker = SIERanker(
    base_url="http://localhost:8080",
    model="jinaai/jina-reranker-v2-base-multilingual"
)
result = ranker.run(query="What is Python?", documents=embedded_docs, top_k=3)
ranked_docs = result["documents"]

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

sie_haystack-0.3.3.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

sie_haystack-0.3.3-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file sie_haystack-0.3.3.tar.gz.

File metadata

  • Download URL: sie_haystack-0.3.3.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sie_haystack-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f801f79a2b7423bd76cb3005dce70999d6b8e923a4e912e16b6fb20802641d80
MD5 65d39bbc968ee18dcc2606143b82e051
BLAKE2b-256 9ddfcaadcc91e906d5cca459f2df49f0ae59637d017e307469517f7d45b6a1dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.3.3.tar.gz:

Publisher: release-python.yml on superlinked/sie-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sie_haystack-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: sie_haystack-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sie_haystack-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 852c07f1429c6ae2aeb13f45b35786c1030e88ca333586d73c5b76d131814f0c
MD5 cd47b3d5c57087d9150bdfe0ee3bc263
BLAKE2b-256 0d3ab6c4792e0753e8378b3d96dd7ceeb78b15e0ee3d0738e90cb34583cfe6ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.3.3-py3-none-any.whl:

Publisher: release-python.yml on superlinked/sie-internal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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