Skip to main content

SIE integration for Haystack

Project description

sie-haystack

SIE integration for Haystack.

Installation

pip install sie-haystack

Usage

from haystack import Document
from sie_haystack import SIETextEmbedder, SIEDocumentEmbedder, 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.1.8.tar.gz (14.3 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.1.8-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sie_haystack-0.1.8.tar.gz
Algorithm Hash digest
SHA256 9b8cb61c3911a98538221ad70fd63d5da44449c0e9009705d868771cf3e16d83
MD5 80040218c24e34e451f360d872717b8c
BLAKE2b-256 120ed0ccd9b9c58cecfef00cbb54a2dc05f9e18aa0554451cefe8a07df67d15a

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for sie_haystack-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2ac0c9d8032c524f4bf6adf27700160e68874d972f5fc70f398c9caa4473f031
MD5 9459f6a5ec5ea4816d945cdd28877964
BLAKE2b-256 a49c980136dbd90dd05e899c55a3fdb7c019d3272860b8deb548417c556383e0

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