Skip to content

Commit

Permalink
Add back in missing completion service registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Swimburger committed Sep 13, 2023
1 parent 0ec41ad commit fbc7752
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
using Microsoft.SemanticKernel.Planning;
using AssemblyAI.SemanticKernel;
using AssemblyAI.SemanticKernel.Sample;
using Microsoft.Extensions.Logging;

var config = new ConfigurationBuilder()
.AddEnvironmentVariables()
.AddUserSecrets<Program>()
.AddCommandLine(args)
.Build();

using var loggerFactory = LoggerFactory.Create(builder => { builder.SetMinimumLevel(0); });
var kernel = new KernelBuilder()
.WithCompletionService(config)
.WithLoggerFactory(loggerFactory)
.Build();

var apiKey = config["AssemblyAI:ApiKey"] ?? throw new Exception("AssemblyAI:ApiKey not configured.");
Expand Down

0 comments on commit fbc7752

Please sign in to comment.