mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Feature/bedrock embedder

Open andrewghlee opened this issue 1 year ago • 6 comments

Description

This PR adds aws_bedrock embedder to embedchain and makes minor changes to the existing code such as the following:

  • Use langchain-aws instead of langchain-community for aws_bedrock llm
  • Use AWS_REGION or AWS_DEFAULT_REGION before defaulting to us-west-2
  • Update pre-commit config file to use newer version of ruff and remove --force-excluded as it is already done in pyproject.toml
  • Add isort to pre-commit config file and have pre-commit follow the same steps in make lint and make format as specified CONTRIBUTING.MD
  • Remove pinned versions for packages that share dependencies with langchain-aws such as opensearch-py (pyproject.toml) and boto3 (pip install in 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 avatar Jul 12 '24 00:07 andrewghlee

@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 avatar Jul 25 '24 14:07 Dev-Khant

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

andrewghlee avatar Jul 25 '24 18:07 andrewghlee

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 26 '24 02:07 CLAassistant

@Dev-Khant Just a friendly nudge for this PR. I totally understand that you guys are busy with mem0 integration.

andrewghlee avatar Jul 29 '24 19:07 andrewghlee

@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 avatar Jul 30 '24 06:07 Dev-Khant

@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 avatar Jul 30 '24 10:07 andrewghlee

@andrewghlee can you please resolve conflicts?

deshraj avatar Jul 31 '24 14:07 deshraj

@deshraj Done! Rebased with latest main and made sure poetry lock is current.

andrewghlee avatar Aug 01 '24 17:08 andrewghlee

@andrewghlee Thanks for working on this PR!

Dev-Khant avatar Aug 01 '24 17:08 Dev-Khant