Add Azure OpenAI as a Provider for the Title Generation, Excerpt Generation and Content Resizing Features #716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
This PR adds a new Provider, Azure OpenAI, and sets that up to work for the Title Generation, Excerpt Generation and Content Resizing Features.
Azure allows you to deploy your own OpenAI resource and choose which model that resource uses (so can choose something like GPT-3.5 or GPT-4). It then provides an endpoint URL and an API key that are used to make requests.
This PR adds a new Provider that accepts those arguments and then filters any requests to that endpoint. We don't set the model during those requests as that is set when the resource is deployed on the Azure side.
Closes #492
How to test the Change
To fully test things, you'll need an Azure account that has access to OpenAI (currently this has to be applied for) and then you'll need to deploy an OpenAI resource.
Once that is in place, you can then access an endpoint URL, an API key and a deployment name, which all three are needed to make successful API requests.
Title Generation.
Azure OpenAI
in the provider fieldExcerpt Generation.
Azure OpenAI
in the provider fieldContent Resizing.
Azure OpenAI
in the provider field.Changelog Entry
Credits
Props @dkotter, @jeffpaul
Checklist: