Can connect to Azure Gov CLoud OpenAI Provider #2094
Answered
by
lgrammel
jorge3fernandes
asked this question in
Help
-
In the new version, I don't see an argument to provide the url: import { createAzure } from '@ai-sdk/azure';
const azure = createAzure({
resourceName: 'your-resource-name', // Azure resource name
apiKey: 'your-api-key',
}); here is the error I get: When I look at the endpoint it ends with Anyone has a solution for this? |
Beta Was this translation helpful? Give feedback.
Answered by
lgrammel
Jun 25, 2024
Replies: 1 comment 2 replies
-
Do you need a fully custom URL? Azure assembles the URL based on model name etc, so it's a bit more complicated. Could you provide the URL that you want to use ( |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see. This would need better support, agreed. For now you can use a fetch decorator and fix the URL.
See e.g. https://github.com/vercel/ai/blob/main/examples/ai-core/src/generate-text/azure-custom-fetch.ts
Inside the custom fetch, you would do a string replace on the url.