-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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[minor]: Make EmbeddingsFilters async #22737
langchain[minor]: Make EmbeddingsFilters async #22737
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
7bd7f32
to
d9f4eff
Compare
@eyurtsev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good -- could you undo changes in pyproject.toml and poetry.lock -- most PRs should leave those unomdified
libs/community/tests/integration_tests/retrievers/test_contextual_compression.py
Show resolved
Hide resolved
.../community/tests/integration_tests/retrievers/document_compressors/test_embeddings_filter.py
Outdated
Show resolved
Hide resolved
.../community/tests/integration_tests/retrievers/document_compressors/test_embeddings_filter.py
Outdated
Show resolved
Hide resolved
.../community/tests/integration_tests/retrievers/document_compressors/test_embeddings_filter.py
Outdated
Show resolved
Hide resolved
libs/community/tests/integration_tests/retrievers/document_compressors/test_base.py
Outdated
Show resolved
Hide resolved
libs/community/tests/integration_tests/retrievers/document_compressors/test_base.py
Outdated
Show resolved
Hide resolved
Hello @eyurtsev In test_embeddings_filter.py, I change But, for that, I need to add a dependency in pyproject.tml [tool.poetry.group.test_integration.dependencies]
...
langchain-openai = ">=0.1.8" But, the
Do you think I should keep the original import? |
Yes, please keep the original import. If you want to spend more effort, you could fix the test logic itself (not required for this PR) -- the test should not depend on the embedding provider, and instead can leverage fake embeddings in langchain_core. If that's done, then the test can be moved into unit tests. |
@eyurtsev |
libs/community/pyproject.toml
Outdated
@@ -67,6 +67,7 @@ tiktoken = ">=0.3.2,<0.6.0" | |||
anthropic = "^0.3.11" | |||
langchain-core = { path = "../core", develop = true } | |||
langchain = { path = "../langchain", develop = true } | |||
#langchain-openai = ">=0.1.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you revert changes in pyproject toml and poetry lock please? Most PRs should not be modifying these files
.../community/tests/integration_tests/retrievers/document_compressors/test_embeddings_filter.py
Outdated
Show resolved
Hide resolved
libs/community/tests/integration_tests/retrievers/test_contextual_compression.py
Show resolved
Hide resolved
libs/community/tests/integration_tests/retrievers/test_contextual_compression.py
Show resolved
Hide resolved
Add native async implementation for EmbeddingsFilter
Thank you for contributing to LangChain!
PR title: community: EmbeddingsFilters is not compatible with async
PR message:
Add tests and docs: Test were updated
Lint and test: Run
make format
,make lint
andmake test
from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/@eyurtsev, another review ?