From 6a87a035bcd2dce1786ac05fc0a95bfd0ad8ec03 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 22 Mar 2024 22:09:43 -0500 Subject: [PATCH] #TEMPLATE# --- .../BotSharp.Core/Instructs/InstructService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Instructs/InstructService.cs b/src/Infrastructure/BotSharp.Core/Instructs/InstructService.cs index d8a9a1bb..50bd83f1 100644 --- a/src/Infrastructure/BotSharp.Core/Instructs/InstructService.cs +++ b/src/Infrastructure/BotSharp.Core/Instructs/InstructService.cs @@ -79,6 +79,12 @@ public partial class InstructService : IInstructService } else if (completer is IChatCompletion chatCompleter) { + if (instruction == "#TEMPLATE#") + { + instruction = prompt; + prompt = message.Content; + } + var result = await chatCompleter.GetChatCompletions(new Agent { Id = agentId,