-
Notifications
You must be signed in to change notification settings - Fork 2.7k
support api key authentication for Bedrock API #8472
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Is there any way to provide the API key without an environment variable? For example, similar to defining |
+1, would be great to decide on runtime what key to use rather than via env var |
@danny-avila @hassiebp good callout! Opened an issue to track here: #8532 (would love a PR to add support if you're up for it!) |
@danny-avila @hassiebp actually there is one way with bedrock-runtime-client JS SDK only. you can create a client with token parameter, set authSchemePreference, and use it to call InvokeModel API without an environment variable.
|
Thanks @0x-fang! It wasn't immediately clear what the In any case, we need a release for |
Hi @danny-avila the above approach only works with We had raised a PR to bump up the boto3 version in |
@danny-avila we missed the release step, apologies! Just pushed out 0.1.12 off of main. For the issue that got added to address an api key param, would people prefer initializing as @0x-fang described or through an implicit |
AWS Bedrock has introduced API key support on 7/7, simplifying authentication for the Amazon Bedrock API. To enable this new feature in langchainjs, this update bumps the required "@aws-sdk/client-bedrock-runtime" version to "^3.840.0". It has been tested and worked as expected with new
AWS_BEARER_TOKEN_BEDROCK
environment variable.