Patel.AzureAIContentSafety.Optimizely 1.0.0

dotnet add package Patel.AzureAIContentSafety.Optimizely --version 1.0.0                
NuGet\Install-Package Patel.AzureAIContentSafety.Optimizely -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Patel.AzureAIContentSafety.Optimizely" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Patel.AzureAIContentSafety.Optimizely --version 1.0.0                
#r "nuget: Patel.AzureAIContentSafety.Optimizely, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Patel.AzureAIContentSafety.Optimizely as a Cake Addin
#addin nuget:?package=Patel.AzureAIContentSafety.Optimizely&version=1.0.0

// Install Patel.AzureAIContentSafety.Optimizely as a Cake Tool
#tool nuget:?package=Patel.AzureAIContentSafety.Optimizely&version=1.0.0                

Patel-AzureAIContentSafety

Intro

This is an Add-On which integrates Azure AI Content Safety within Optimizely CMS 12. The Add-On provides users, the features and ability to integrate various functions which are part of the Azure AI Content Safety Service within Optimizely CMS to allow content users to moderate content which is being published within the CMS. Some examples of functionality within this Add-On consists of the following.

Installation

Installation added soon

dotnet add package 

Setup

After installing the package, the following steps are required to be done to setup the Add-On correctly.

Create Azure AI Resource

  1. Navigate to the Azure Portal by clicking here
  2. Click on create new resource
  3. Search for Azure AI Content Safety
  4. Select the option Azure AI Content Safety
  5. Fill out details in relation to Project Details (Choose Subscription) and Instance Details (Region/Name/Pricing Tier)
  6. Click Create
  7. When resource has been created, Navigate to the Keys and Endpoint section. An example screenshot of this is shown below

ResourceKey.

  1. Make a note of the Key and Endpoint variables - This will be needed in the Configuration section of Setup.

Configuration

For the Add-On to work, you will have to call the .AddAzureAIContentSafety() extension method in the Startup.ConfigureServices method.

Below is a code snippet with all possible configuration options. Using the Key and Endpoint variables which have been retrieved from the Azure AI Resource, populate these details into the 'TextAnalyticsSubscriptionKey' and 'TextAnalyticsEndpoint' variables as shown below

.AddAzureAIContentSafety(x => {
    x.ContentSafetySubscriptionKey = "************";
    x.ContentSafetyEndpoint = "******************";
})

You will also have to add the following line of code after calling the .AddAzureAIContentSafety() extension method

.AddControllersWithViews().AddRazorRuntimeCompilation();

In the extension method in the Startup.Configure method, the following code will need to be added

.UseEndpoints(endpoints => {
  endpoints.MapContent();
  endpoints.MapControllers();
});

Attributes

Please visit here to find out more information about the various attributes that are contained within this Add-On and how they work.

More Information

Blog posts added soon

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 172 1/3/2024

Release that includes the first iteration of Azure AI Content Safety - Integration with Optimizely CMS.