Encamina.Enmarcha.AI.OpenAI.Azure 8.1.8-preview-05

This is a prerelease version of Encamina.Enmarcha.AI.OpenAI.Azure.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Encamina.Enmarcha.AI.OpenAI.Azure --version 8.1.8-preview-05
                    
NuGet\Install-Package Encamina.Enmarcha.AI.OpenAI.Azure -Version 8.1.8-preview-05
                    
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.OpenAI.Azure" Version="8.1.8-preview-05" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Encamina.Enmarcha.AI.OpenAI.Azure" Version="8.1.8-preview-05" />
                    
Directory.Packages.props
<PackageReference Include="Encamina.Enmarcha.AI.OpenAI.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.OpenAI.Azure --version 8.1.8-preview-05
                    
#r "nuget: Encamina.Enmarcha.AI.OpenAI.Azure, 8.1.8-preview-05"
                    
#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.OpenAI.Azure@8.1.8-preview-05
                    
#: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.OpenAI.Azure&version=8.1.8-preview-05&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Encamina.Enmarcha.AI.OpenAI.Azure&version=8.1.8-preview-05&prerelease
                    
Install as a Cake Tool

AI - Azure OpenAI

Nuget package

This project focuses on making it easier to use Azure OpenAI services to utilize the completion service.

Setup

Nuget package

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

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

.NET CLI:

First, install .NET CLI. Then, install Encamina.Enmarcha.AI.OpenAI.Azure from the .NET CLI:

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

How to use

First, you need to add the CompletionServiceOptions to your project configuration. You can achieve this by using any configuration provider. The followng code is an example of how the settings would appear using the appsettings.json file:

  {
    // ...
    "CompletionServiceOptions": {
        "DeploymentName": "<YOUR-COMPLETION-MODEL-NAME>", // Name of the deployed model to use with this completion service
        "Name": "completion-service-test", // Name of this completion service
        "EndpointUrl": "<YOUR-AZURE-OPEN-AI-ENDPOINT>", // /Azure OpenAI endpoint's url
        "KeyCredential": "<YOUR-AZURE-API-KEY>" // Azure OpenAI (security) key
    }
    // ...
  }

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.AddAzureOpenAICompletionService(builder.Configuration);

The AddAzureOpenAICompletionService extension method will add the default implementation of the ICompletionService interface as Transient. The default implementation is CompletionService. With this, we can resolve the ICompletionService with construction injection.

public class MyClass
{
    private readonly ICompletionService completionService;

    public MyClass(ICompletionService completionService)
    {
        this.completionService = completionService;
    }

    public async Task TestCompletionAsync()
    {
        var completionResult = await completionService.CompleteAsync(new CompletionRequest()
        {
            DoEcho = null,
            BestOf = null,
            Prompts = new List<string> { "Console.WriteL" },
            StopSequences = Enumerable.Empty<string>(),
            NumberOfCompletionsPerPrompt = 1,
            Temperature = 0,
            MaxTokens = 20
        }, CancellationToken.None);

        var firstResult = completionResult.Completitions.First().Text;
    }
}

Within firstResult, you will find texts that say something like Ine("Hello World");.

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 (3)

Showing the top 3 NuGet packages that depend on Encamina.Enmarcha.AI.OpenAI.Azure:

Package Downloads
Encamina.Enmarcha.SemanticKernel.Plugins.Chat

Package Description

Encamina.Enmarcha.SemanticKernel.Connectors.Memory

Package Description

