Encamina.Enmarcha.AI.IntentsPrediction.Azure 8.1.2-preview-10

This is a prerelease version of Encamina.Enmarcha.AI.IntentsPrediction.Azure.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Encamina.Enmarcha.AI.IntentsPrediction.Azure --version 8.1.2-preview-10
                    
NuGet\Install-Package Encamina.Enmarcha.AI.IntentsPrediction.Azure -Version 8.1.2-preview-10
                    
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="Encamina.Enmarcha.AI.IntentsPrediction.Azure" Version="8.1.2-preview-10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Encamina.Enmarcha.AI.IntentsPrediction.Azure" Version="8.1.2-preview-10" />
                    
Directory.Packages.props
<PackageReference Include="Encamina.Enmarcha.AI.IntentsPrediction.Azure" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Encamina.Enmarcha.AI.IntentsPrediction.Azure --version 8.1.2-preview-10
                    
#r "nuget: Encamina.Enmarcha.AI.IntentsPrediction.Azure, 8.1.2-preview-10"
                    
#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.
#:package Encamina.Enmarcha.AI.IntentsPrediction.Azure@8.1.2-preview-10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Encamina.Enmarcha.AI.IntentsPrediction.Azure&version=8.1.2-preview-10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Encamina.Enmarcha.AI.IntentsPrediction.Azure&version=8.1.2-preview-10&prerelease
                    
Install as a Cake Tool

AI - Azure Intent Prediction

Nuget package

Azure Intent Prediction is a wrapper project for Azure Cognitive Language Services Conversations client library. Its main functionality is to simplify and abstract the usage of the library, primarily focused on intention detection.

Setup

Nuget package

First, install NuGet. Then, install Encamina.Enmarcha.AI.IntentsPrediction.Azure from the package manager console:

PM> Install-Package Encamina.Enmarcha.AI.IntentsPrediction.Azure

.NET CLI:

Install .NET CLI. Next, install Encamina.Enmarcha.AI.IntentsPrediction.Azure from the .NET CLI:

dotnet add package Encamina.Enmarcha.AI.IntentsPrediction.Azure

How to use

First, you need to add the IntentPredictionConfigurations to your project configuration. You can achieve this by using any configuration provider. The following code is an example of how the settings should be set up using the appsettings.json file:

  {
    // ...
    "IntentPredictionConfigurations": {    
      "IntentPredictionOptions": [
        {
          "Name": "DefaultIntentPrediction", // Name of this configuration
          "EndpointUrl": "https://example.cognitiveservices.azure.com/", // Language Service endpoint's url
          "KeyCredential": "<API-KEY>", // Language Service (security) key
          "DeploymentSlot": "development", // Deployment type, allowing the 'test' and 'prod' ('production' works as well)
          "OrchestratorName": "<ORCHESTRATOR-NAME>", // The name of the Orchestrator to use as intent prediction service from Azure
          "EnableLogging": true, // A flag to indicate whether logging is enabled
          "EnableVerbose": false, // A flag to indicate whether verbose mode is enabled
          "ConfidenceThreshold": 0.65 // Minimum threshold score for answers, value ranges from 0 to 1
        }
      ]
    },
    // ...
  }

Next, in Program.cs or a similar entry point file in your project, add the following code.

// Entry point
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
   // ...
});

// ...

// Or others configuration providers...
builder.Configuration.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true); 

builder.Services.AddDefaultCognitiveServiceProvider()
                .AddAzureIntentPredictionServices(builder.Configuration);

The extension methods AddDefaultCognitiveServiceProvider and AddAzureIntentPredictionServices manage the configuration to create instances of ICognitiveServiceProvider. With this, you can retrieve instances of IIntentPredictionService (whose implementation is IntentPredictionService). As seen in the appsettings.json, IntentPredictionConfigurations is an array, which allows you to generate different Intent Prediction configurations and retrieve information based on the Name parameter. You can inject ICognitiveServiceProvider through the constructor.

public class MyClass
{
    private readonly IIntentPredictionService intentPredictionService;

    public MyClass(ICognitiveServiceProvider cognitiveServiceProvider)
    {
        // The value "DefaultIntentPrediction" is the name specified in the JSON from the previous code.
        // This is just an example code; avoid hardcoding strings :)
        intentPredictionService = cognitiveServiceProvider.GetIntentPredictionService("DefaultIntentPrediction");
    }

