Haystack 2.x component to embed strings and Documents using fastembed embedding model
Project description
fastembed-haystack
Table of Contents
Installation
pip install fastembed-haystack
Usage
You can use FastembedTextEmbedder and FastembedDocumentEmbedder by importing as:
from haystack_integrations.components.embedders.fastembed import FastembedTextEmbedder
text = "fastembed is supported by and maintained by Qdrant."
text_embedder = FastembedTextEmbedder(
model="BAAI/bge-small-en-v1.5"
)
text_embedder.warm_up()
embedding = text_embedder.run(text)["embedding"]
from haystack_integrations.components.embedders.fastembed import FastembedDocumentEmbedder
from haystack.dataclasses import Document
embedder = FastembedDocumentEmbedder(
model="BAAI/bge-small-en-v1.5",
)
embedder.warm_up()
doc = Document(content="fastembed is supported by and maintained by Qdrant.", meta={"long_answer": "no",})
result = embedder.run(documents=[doc])
License
fastembed-haystack is distributed under the terms of the Apache-2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastembed_haystack-0.0.4.tar.gz
(12.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastembed_haystack-0.0.4.tar.gz.
File metadata
- Download URL: fastembed_haystack-0.0.4.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c82b05d448e69d3027eccc179ec9c8d5bb3333a7baa396aa1207484bcbb704f0
|
|
| MD5 |
a7279cda3b3b2eb7f683ee32e7a605bd
|
|
| BLAKE2b-256 |
c69688e108e61c2bb4fe57d5192ffabc18a0527780a1d81343490d22b980fe36
|
File details
Details for the file fastembed_haystack-0.0.4-py3-none-any.whl.
File metadata
- Download URL: fastembed_haystack-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62788b4892335ecadff19b724b635e77df4c2182ada0a737685ecd741ff32973
|
|
| MD5 |
994dc58a7df90a0fa8a1c60e8e2dc8ec
|
|
| BLAKE2b-256 |
80fba8d80a9d547a068c7352745c5478f7d5b5336e702d657a1cacec783a26ff
|