docs: replace old haystack core imports with haystack_integrations paths - #3545
Merged
Merged
Conversation
SentenceTransformers embedders/rankers moved from Haystack core to this repo ahead of Haystack 3.0, but retriever docstrings and example scripts still imported them from haystack.components. Update docstring usage examples (which generate the API reference pages) and example scripts to the new haystack_integrations import paths, note the required sentence-transformers-haystack package, and drop explicit warm_up() calls now that the embedders auto-warm-up on run(). Also rename TransformersSimilarityRanker to SentenceTransformersSimilarityRanker in the weave example. Related to deepset-ai/haystack-private#449 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
bogdankostic
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Proposed Changes:
from haystack.components.embedders import SentenceTransformers...imports with the newfrom haystack_integrations.components.embedders.sentence_transformers import ...paths in the usage examples of retriever docstrings (these generate the API reference pages): arcadedb, elasticsearch (x2), faiss, opensearch, pgvector, pinecone, supabase, valkey, and the transformersTransformersZeroShotTextRouter# Requires: pip install sentence-transformers-haystackcomment above the new imports in docstring examplesHuggingFaceAPIChatGeneratorin the langfuse chat example)TransformersSimilarityRanker→SentenceTransformersSimilarityRankerin the weave hybrid-retrieval example (old core class name and old import path)warm_up()calls on SentenceTransformers embedders in docstrings/examples — theirrun()auto-invokes warm-upHow did you test it?
python -m py_compileon all changed fileshatch fmt --checkpasses on the changed sources; a scan confirms zero remaining old-path imports of migrated classes in the repoNotes for the reviewer
I chose not to mention the extra new dependency in example files but only in the docstring examples. Happy to discuss other options.
Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.🤖 Generated with Claude Code