mem0
mem0 copied to clipboard
Feature/bedrock embedder
Description
This PR adds aws_bedrock embedder to embedchain and makes minor changes to the existing code such as the following:
- Use
langchain-awsinstead oflangchain-communityfor aws_bedrock llm - Use
AWS_REGIONorAWS_DEFAULT_REGIONbefore defaulting tous-west-2 - Update pre-commit config file to use newer version of ruff and remove
--force-excludedas it is already done in pyproject.toml - Add isort to pre-commit config file and have pre-commit follow the same steps in
make lintandmake formatas specified CONTRIBUTING.MD - Remove pinned versions for packages that share dependencies with langchain-aws such as opensearch-py (pyproject.toml) and boto3 (
pip installin Makefile)
Fixes # (issue) 1471
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] Refactor (does not change functionality, e.g. code style improvements, linting)
- [ ] Documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please delete options that are not relevant.
- [x] Unit Test
- [x] Test Script (please provide)
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
- [x] I have checked my code and corrected any misspellings
Maintainer Checklist
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] Made sure Checks passed
@andrewghlee Please can you remove the changes from file that is not related to AWS embedder as it's hard to review these many files.
And please feel to open separate PRs for those changes.
@andrewghlee Please can you remove the changes from file that is not related to AWS embedder as it's hard to review these many files.
And please feel to open separate PRs for those changes.
@Dev-Khant Done here!
My apologies. make format must have corrected other files.
@Dev-Khant Just a friendly nudge for this PR. I totally understand that you guys are busy with mem0 integration.
@andrewghlee Hey sure, PR looks good to me. Let me fix the failing tests first and then we are good to merge this PR.
@Dev-Khant I think one of the undone changes had the failing test resolved actually. I cherrypicked that specific file and ran make coverage and got 419 passed, 3 skipped, 21 warnings in 54.52s.
@andrewghlee can you please resolve conflicts?
@deshraj Done! Rebased with latest main and made sure poetry lock is current.
@andrewghlee Thanks for working on this PR!