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.6.tar.gz
(13.3 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.6.tar.gz.
File metadata
- Download URL: fastembed_haystack-0.0.6.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36ff3f9e09cb43751c88714575314f1e475422d0b2fcf3a6e4670ce09e902bc7
|
|
| MD5 |
82152e7bf9777ea92b96c3f36383b74f
|
|
| BLAKE2b-256 |
3412f451ff2c98434f3a6651e759720c2960a7f188ad023302b7e84a1317d56c
|
File details
Details for the file fastembed_haystack-0.0.6-py3-none-any.whl.
File metadata
- Download URL: fastembed_haystack-0.0.6-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68f2d1006d8bc4c6f0a3a85d6db8c2c92a9f073f3f9f51657d8088984396cb2f
|
|
| MD5 |
ea90e112194da768cd86353593de05a3
|
|
| BLAKE2b-256 |
89d7ba915b3c2a15929d2494ea3bc7441fd614f1fc1e67fae9014ffb12a1075f
|