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

Migrate to langchain-aws for AWS providers #909

Merged
merged 9 commits into from
Jul 25, 2024

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Jul 24, 2024

Description

  • Migrates AWS providers (Bedrock and SageMaker Endpoint) to use updated classes from the langchain-aws package.

Demo

Screen.Recording.2024-07-24.at.3.39.54.PM.mov

@dlqqq dlqqq added the enhancement New feature or request label Jul 24, 2024
Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>
Copy link
Collaborator

@srdas srdas left a comment

Choose a reason for hiding this comment

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

Reviewed the code, tested examples for chat, learn, ask, export, using different LLMs such as Claude and Mistral, which are moved to aws.py.

One small non-blocking (non-regressive) issue relating to the SmEndpointProvider class. Tried it with Llama3.1 and it works in the magics,
image

But throws an error in the chat invocation.
image
image

This may be related to the new Llama3.1 models and to be further explored.

@dlqqq
Copy link
Member Author

dlqqq commented Jul 25, 2024

@srdas Thanks for documenting this issue! I think it is an issue with the streaming implementation in SagemakerEndpoint, but we should investigate this further (cc @3coins). Merging as the bug does not seem related to this PR.

@dlqqq dlqqq merged commit 19c7b6b into jupyterlab:main Jul 25, 2024
8 checks passed
@dlqqq dlqqq deleted the move-to-langchain-aws branch July 25, 2024 22:51
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* migrate to langchain-aws

* pre-commit

* update aws provider dependencies in docs

* correct SM endpoints docs URL

Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>

* add new Cohere model IDs to BedrockEmbeddings

Co-authored-by: Piyush Jain <piyushjain@duck.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* use BedrockLLM instead of Bedrock class

* add Amazon, Meta, Mistral models to BedrockChatProvider

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>
Co-authored-by: Piyush Jain <piyushjain@duck.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants