Skip to content

Update tutorial 32 to use the langdetect-haystack integration#466

Open
julian-risch wants to merge 1 commit into
mainfrom
update-tutorial-32-langdetect
Open

Update tutorial 32 to use the langdetect-haystack integration#466
julian-risch wants to merge 1 commit into
mainfrom
update-tutorial-32-langdetect

Conversation

@julian-risch

@julian-risch julian-risch commented Jun 16, 2026

Copy link
Copy Markdown
Member

Updates tutorial 32 ("Classifying Documents & Queries by Language") to use the new langdetect-haystack integration package, since DocumentLanguageClassifier and TextLanguageRouter have moved out of Haystack core.

Requires PR #468 to be merged before to add langdetect-haystack as an exception of uv exclude-newer setting. Otherwise tutorial ci run will fail.

Changes

  • install command: pip install langdetectpip install langdetect-haystack
  • imports:
    • from haystack.components.classifiers import DocumentLanguageClassifierfrom haystack_integrations.components.classifiers.langdetect import DocumentLanguageClassifier
    • from haystack.components.routers import TextLanguageRouterfrom haystack_integrations.components.routers.langdetect import TextLanguageRouter

How I tested it

Ran the full notebook end-to-end against the langdetect-haystack package (installed from the integration branch) with a real OPENAI_API_KEY:

  • classification wrote 2 English, 3 French, and 2 Spanish documents (no unmatched)
  • the multi-lingual RAG pipeline answered both the English and Spanish queries correctly

🤖 Generated with Claude Code

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

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 <noreply@anthropic.com>
@julian-risch julian-risch force-pushed the update-tutorial-32-langdetect branch from 256e6d0 to 7e1c6e5 Compare June 18, 2026 09:34
@julian-risch julian-risch marked this pull request as ready for review June 18, 2026 09:35
@julian-risch julian-risch requested a review from a team as a code owner June 18, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant