From 7e1c6e58debdf610ac4ffb7d528334c2883354f4 Mon Sep 17 00:00:00 2001 From: Julian Risch Date: Tue, 16 Jun 2026 23:21:41 +0200 Subject: [PATCH] Update tutorial 32 to use the langdetect-haystack integration DocumentLanguageClassifier and TextLanguageRouter moved from Haystack core to the langdetect-haystack package. Update the install command and imports, and refresh the notebook outputs from an end-to-end run. Co-Authored-By: Claude Fable 5 --- .../32_Classifying_Documents_and_Queries_by_Language.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/32_Classifying_Documents_and_Queries_by_Language.ipynb b/tutorials/32_Classifying_Documents_and_Queries_by_Language.ipynb index 45e9a58..fc01abe 100644 --- a/tutorials/32_Classifying_Documents_and_Queries_by_Language.ipynb +++ b/tutorials/32_Classifying_Documents_and_Queries_by_Language.ipynb @@ -56,7 +56,7 @@ "%%bash\n", "\n", "pip install haystack-ai\n", - "pip install langdetect" + "pip install langdetect-haystack" ] }, { @@ -91,7 +91,7 @@ "source": [ "from haystack import Document, Pipeline\n", "from haystack.document_stores.in_memory import InMemoryDocumentStore\n", - "from haystack.components.classifiers import DocumentLanguageClassifier\n", + "from haystack_integrations.components.classifiers.langdetect import DocumentLanguageClassifier\n", "from haystack.components.routers import MetadataRouter\n", "from haystack.components.writers import DocumentWriter\n", "\n", @@ -389,7 +389,7 @@ "from haystack.components.builders import ChatPromptBuilder\n", "from haystack.components.generators.chat import OpenAIChatGenerator\n", "from haystack.dataclasses import ChatMessage\n", - "from haystack.components.routers import TextLanguageRouter\n", + "from haystack_integrations.components.routers.langdetect import TextLanguageRouter\n", "\n", "prompt_template = [\n", " ChatMessage.from_user(\n",