Encamina.Enmarcha.SemanticKernel.Plugins.QuestionAnswering

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0-preview-03 141 9/16/2025
10.0.0-preview-02 142 9/16/2025
8.3.0 251 9/10/2025
8.3.0-preview-02 154 9/10/2025
8.3.0-preview-01 180 9/8/2025
8.2.1-preview-08 129 8/18/2025
8.2.1-preview-07 137 8/12/2025
8.2.1-preview-06 124 8/11/2025
8.2.1-preview-05 219 8/5/2025
8.2.1-preview-04 230 7/15/2025
8.2.1-preview-03 166 7/14/2025
8.2.1-preview-02 138 7/3/2025
8.2.1-preview-01 2,672 3/23/2025
8.2.0 2,803 10/22/2024
8.2.0-preview-01-m01 124 9/17/2024
8.1.9-preview-03 88 11/19/2024
8.1.9-preview-02 97 10/22/2024
8.1.9-preview-01 406 10/4/2024
8.1.8 1,122 9/23/2024
8.1.8-preview-07 1,323 9/12/2024
8.1.8-preview-06 308 9/11/2024
8.1.8-preview-05 109 9/10/2024
8.1.8-preview-04 542 8/16/2024
8.1.8-preview-03 213 8/13/2024
8.1.8-preview-02 113 8/13/2024
8.1.8-preview-01 128 8/12/2024
8.1.7 141 8/7/2024
8.1.7-preview-09 241 7/3/2024
8.1.7-preview-08 113 7/2/2024
8.1.7-preview-07 111 6/10/2024
8.1.7-preview-06 102 6/10/2024
8.1.7-preview-05 129 6/6/2024
8.1.7-preview-04 107 6/6/2024
8.1.7-preview-03 114 5/24/2024
8.1.7-preview-02 113 5/10/2024
8.1.7-preview-01 135 5/8/2024
8.1.6 2,400 5/7/2024
8.1.6-preview-08 93 5/2/2024
8.1.6-preview-07 101 4/29/2024
8.1.6-preview-06 701 4/26/2024
8.1.6-preview-05 111 4/24/2024
8.1.6-preview-04 151 4/22/2024
8.1.6-preview-03 109 4/22/2024
8.1.6-preview-02 191 4/17/2024
8.1.6-preview-01 210 4/15/2024
8.1.5 160 4/15/2024
8.1.5-preview-15 127 4/10/2024
8.1.5-preview-14 147 3/20/2024
8.1.5-preview-13 96 3/18/2024
8.1.5-preview-12 130 3/13/2024
8.1.5-preview-11 110 3/13/2024
8.1.5-preview-10 143 3/13/2024
8.1.5-preview-09 111 3/12/2024
8.1.5-preview-08 102 3/12/2024
8.1.5-preview-07 115 3/8/2024
8.1.5-preview-06 418 3/8/2024
8.1.5-preview-05 115 3/7/2024
8.1.5-preview-04 113 3/7/2024
8.1.5-preview-03 107 3/7/2024
8.1.5-preview-02 251 2/28/2024
8.1.5-preview-01 210 2/19/2024
8.1.4 366 2/15/2024
8.1.3 155 2/13/2024
8.1.3-preview-07 96 2/13/2024
8.1.3-preview-06 117 2/12/2024
8.1.3-preview-05 130 2/9/2024
8.1.3-preview-04 113 2/8/2024
8.1.3-preview-03 104 2/7/2024
8.1.3-preview-02 117 2/2/2024
8.1.3-preview-01 113 2/2/2024
8.1.2 185 2/1/2024
8.1.2-preview-9 120 1/22/2024
8.1.2-preview-8 112 1/19/2024
8.1.2-preview-7 106 1/19/2024
8.1.2-preview-6 105 1/19/2024
8.1.2-preview-5 114 1/19/2024
8.1.2-preview-4 103 1/19/2024
8.1.2-preview-3 105 1/18/2024
8.1.2-preview-2 119 1/18/2024
8.1.2-preview-16 111 1/31/2024
8.1.2-preview-15 109 1/31/2024
8.1.2-preview-14 254 1/25/2024
8.1.2-preview-13 115 1/25/2024
8.1.2-preview-12 112 1/23/2024
8.1.2-preview-11 109 1/23/2024
8.1.2-preview-10 110 1/22/2024
8.1.2-preview-1 105 1/18/2024
8.1.1 173 1/18/2024
8.1.0 135 1/18/2024
8.0.3 155 12/29/2023
8.0.1 133 12/14/2023
8.0.0 115 12/7/2023
6.0.4.3 122 12/29/2023
6.0.4.2 108 12/20/2023
6.0.4.1 115 12/19/2023
6.0.4 107 12/4/2023
6.0.3.20 109 11/27/2023
6.0.3.19 112 11/22/2023