Add Azure OpenAI support
Now you can use Microsoft azure openAI as your ai service.
-
Set
OPENAI_API_ENDPOINTto Azure-OpenAI's EndPoints and setAZURE_OPENAI_DEPLOYMENTto your developmentId. -
Use your azureApiKey as
OPENAI_KEY.
e.g.
ai config set OPENAI_API_ENDPOINT=https://<your-endpoint>.openai.azure.com
ai config set AZURE_OPENAI_DEPLOYMENT=<your-deployment-id>
ai config set OPENAI_KEY=<your token>
Get more details please follow the instruction here.
thanks @akira-cn! can take a. look at this in a bit
code looks good to me, just need build to pass to merge
just about to merge this but looks like we've run into a merge conflict
Quick note, there probably should be check to remove trailing / in ai config set OPENAI_API_ENDPOINT as when you copy your endpoint from azure, it has trailing / in url.
And if that is there, ai-shell will just output:
{
"error": {
"code": "404",
"message": "Resource not found"
}
}
Don't ask me how I know :sweat_smile:
Need this feature. Will the conflicts be resolved?
waiting for the pr
going to close this out given no activity, feel free to reopen if any updates