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 fastembed_haystack.fastembed_text_embedder import FastembedTextEmbedder
text = "fastembed is supported by and maintained by Qdrant."
text_embedder = FastembedTextEmbedder(
model="BAAI/bge-small-en-v1.5"
)
embedding = text_embedder.run(text)
from fastembed_haystack.fastembed__document_embedder 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.1.tar.gz
(12.0 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.1.tar.gz.
File metadata
- Download URL: fastembed_haystack-0.0.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af76982d28751d1a5a99948d7e2247381e5169b0bf35adddd9b40ea7623e077a
|
|
| MD5 |
1a921b32fb0a9096db7a0519f58a1c0a
|
|
| BLAKE2b-256 |
a54aa27f79cf3b96d5667371fd2191a1349b5e5d3b128511f71abd6e1c2305f0
|
File details
Details for the file fastembed_haystack-0.0.1-py3-none-any.whl.
File metadata
- Download URL: fastembed_haystack-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2f058a1cd48fc66cfbd19f24c6bb08ec0255766986130fa0ebd92a6d08ec6c
|
|
| MD5 |
eed9558c192a3f58b499d79384fca6dd
|
|
| BLAKE2b-256 |
b9215798f0f585ae83ceee558cacd8e1831a79619694c66e109a0f364efe0103
|