#r "nuget: Microsoft.SemanticKernel, 1.23.0" using Microsoft.SemanticKernel; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.DependencyInjection; using Kernel = Microsoft.SemanticKernel.Kernel; // Inject your logger // see Microsoft.Extensions.Logging.ILogger @ https://learn.microsoft.com/dotnet/core/extensions/logging ILoggerFactory myLoggerFactory = NullLoggerFactory.Instance; var builder = Kernel.CreateBuilder(); builder.Services.AddSingleton(myLoggerFactory); var kernel = builder.Build(); Kernel.CreateBuilder() .AddAzureOpenAIChatCompletion( "my-finetuned-model", // Azure OpenAI *Deployment Name* "https://contoso.openai.azure.com/", // Azure OpenAI *Endpoint* "...your Azure OpenAI Key...", // Azure OpenAI *Key* serviceId: "Azure_curie" // alias used in the prompt templates' config.json ) .AddOpenAIChatCompletion( "gpt-4o-mini", // OpenAI Model Name "...your OpenAI API Key...", // OpenAI API key "...your OpenAI Org ID...", // *optional* OpenAI Organization ID serviceId: "OpenAI_davinci" // alias used in the prompt templates' config.json );