Skip to content

Commit 38fe2f0

Browse files
.Net: Merge BasicPromptTemplateFactory to ms.sk.core (microsoft#3518)
### Motivation and Context <!-- Thank you for your contribution to the semantic-kernel repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
1 parent ace7a70 commit 38fe2f0

File tree

53 files changed

+113
-302
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+113
-302
lines changed

dotnet/SK-dotnet.sln

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationInsightsExample"
139139
EndProject
140140
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Connectors.Memory.Kusto", "src\Connectors\Connectors.Memory.Kusto\Connectors.Memory.Kusto.csproj", "{E07608CC-D710-4655-BB9E-D22CF3CDD193}"
141141
EndProject
142-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TemplateEngine.Basic", "src\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj", "{10E4B697-D4E8-468D-872D-49670FD150FB}"
143-
EndProject
144142
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reliability.Polly", "src\Extensions\Reliability.Polly\Reliability.Polly.csproj", "{D4540A0F-98E3-4E70-9093-1948AE5B2AAD}"
145143
EndProject
146144
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reliability.Basic", "src\Extensions\Reliability.Basic\Reliability.Basic.csproj", "{3DC4DBD8-20A5-4937-B4F5-BB5E24E7A567}"
@@ -355,12 +353,6 @@ Global
355353
{E07608CC-D710-4655-BB9E-D22CF3CDD193}.Publish|Any CPU.Build.0 = Publish|Any CPU
356354
{E07608CC-D710-4655-BB9E-D22CF3CDD193}.Release|Any CPU.ActiveCfg = Release|Any CPU
357355
{E07608CC-D710-4655-BB9E-D22CF3CDD193}.Release|Any CPU.Build.0 = Release|Any CPU
358-
{10E4B697-D4E8-468D-872D-49670FD150FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
359-
{10E4B697-D4E8-468D-872D-49670FD150FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
360-
{10E4B697-D4E8-468D-872D-49670FD150FB}.Publish|Any CPU.ActiveCfg = Publish|Any CPU
361-
{10E4B697-D4E8-468D-872D-49670FD150FB}.Publish|Any CPU.Build.0 = Publish|Any CPU
362-
{10E4B697-D4E8-468D-872D-49670FD150FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
363-
{10E4B697-D4E8-468D-872D-49670FD150FB}.Release|Any CPU.Build.0 = Release|Any CPU
364356
{D4540A0F-98E3-4E70-9093-1948AE5B2AAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
365357
{D4540A0F-98E3-4E70-9093-1948AE5B2AAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
366358
{D4540A0F-98E3-4E70-9093-1948AE5B2AAD}.Publish|Any CPU.ActiveCfg = Publish|Any CPU
@@ -497,7 +489,6 @@ Global
497489
{E6EDAB8F-3406-4DBF-9AAB-DF40DC2CA0FA} = {FA3720F1-C99A-49B2-9577-A940257098BF}
498490
{C754950A-E16C-4F96-9CC7-9328E361B5AF} = {FA3720F1-C99A-49B2-9577-A940257098BF}
499491
{E07608CC-D710-4655-BB9E-D22CF3CDD193} = {0247C2C9-86C3-45BA-8873-28B0948EDC0C}
500-
{10E4B697-D4E8-468D-872D-49670FD150FB} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633}
501492
{D4540A0F-98E3-4E70-9093-1948AE5B2AAD} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633}
502493
{3DC4DBD8-20A5-4937-B4F5-BB5E24E7A567} = {078F96B4-09E1-4E0E-B214-F71A4F4BF633}
503494
{D6D598DF-C17C-46F4-B2B9-CDE82E2DE132} = {831DDCA2-7D2C-4C31-80DB-6BDB3E1F7AE0}

dotnet/notebooks/03-semantic-function-inline.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
"using Microsoft.SemanticKernel;\n",
5959
"using Microsoft.SemanticKernel.Connectors.AI.OpenAI;\n",
6060
"using Microsoft.SemanticKernel.TemplateEngine;\n",
61-
"using Microsoft.SemanticKernel.TemplateEngine.Basic;\n",
6261
"\n",
6362
"var builder = new KernelBuilder();\n",
6463
"\n",

dotnet/notebooks/04-context-variables-chat.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"\n",
4040
"using Microsoft.SemanticKernel;\n",
4141
"using Microsoft.SemanticKernel.TemplateEngine;\n",
42-
"using Microsoft.SemanticKernel.TemplateEngine.Basic;\n",
4342
"using Microsoft.SemanticKernel.Orchestration;\n",
4443
"using Microsoft.SemanticKernel.Connectors.AI.OpenAI;\n",
4544
"\n",

dotnet/samples/ApplicationInsightsExample/ApplicationInsightsExample.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<ItemGroup>
2222
<ProjectReference Include="..\..\src\Connectors\Connectors.AI.OpenAI\Connectors.AI.OpenAI.csproj" />
2323
<ProjectReference Include="..\..\src\SemanticKernel.Core\SemanticKernel.Core.csproj" />
24-
<ProjectReference Include="..\..\src\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
2524
<ProjectReference Include="..\..\src\Planners\Planners.Core\Planners.Core.csproj" />
2625
<ProjectReference Include="..\..\src\Plugins\Plugins.Core\Plugins.Core.csproj" />
2726
<ProjectReference Include="..\..\src\Plugins\Plugins.Web\Plugins.Web.csproj" />

dotnet/samples/KernelSyntaxExamples/Example06_TemplateLanguage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using Microsoft.SemanticKernel.Connectors.AI.OpenAI;
77
using Microsoft.SemanticKernel.Plugins.Core;
88
using Microsoft.SemanticKernel.TemplateEngine;
9-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
109
using RepoUtils;
1110

1211
// ReSharper disable once InconsistentNaming
@@ -52,7 +51,7 @@ Is it weekend time (weekend/not weekend)?
5251

5352
// This allows to see the prompt before it's sent to OpenAI
5453
Console.WriteLine("--- Rendered Prompt");
55-
var promptTemplateFactory = new BasicPromptTemplateFactory();
54+
var promptTemplateFactory = new KernelPromptTemplateFactory();
5655
var promptTemplate = promptTemplateFactory.Create(FunctionDefinition, new PromptTemplateConfig());
5756
var renderedPrompt = await promptTemplate.RenderAsync(kernel.CreateNewContext());
5857
Console.WriteLine(renderedPrompt);

dotnet/samples/KernelSyntaxExamples/Example07_BingAndGooglePlugins.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Microsoft.SemanticKernel.Plugins.Web.Bing;
99
using Microsoft.SemanticKernel.Plugins.Web.Google;
1010
using Microsoft.SemanticKernel.TemplateEngine;
11-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
1211
using RepoUtils;
1312

1413
/// <summary>
@@ -150,7 +149,7 @@ [END OF EXAMPLES]
150149
// If the answer contains commands, execute them using the prompt renderer.
151150
if (result.Contains("bing.search", StringComparison.OrdinalIgnoreCase))
152151
{
153-
var promptTemplateFactory = new BasicPromptTemplateFactory();
152+
var promptTemplateFactory = new KernelPromptTemplateFactory();
154153
var promptTemplate = promptTemplateFactory.Create(result, new PromptTemplateConfig());
155154

156155
Console.WriteLine("---- Fetching information from Bing...");

dotnet/samples/KernelSyntaxExamples/Example30_ChatWithPrompts.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Microsoft.SemanticKernel.AI.ChatCompletion;
88
using Microsoft.SemanticKernel.Plugins.Core;
99
using Microsoft.SemanticKernel.TemplateEngine;
10-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
1110
using RepoUtils;
1211
using Resources;
1312

@@ -41,7 +40,7 @@
4140
* var context = kernel.CreateNewContext();
4241
* ... set variables ...
4342
*
44-
* var promptRenderer = new BasicPromptTemplateEngine();
43+
* var promptRenderer = new KernelPromptTemplateEngine();
4544
* string renderedPrompt = await promptRenderer.RenderAsync("...prompt template...", context);
4645
*/
4746
// ReSharper disable CommentTypo
@@ -87,7 +86,7 @@ public static async Task RunAsync()
8786
// Instantiate the prompt template factory, which we will use to turn prompt templates
8887
// into strings, that we will store into a Chat history object, which is then sent
8988
// to the Chat Model.
90-
var promptTemplateFactory = new BasicPromptTemplateFactory();
89+
var promptTemplateFactory = new KernelPromptTemplateFactory();
9190

9291
// Render the system prompt. This string is used to configure the chat.
9392
// This contains the context, ie a piece of a wikipedia page selected by the user.

dotnet/samples/KernelSyntaxExamples/Example56_TemplateNativeFunctionsWithMultipleArguments.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using Microsoft.SemanticKernel.Connectors.AI.OpenAI;
77
using Microsoft.SemanticKernel.Plugins.Core;
88
using Microsoft.SemanticKernel.TemplateEngine;
9-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
109
using RepoUtils;
1110

1211
// ReSharper disable once InconsistentNaming
@@ -56,7 +55,7 @@ public static async Task RunAsync()
5655

5756
// This allows to see the prompt before it's sent to OpenAI
5857
Console.WriteLine("--- Rendered Prompt");
59-
var promptTemplateFactory = new BasicPromptTemplateFactory();
58+
var promptTemplateFactory = new KernelPromptTemplateFactory();
6059
var promptTemplate = promptTemplateFactory.Create(FunctionDefinition, new PromptTemplateConfig());
6160
var renderedPrompt = await promptTemplate.RenderAsync(context);
6261
Console.WriteLine(renderedPrompt);

dotnet/samples/KernelSyntaxExamples/Example64_MultiplePromptTemplates.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using Microsoft.SemanticKernel;
66
using Microsoft.SemanticKernel.Orchestration;
77
using Microsoft.SemanticKernel.TemplateEngine;
8-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
98
using Microsoft.SemanticKernel.TemplateEngine.Handlebars;
109
using RepoUtils;
1110

@@ -42,7 +41,7 @@ public static async Task RunAsync()
4241
.Build();
4342

4443
var promptTemplateFactory = new AggregatorPromptTemplateFactory(
45-
new BasicPromptTemplateFactory(),
44+
new KernelPromptTemplateFactory(),
4645
new HandlebarsPromptTemplateFactory());
4746

4847
var skPrompt = "Hello AI, my name is {{$name}}. What is the origin of my name?";

dotnet/samples/KernelSyntaxExamples/KernelSyntaxExamples.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
<ProjectReference Include="..\..\src\Experimental\Assistants\Experimental.Assistants.csproj" />
4646
<ProjectReference Include="..\..\src\Experimental\Orchestration.Flow\Experimental.Orchestration.Flow.csproj" />
4747
<ProjectReference Include="..\..\src\Extensions\Reliability.Basic\Reliability.Basic.csproj" />
48-
<ProjectReference Include="..\..\src\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
4948
<ProjectReference Include="..\..\src\Extensions\Reliability.Polly\Reliability.Polly.csproj" />
5049
<ProjectReference Include="..\..\src\Extensions\TemplateEngine.Handlebars\TemplateEngine.Handlebars.csproj" />
5150
<ProjectReference Include="..\..\src\Planners\Planners.OpenAI\Planners.OpenAI.csproj" />

dotnet/src/Experimental/Orchestration.Flow.IntegrationTests/Experimental.Orchestration.Flow.IntegrationTests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
<ItemGroup>
3434
<ProjectReference Include="..\..\Connectors\Connectors.AI.OpenAI\Connectors.AI.OpenAI.csproj" />
3535
<ProjectReference Include="..\..\Extensions\Reliability.Basic\Reliability.Basic.csproj" />
36-
<ProjectReference Include="..\..\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
3736
<ProjectReference Include="..\..\Plugins\Plugins.Memory\Plugins.Memory.csproj" />
3837
<ProjectReference Include="..\..\Plugins\Plugins.Web\Plugins.Web.csproj" />
3938
<ProjectReference Include="..\Orchestration.Flow\Experimental.Orchestration.Flow.csproj" />

dotnet/src/Experimental/Orchestration.Flow/Execution/FlowExecutor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using Microsoft.SemanticKernel.Experimental.Orchestration.Abstractions;
1313
using Microsoft.SemanticKernel.Orchestration;
1414
using Microsoft.SemanticKernel.TemplateEngine;
15-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
1615

1716
namespace Microsoft.SemanticKernel.Experimental.Orchestration.Execution;
1817

@@ -684,7 +683,7 @@ private async Task<ContextVariables> ExecuteStepAsync(FlowStep step, string sess
684683

685684
private ISKFunction ImportSemanticFunction(IKernel kernel, string functionName, string promptTemplate, PromptTemplateConfig config)
686685
{
687-
var factory = new BasicPromptTemplateFactory(kernel.LoggerFactory);
686+
var factory = new KernelPromptTemplateFactory(kernel.LoggerFactory);
688687
var template = factory.Create(promptTemplate, config);
689688

690689
return kernel.RegisterSemanticFunction(RestrictedPluginName, functionName, config, template);

dotnet/src/Experimental/Orchestration.Flow/Execution/ReActEngine.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using Microsoft.SemanticKernel.AI.ChatCompletion;
1111
using Microsoft.SemanticKernel.Orchestration;
1212
using Microsoft.SemanticKernel.TemplateEngine;
13-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
1413

1514
namespace Microsoft.SemanticKernel.Experimental.Orchestration.Execution;
1615

@@ -235,7 +234,7 @@ private SKContext CreateActionContext(Dictionary<string, string> actionVariables
235234

236235
private ISKFunction ImportSemanticFunction(IKernel kernel, string functionName, string promptTemplate, PromptTemplateConfig config)
237236
{
238-
var factory = new BasicPromptTemplateFactory(kernel.LoggerFactory);
237+
var factory = new KernelPromptTemplateFactory(kernel.LoggerFactory);
239238
var template = factory.Create(promptTemplate, config);
240239

241240
return kernel.RegisterSemanticFunction(RestrictedPluginName, functionName, config, template);

dotnet/src/Experimental/Orchestration.Flow/Experimental.Orchestration.Flow.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<PackageReference Include="YamlDotNet" />
2727
</ItemGroup>
2828
<ItemGroup>
29-
<ProjectReference Include="..\..\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
3029
<ProjectReference Include="..\..\SemanticKernel.Abstractions\SemanticKernel.Abstractions.csproj" />
3130
<ProjectReference Include="..\..\SemanticKernel.Core\SemanticKernel.Core.csproj" />
3231
</ItemGroup>

dotnet/src/Extensions/Extensions.UnitTests/Extensions.UnitTests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
</ItemGroup>
2727
<ItemGroup>
2828
<ProjectReference Include="..\Reliability.Basic\Reliability.Basic.csproj" />
29-
<ProjectReference Include="..\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
3029
<ProjectReference Include="..\Reliability.Polly\Reliability.Polly.csproj" />
3130
<ProjectReference Include="..\TemplateEngine.Handlebars\TemplateEngine.Handlebars.csproj" />
3231
</ItemGroup>

dotnet/src/Extensions/TemplateEngine.Basic/Extensions/KernelBasicPromptTemplateExtensions.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.

dotnet/src/Extensions/TemplateEngine.Basic/TemplateEngine.Basic.csproj

Lines changed: 0 additions & 25 deletions
This file was deleted.

dotnet/src/IntegrationTests/Connectors/OpenAI/OpenAICompletionTests.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using Microsoft.SemanticKernel.Orchestration;
1313
using Microsoft.SemanticKernel.Reliability.Basic;
1414
using Microsoft.SemanticKernel.TemplateEngine;
15-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
1615
using SemanticKernel.IntegrationTests.TestSettings;
1716
using Xunit;
1817
using Xunit.Abstractions;
@@ -340,7 +339,7 @@ public async Task MultipleServiceLoadPromptConfigTestAsync()
340339
{
341340
// Arrange
342341
var builder = this._kernelBuilder.WithLoggerFactory(this._logger);
343-
var promptTemplateFactory = new BasicPromptTemplateFactory();
342+
var promptTemplateFactory = new KernelPromptTemplateFactory();
344343
this.ConfigureAzureOpenAI(builder);
345344
this.ConfigureInvalidAzureOpenAI(builder);
346345

dotnet/src/IntegrationTests/IntegrationTests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<ProjectReference Include="..\Connectors\Connectors.Memory.Postgres\Connectors.Memory.Postgres.csproj" />
4040
<ProjectReference Include="..\Connectors\Connectors.Memory.Weaviate\Connectors.Memory.Weaviate.csproj" />
4141
<ProjectReference Include="..\Extensions\Reliability.Basic\Reliability.Basic.csproj" />
42-
<ProjectReference Include="..\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
4342
<ProjectReference Include="..\Extensions\Reliability.Polly\Reliability.Polly.csproj" />
4443
<ProjectReference Include="..\Planners\Planners.OpenAI\Planners.OpenAI.csproj" />
4544
<ProjectReference Include="..\Plugins\Plugins.Core\Plugins.Core.csproj" />

dotnet/src/IntegrationTests/TemplateLanguage/PromptTemplateEngineTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Threading.Tasks;
88
using Microsoft.SemanticKernel;
99
using Microsoft.SemanticKernel.Diagnostics;
10-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
10+
using Microsoft.SemanticKernel.TemplateEngine;
1111
using Xunit;
1212
using Xunit.Abstractions;
1313

@@ -23,7 +23,7 @@ public sealed class PromptTemplateEngineTests : IDisposable
2323
public PromptTemplateEngineTests(ITestOutputHelper output)
2424
{
2525
this._logger = new RedirectOutput(output);
26-
this._target = new BasicPromptTemplateEngine();
26+
this._target = new KernelPromptTemplateEngine();
2727
}
2828

2929
[Fact]
@@ -208,7 +208,7 @@ public string MyFunction3(string name, DateTime birthdate, string exclamation)
208208
#region internals
209209

210210
private readonly RedirectOutput _logger;
211-
private readonly BasicPromptTemplateEngine _target;
211+
private readonly KernelPromptTemplateEngine _target;
212212

213213
private static IEnumerable<string[]> GetTestData(string file)
214214
{

dotnet/src/Planners/Planners.Core/Planners.Core.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
<ItemGroup>
6464
<ProjectReference Include="..\..\SemanticKernel.Abstractions\SemanticKernel.Abstractions.csproj" />
6565
<ProjectReference Include="..\..\SemanticKernel.Core\SemanticKernel.Core.csproj" />
66-
<ProjectReference Include="..\..\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
6766
</ItemGroup>
6867

6968
<ItemGroup>

dotnet/src/Planners/Planners.Core/Stepwise/StepwisePlanner.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using Microsoft.SemanticKernel.Planning;
1919
using Microsoft.SemanticKernel.Services;
2020
using Microsoft.SemanticKernel.TemplateEngine;
21-
using Microsoft.SemanticKernel.TemplateEngine.Basic;
2221

2322
#pragma warning disable IDE0130
2423
// ReSharper disable once CheckNamespace - Using NS of Plan
@@ -61,7 +60,7 @@ public StepwisePlanner(
6160
this._promptConfig.SetMaxTokens(this.Config.MaxCompletionTokens);
6261

6362
// Initialize prompt renderer
64-
this._promptTemplateFactory = new BasicPromptTemplateFactory(this._kernel.LoggerFactory);
63+
this._promptTemplateFactory = new KernelPromptTemplateFactory(this._kernel.LoggerFactory);
6564

6665
// Import native functions
6766
this._nativeFunctions = this._kernel.ImportFunctions(this, RestrictedPluginName);
@@ -651,7 +650,7 @@ private static void AddExecutionStatsToContext(List<SystemStep> stepsTaken, SKCo
651650
/// <summary>
652651
/// The prompt renderer to use for the system step
653652
/// </summary>
654-
private readonly BasicPromptTemplateFactory _promptTemplateFactory;
653+
private readonly KernelPromptTemplateFactory _promptTemplateFactory;
655654

656655
/// <summary>
657656
/// The prompt config to use for the system step

dotnet/src/Planners/Planners.OpenAI/Planners.OpenAI.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<ProjectReference Include="..\..\Functions\Functions.OpenAPI\Functions.OpenAPI.csproj" />
3131
<ProjectReference Include="..\..\SemanticKernel.Abstractions\SemanticKernel.Abstractions.csproj" />
3232
<ProjectReference Include="..\..\SemanticKernel.Core\SemanticKernel.Core.csproj" />
33-
<ProjectReference Include="..\..\Extensions\TemplateEngine.Basic\TemplateEngine.Basic.csproj" />
3433
<ProjectReference Include="..\Planners.Core\Planners.Core.csproj" />
3534
</ItemGroup>
3635
</Project>

0 commit comments

Comments
 (0)