Skip to content

Commit

Permalink
📦 Update SemanticKernel packages to 1.0.0-beta5
Browse files Browse the repository at this point in the history
Upgrade Microsoft.SemanticKernel packages from 1.0.0-beta4 to
1.0.0-beta5. Also, update the PromptChatCommand to use the new
BasicPromptTemplateFactory for creating prompt templates.
  • Loading branch information
lemillermicrosoft committed Nov 6, 2023
1 parent d864eb5 commit 4f33ade
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageVersion Include="Microsoft.ML.Tokenizers" Version="0.21.0-preview.23266.6"/>
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.0.0-beta4" />
<PackageVersion Include="Microsoft.SemanticKernel.Planners.Core" Version="1.0.0-beta4" />
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.Web" Version="1.0.0-beta4" />
<PackageVersion Include="Microsoft.SemanticKernel.Reliability.Basic" Version="1.0.0-beta4" />
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageVersion Include="Microsoft.SemanticKernel.Planners.Core" Version="1.0.0-beta5" />
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.Web" Version="1.0.0-beta5" />
<PackageVersion Include="Microsoft.SemanticKernel.Reliability.Basic" Version="1.0.0-beta5" />
<PackageVersion Include="Spectre.Console" Version="0.47.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="TextCopy" Version="6.2.1" />
Expand Down
4 changes: 3 additions & 1 deletion apps/SKonsole/Commands/PromptChatCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Microsoft.SemanticKernel.AI;
using Microsoft.SemanticKernel.Orchestration;
using Microsoft.SemanticKernel.TemplateEngine;
using Microsoft.SemanticKernel.TemplateEngine.Basic;
using SKonsole.Utils;
using Spectre.Console;

Expand Down Expand Up @@ -59,7 +60,8 @@ private static async Task RunPromptChat(CancellationToken token, ILogger logger)
}
}
);
var promptTemplate = new PromptTemplate(SkPrompt, promptConfig, kernel);
var engine = new BasicPromptTemplateFactory(kernel.LoggerFactory);
var promptTemplate = engine.Create(SkPrompt, promptConfig);
var chatFunction = kernel.RegisterSemanticFunction("PromptBot", "Chat", promptConfig, promptTemplate);
await RunChat(kernel, logger, chatFunction);
}
Expand Down

0 comments on commit 4f33ade

Please sign in to comment.