2.1.1 • Published 10 months ago
@ai-toolkit/amazon-bedrock v2.1.1
AI TOOLKIT - Amazon Bedrock Provider
The Amazon Bedrock provider for the AI TOOLKIT contains language model support for the Amazon Bedrock converse API.
Setup
The Amazon Bedrock provider is available in the @ai-toolkit/amazon-bedrock module. You can install it with
npm i @ai-toolkit/amazon-bedrockProvider Instance
You can import the default provider instance bedrock from @ai-toolkit/amazon-bedrock:
import { bedrock } from '@ai-toolkit/amazon-bedrock';Example
import { bedrock } from '@ai-toolkit/amazon-bedrock';
import { generateText } from 'ai-toolkit';
const { text } = await generateText({
model: bedrock('meta.llama3-8b-instruct-v1:0'),
prompt: 'Write a vegetarian lasagna recipe for 4 people.',
});Documentation
Please check out the Amazon Bedrock provider documentation for more information.
2.1.1
10 months ago