Skip to content

Commit

Permalink
feat (docs): add notes to azure provider (#1927)
Browse files Browse the repository at this point in the history
Co-authored-by: Grace Yun <74513600+iteratetograceness@users.noreply.github.com>
  • Loading branch information
lgrammel and iteratetograceness committed Jun 12, 2024
1 parent da38831 commit 6dd17d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions content/providers/01-ai-sdk-providers/02-azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ const model = azure('your-deployment-name');

You need to pass your deployment name as the first argument.

<Note>
The URL for calling AZURE will be constructed as follows:
`https://RESOURCE_NAME.openai.azure.com/openai/deployments/DEPLOYMENT_NAME/chat/completions?api-version=2024-05-01-preview`
</Note>

### Example

You can use OpenAI language models to generate text with the `generateText` function:
Expand All @@ -81,6 +86,12 @@ const { text } = await generateText({
OpenAI language models can also be used in the `streamText`, `generateObject`, `streamObject`, and `streamUI` functions
(see [AI SDK Core](/docs/ai-sdk-core) and [AI SDK RSC](/docs/ai-sdk-rsc)).

<Note>
Azure OpenAI sends larger chunks than OpenAI. This can lead to the perception
that the response is slower. See [Troubleshooting: Azure OpenAI Slow To
Stream](/docs/troubleshooting/common-issues/azure-stream-slow)
</Note>

Azure OpenAI chat models support also some model specific settings that are not part of the [standard call settings](/docs/ai-sdk-core/settings).
You can pass them as an options argument:

Expand Down

0 comments on commit 6dd17d8

Please sign in to comment.