-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add mistral as supported provider for AWS Bedrock #4803
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
The issue is in the input/output parsing - I think there might be some other changes needed in the adapter? |
@jacoblee93 You are 💯 right! I created a PR against his fork (https://github.dev/jarib/langchainjs/pull/1) with the changes needed to implement it properly. Thanks! |
Ah, I missed that. I've merged @esoler-sage's fix, thanks! |
…add-mistral-to-bedrock
Thank you! FYI @efriis |
@@ -21,21 +21,21 @@ import { BedrockChat } from "../bedrock/web.js"; | |||
void testChatModel( | |||
"Test Bedrock chat model: Claude-v2", | |||
"us-east-1", | |||
"anthropic.claude-v2", | |||
"mistral.mistral-7b-instruct-v0:2", | |||
"What is your name?" |
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.
Shouldn't this be added as separate tests? Claude support is pretty important too :D
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.
Well we've already got Claude-3 below, which most people should be using now.
Good PR! A lot of these if statements / double validation will be removed in an upcoming refactor of bedrock on the python side, and @jacoblee93 will probably tap in to do something similar in js. I believe the reason for validation is that Bedrock models don't have a standard api for their inputs and arguments, so checking and throwing an error fails quickly instead of bedrock introducing a new model that doesn't have a supported input/args format, and producing an output that doesn't make sense. |
@efriis I was about to create 2 PR... token count on Bedrock Models and add different chat prompts to improve this line: https://github.com/langchain-ai/langchainjs/blob/main/libs/langchain-community/src/chat_models/bedrock/web.ts#L295. For this second, probably it's better to wait until this refactoring is done? |
Mistral is now supported in AWS Bedrock.
Langchain has a duplicated list of valid models. I'd argue that they both can be removed. Langchain doesn't need to validate the models before passing them on to Bedrock.