Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

langchain: Fix Neo4jVector vector store reference from partner package for self query #28292

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libs/langchain/langchain/retrievers/self_query/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ def _get_builtin_translator(vectorstore: VectorStore) -> Visitor:
if isinstance(vectorstore, MongoDBAtlasVectorSearch):
return MongoDBAtlasTranslator()

try:
from langchain_neo4j import Neo4jVector
except ImportError:
pass
else:
if isinstance(vectorstore, Neo4jVector):
return Neo4jTranslator()

try:
from langchain_chroma import Chroma
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ langchain-fireworks = { path = "libs/partners/fireworks", develop = true }
langchain-google-vertexai = { git = "https://github.com/langchain-ai/langchain-google.git", subdirectory = "libs/vertexai" }
langchain-groq = { path = "libs/partners/groq", develop = true }
langchain-mistralai = { path = "libs/partners/mistralai", develop = true }
langchain-neo4j = { path = "libs/partners/neo4j", develop = true }
langchain-together = { git = "https://github.com/langchain-ai/langchain-together.git", subdirectory = "libs/together" }
langchain-unstructured = { git = "https://github.com/langchain-ai/langchain-unstructured.git", subdirectory = "libs/unstructured" }
langgraph = { git = "https://github.com/langchain-ai/langgraph.git", subdirectory = "libs/langgraph" }
Expand Down
Loading