From b347b308688fb722c22fa132b79b5a4a1e93320e Mon Sep 17 00:00:00 2001 From: Madeesh Kannan Date: Fri, 1 Mar 2024 18:23:11 +0100 Subject: [PATCH] docs: Fix Optimum embedder examples (#517) * fix: Fix Optimum text preprocessing for the document embedder Also some docs * Revert unnecessary "fix" --- .../components/embedders/optimum/optimum_document_embedder.py | 2 +- .../components/embedders/optimum/optimum_text_embedder.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_document_embedder.py b/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_document_embedder.py index a6db47090..783e4ac5e 100644 --- a/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_document_embedder.py +++ b/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_document_embedder.py @@ -21,7 +21,7 @@ class OptimumDocumentEmbedder: Usage example: ```python from haystack.dataclasses import Document - from haystack_integrations.components.optimum.embedders import OptimumDocumentEmbedder + from haystack_integrations.components.embedders.optimum import OptimumDocumentEmbedder doc = Document(content="I love pizza!") diff --git a/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_text_embedder.py b/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_text_embedder.py index 394ea04ad..976a7bfa8 100644 --- a/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_text_embedder.py +++ b/integrations/optimum/src/haystack_integrations/components/embedders/optimum/optimum_text_embedder.py @@ -18,7 +18,7 @@ class OptimumTextEmbedder: Usage example: ```python - from haystack_integrations.components.optimum.embedders import OptimumTextEmbedder + from haystack_integrations.components.embedders.optimum import OptimumTextEmbedder text_to_embed = "I love pizza!"