    public async Task<string> GetIntentAsync(string userInput, CancellationToken cancellationToken)
    {
        var intentPredictionRequest = new IntentPredictionRequest()
        {
            IntentPredictionOptions = new IntentPredictionOptions() { Language = CultureInfo.CurrentCulture },
            Utterance = userInput
        };

        var intentPredictionResult = await intentPredictionService.PredictIntentAsync(intentPredictionRequest, cancellationToken);

        return intentPredictionResult.IntentPrediction?.TopIntentName;
    }
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
10.0.0-preview-1 107 9/10/2025
8.3.0 113 9/10/2025
8.3.0-preview-02 107 9/10/2025
8.3.0-preview-01 121 9/8/2025
8.2.1-preview-08 125 8/18/2025
8.2.1-preview-07 128 8/12/2025
8.2.1-preview-06 125 8/11/2025
8.2.1-preview-05 217 8/5/2025
8.2.1-preview-04 134 7/15/2025
8.2.1-preview-03 137 7/14/2025
8.2.1-preview-02 136 7/3/2025
8.2.1-preview-01 276 3/23/2025
8.2.0 150 10/22/2024
8.2.0-preview-01-m01 131 9/17/2024
8.1.9-preview-03 108 11/19/2024
8.1.9-preview-02 92 10/22/2024
8.1.9-preview-01 102 10/4/2024
8.1.8 134 9/23/2024
8.1.8-preview-07 114 9/12/2024
8.1.8-preview-06 120 9/11/2024
8.1.8-preview-05 111 9/10/2024
8.1.8-preview-04 127 8/16/2024
8.1.8-preview-03 132 8/13/2024
8.1.8-preview-02 127 8/13/2024
8.1.8-preview-01 140 8/12/2024
8.1.7 141 8/7/2024
8.1.7-preview-09 101 7/3/2024
8.1.7-preview-08 115 7/2/2024
8.1.7-preview-07 109 6/10/2024
8.1.7-preview-06 117 6/10/2024
8.1.7-preview-05 109 6/6/2024
8.1.7-preview-04 111 6/6/2024
8.1.7-preview-03 111 5/24/2024
8.1.7-preview-02 100 5/10/2024
8.1.7-preview-01 106 5/8/2024
8.1.6 2,278 5/7/2024
8.1.6-preview-08 85 5/2/2024
8.1.6-preview-07 128 4/29/2024
8.1.6-preview-06 131 4/26/2024
8.1.6-preview-05 158 4/24/2024
8.1.6-preview-04 112 4/22/2024
8.1.6-preview-03 113 4/22/2024
8.1.6-preview-02 132 4/17/2024
8.1.6-preview-01 211 4/15/2024
8.1.5 163 4/15/2024
8.1.5-preview-15 133 4/10/2024
8.1.5-preview-14 126 3/20/2024
8.1.5-preview-13 113 3/18/2024
8.1.5-preview-12 146 3/13/2024
8.1.5-preview-11 123 3/13/2024
8.1.5-preview-10 125 3/13/2024
8.1.5-preview-09 128 3/12/2024
8.1.5-preview-08 122 3/12/2024
8.1.5-preview-07 120 3/8/2024
8.1.5-preview-06 131 3/8/2024
8.1.5-preview-05 123 3/7/2024
8.1.5-preview-04 119 3/7/2024
8.1.5-preview-03 111 3/7/2024
8.1.5-preview-02 128 2/28/2024
8.1.5-preview-01 125 2/19/2024
8.1.4 219 2/15/2024
8.1.3 159 2/13/2024
8.1.3-preview-07 117 2/13/2024
8.1.3-preview-06 116 2/12/2024
8.1.3-preview-05 119 2/9/2024
8.1.3-preview-04 128 2/8/2024
8.1.3-preview-03 116 2/7/2024
8.1.3-preview-02 112 2/2/2024
8.1.3-preview-01 110 2/2/2024
8.1.2 160 2/1/2024
8.1.2-preview-9 123 1/22/2024
8.1.2-preview-8 113 1/19/2024
8.1.2-preview-7 121 1/19/2024
8.1.2-preview-6 112 1/19/2024
8.1.2-preview-5 111 1/19/2024
8.1.2-preview-4 128 1/19/2024
8.1.2-preview-3 123 1/18/2024
8.1.2-preview-2 108 1/18/2024
8.1.2-preview-16 114 1/31/2024
8.1.2-preview-15 119 1/31/2024
8.1.2-preview-14 116 1/25/2024
8.1.2-preview-13 111 1/25/2024
8.1.2-preview-12 106 1/23/2024
8.1.2-preview-11 106 1/23/2024
8.1.2-preview-10 110 1/22/2024
8.1.2-preview-1 105 1/18/2024
8.1.1 174 1/18/2024
8.1.0 151 1/18/2024
8.0.3 210 12/29/2023
8.0.1 183 12/14/2023
8.0.0 193 12/7/2023
6.0.4.3 177 12/29/2023
6.0.4.2 150 12/20/2023
6.0.4.1 220 12/19/2023
6.0.4 195 12/4/2023
6.0.3.20 167 11/27/2023
6.0.3.19 175 11/22/2023