-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
#7809: Permit bedrock application inference profiles #7822
base: main
Are you sure you want to change the base?
#7809: Permit bedrock application inference profiles #7822
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
invoke approach is complicated indeed but this patch looks hacky and like a workaround. I will see what I can do when i have time unless langchain team is okay for this patch. 🙏 |
Thanks, I think it's actually pretty clean given the meta data is parsed from the model id. All that is unavailable in the inference id arn. Curious to hear how you could do it another way with that limitation. I expect you'd need to do an intermediate lookup or supply a second field as I have. |
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.
Thanks! Small question
For example, "arn%3Aaws%3Abedrock%3Aus-east-1%3A1234567890%3Aapplication-inference-profile%2Fabcdefghi", will override this.model in final /invoke URL call. | ||
Must still provide `model` as normal modelId to benefit from all the metadata. | ||
*/ | ||
modelAlias?: string; |
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.
Should we call this applicationInferenceProfile
?
Fixes #7809
Bedrock Chat Model did not have a way to invoke Application Inference Profiles. Solving this was complicated at first... how do you keep all that modelId-derived metadata parsing?
So I added a
modelAlias
field that simply overridesthis.model
to be used in the /invoke URL. It expects to be URL encoded. Worked great in my local testing. You can find me on Twitter @bios_hazard