vercel / ai

Build AI-powered applications with React, Svelte, Vue, and Solid
https://sdk.vercel.ai/docs
Other
9.98k stars 1.47k forks source link

Amazon Bedrock as a provider #708

Closed timcosta closed 11 months ago

timcosta commented 1 year ago

Feature Description

Amazon Bedrock is a new generally available AWS service that wraps models from various providers such as Anthropic, AI21, Cohere, and more. It would be great to include an example of how to use Amazon Bedrock as a provider on the SDK docs page.

Use Case

Bedrock supports the synchronous InvokeModelCommand as well as the streaming InvokeModelWithResponseStreamCommand for all of these providers, which gives end users a consistent API to make calls against as well as a single pane of glass for their billing and model access. The AWS terms of service and EULA are also more appealing to certain industries than invoking these models directly through their provider due to security concerns.

Additional context

No response

ApoorvaMadhusudan commented 1 year ago

Yes! Another question, can we use the say the API key we get from AWS Bedrock for Anthropic's Claude in the Vercel AI SDK configuration? Does that directly work?

https://sdk.vercel.ai/docs/guides/providers/anthropic

NickMandylas commented 12 months ago

Agreed – I've started working on the integration will raise a PR on it, this week.

MaxLeiter commented 12 months ago

We'd love to support Bedrock but haven't prioritized a provider.

Thanks @NickMandylas, I look forward to your PR!

lgrammel commented 11 months ago

https://github.com/vercel/ai/pull/750

MaxLeiter commented 11 months ago

750 has been merged and 2.2.25 is being released. Thanks @lgrammel!