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

Added support for Bedrock Titan Embeddings v2 #13580

Merged
merged 8 commits into from
May 28, 2024
Merged

Conversation

brycecf
Copy link
Contributor

@brycecf brycecf commented May 19, 2024

Description

  • Added support for Bedrock Titan Embeddings v2. This version introduces new parameters to the request body, dimensions and normalize, so added new field, titan_body_kwargs, to support.
  • Renamed model field to model_name to adhere to that used in parent class, BaseEmbedding. Bumped to 0.2.0 consequently.
  • Fixed bugs with provider mappings.
  • Improved unit test quality.

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

  • New feature (non-breaking change which adds functionality)

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

  • Added new unit/integration tests
  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 19, 2024
Copy link
Contributor

@nerdai nerdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @brycecf!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 19, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels May 19, 2024
@brycecf brycecf requested a review from nerdai May 19, 2024 15:39
@brycecf
Copy link
Contributor Author

brycecf commented May 19, 2024

@nerdai Just requesting re-review since the review should be stale with my two additional commits.

FWIW, I will be on vacation starting tomorrow so feel free to edit the PR directly. Added you as a collaborator to my fork.

* Added checks for Titan v2 params with exceptions thrown if used in v1.
* Changed constructor params from `model` to `model_name` to match BaseEmbedding.
@andrewghlee
Copy link

Hello @logan-markewich and @nerdai, any idea on when this will get merged I was waiting for this feature for my project instead of monkey patching.

Copy link
Contributor

@nerdai nerdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! thanks @brycecf -- this will get merged once our actions pass

@nerdai nerdai enabled auto-merge (squash) May 28, 2024 18:46
@nerdai nerdai merged commit 40a988b into run-llama:main May 28, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants