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.6.4.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.6.4-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sie_haystack-0.6.4.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.6.4.tar.gz
Algorithm Hash digest
SHA256 174000da41e966e34f1920551d65e905d9cfc2d8b93d75ed22a5b35d4e2ea3e6
MD5 f81612e5e3cf3e2b610c3c3033d4f2cd
BLAKE2b-256 a468d073ce6c2183a8f19d12ba7a86c6eb1b0d72831fe2b765903b2839da3ee6

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.6.4.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.6.4-py3-none-any.whl.

File metadata

  • Download URL: sie_haystack-0.6.4-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.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3487e5c41b0b43fea4c1edb9555654e1fbca918a2aa2cc66ac9810c7e04c40a7
MD5 7e4698ed0fd9533bd601af01aca43a61
BLAKE2b-256 425937563f45baaee2c21115e5c6f6302b46a43593b46968a084eb37bc71b9e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for sie_haystack-0.6.4-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