From cbd5185f510343141d46005e2e651f391594c53c Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Tue, 18 Mar 2025 23:32:06 -0500 Subject: [PATCH] minor change --- .../BotSharp.Core/Instructs/Functions/ExecuteTemplateFn.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Instructs/Functions/ExecuteTemplateFn.cs b/src/Infrastructure/BotSharp.Core/Instructs/Functions/ExecuteTemplateFn.cs index 7ff892ed..8b4763f8 100644 --- a/src/Infrastructure/BotSharp.Core/Instructs/Functions/ExecuteTemplateFn.cs +++ b/src/Infrastructure/BotSharp.Core/Instructs/Functions/ExecuteTemplateFn.cs @@ -63,6 +63,11 @@ public class ExecuteTemplateFn : IFunctionCallback var hooks = _services.GetServices(); foreach (var hook in hooks) { + if (!string.IsNullOrEmpty(hook.SelfId) && hook.SelfId != agent.Id) + { + continue; + } + await hook.OnResponseGenerated(new InstructResponseModel { AgentId = agent.Id,