1 min read
The Vercel AI SDK now supports Azure AI services through a new official provider. To use the provider, install the relevant package:
pnpm install ai @ai-sdk/azure
You can then use the provider with all AI SDK Core methods. For example, here's how you can use it with generateText
:
import { azure } from '@ai-sdk/azure';import { generateText } from 'ai';
const { text } = await generateText({ model: azure('your-deployment-name'), prompt: 'Write a vegetarian lasagna recipe for 4 people.',});
Using the Azure provider with the Vercel AI SDK
For more information, please see the documentation.