diff --git a/.github/labeler.yml b/.github/labeler.yml index 7d2e556c1..dac3bf015 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -29,6 +29,11 @@ integration:elasticsearch: - any-glob-to-any-file: "integrations/elasticsearch/**/*" - any-glob-to-any-file: ".github/workflows/elasticsearch.yml" +integration:fastembed: + - changed-files: + - any-glob-to-any-file: "integrations/fastembed/**/*" + - any-glob-to-any-file: ".github/workflows/fastembed.yml" + integration:google-ai: - changed-files: - any-glob-to-any-file: "integrations/google_ai/**/*" diff --git a/README.md b/README.md index 13ff60c93..21c1e7d9d 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ deepset-haystack | [cohere-haystack](integrations/cohere/) | Embedder, Generator | [![PyPI - Version](https://img.shields.io/pypi/v/cohere-haystack.svg)](https://pypi.org/project/cohere-haystack) | [![Test / cohere](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/cohere.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/cohere.yml) | | [deepeval-haystack](integrations/deepeval/) | Evaluator | [![PyPI - Version](https://img.shields.io/pypi/v/deepeval-haystack.svg)](https://pypi.org/project/deepeval-haystack) | [![Test / deepeval](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/deepeval.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/deepeval.yml) | | [elasticsearch-haystack](integrations/elasticsearch/) | Document Store | [![PyPI - Version](https://img.shields.io/pypi/v/elasticsearch-haystack.svg)](https://pypi.org/project/elasticsearch-haystack) | [![Test / elasticsearch](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/elasticsearch.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/elasticsearch.yml) | +| [fastembed-haystack](integrations/fastembed/) | Embedder | [![PyPI - Version](https://img.shields.io/pypi/v/fastembed-haystack.svg)](https://pypi.org/project/fastembed-haystack/) | [![Test / fastembed](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/fastembed.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/fastembed.yml) | | [google-ai-haystack](integrations/google_ai/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/google-ai-haystack.svg)](https://pypi.org/project/google-ai-haystack) | [![Test / google-ai](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/google_ai.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/google_ai.yml) | | [google-vertex-haystack](integrations/google_vertex/) | Generator | [![PyPI - Version](https://img.shields.io/pypi/v/google-vertex-haystack.svg)](https://pypi.org/project/google-vertex-haystack) | [![Test / google-vertex](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/google_vertex.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/google_vertex.yml) | | [gradient-haystack](integrations/gradient/) | Embedder, Generator | [![PyPI - Version](https://img.shields.io/pypi/v/gradient-haystack.svg)](https://pypi.org/project/gradient-haystack) | [![Test / gradient](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/gradient.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/gradient.yml) | diff --git a/integrations/fastembed/README.md b/integrations/fastembed/README.md index 94a86d85e..5ad056af3 100644 --- a/integrations/fastembed/README.md +++ b/integrations/fastembed/README.md @@ -21,17 +21,18 @@ pip install fastembed-haystack You can use `FastembedTextEmbedder` and `FastembedDocumentEmbedder` by importing as: ```python -from fastembed_haystack.fastembed_text_embedder import FastembedTextEmbedder +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" ) -embedding = text_embedder.run(text) +text_embedder.warm_up() +embedding = text_embedder.run(text)["embedding"] ``` ```python -from fastembed_haystack.fastembed__document_embedder import FastembedDocumentEmbedder +from haystack_integrations.components.embedders.fastembed import FastembedDocumentEmbedder from haystack.dataclasses import Document embedder = FastembedDocumentEmbedder( diff --git a/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_document_embedder.py b/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_document_embedder.py index 24da783fd..b1e9309c2 100644 --- a/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_document_embedder.py +++ b/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_document_embedder.py @@ -16,7 +16,7 @@ class FastembedDocumentEmbedder: # To use this component, install the "fastembed-haystack" package. # pip install fastembed-haystack - from fastembed_haystack.fastembed__document_embedder import FastembedDocumentEmbedder + from haystack_integrations.components.embedders.fastembed import FastembedDocumentEmbedder from haystack.dataclasses import Document doc_embedder = FastembedDocumentEmbedder( diff --git a/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_text_embedder.py b/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_text_embedder.py index 832d1240f..3446f80d7 100644 --- a/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_text_embedder.py +++ b/integrations/fastembed/src/haystack_integrations/components/embedders/fastembed/fastembed_text_embedder.py @@ -12,18 +12,19 @@ class FastembedTextEmbedder: Usage example: ```python - # To use this component, install the "fastembed" package. - # pip install fastembed + # To use this component, install the "fastembed-haystack" package. + # pip install fastembed-haystack - from fastembed_haystack.fastembed_text_embedder import FastembedTextEmbedder + from haystack_integrations.components.embedders.fastembed import FastembedTextEmbedder text = "It clearly says online this will work on a Mac OS system. The disk comes and it does not, only Windows. Do Not order this if you have a Mac!!" text_embedder = FastembedTextEmbedder( model="BAAI/bge-small-en-v1.5" ) + text_embedder.warm_up() - embedding = text_embedder.run(text) + embedding = text_embedder.run(text)["embedding"] ``` """ # noqa: E501