Skip to content

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

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

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

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.

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
  • refreshed the notebook outputs from an end-to-end run

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

Merge order

CI executes the notebook, and pip install langdetect-haystack will only succeed once the package is published to PyPI. This depends on the integration PR (deepset-ai/haystack-core-integrations#3457) being merged and integrations/langdetect-v1.0.0 released. Part of https://github.com/deepset-ai/haystack-private/issues/373.

🤖 Generated with Claude Code

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>
@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

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