From 3ff5cd423319f67ae909ab2cf20a3bdc47a7e7bc Mon Sep 17 00:00:00 2001 From: Jicheng Lu Date: Wed, 15 Oct 2025 19:41:30 -0500 Subject: [PATCH] rename --- .../Instructs/Services/InstructService.Execute.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Instructs/Services/InstructService.Execute.cs b/src/Infrastructure/BotSharp.Core/Instructs/Services/InstructService.Execute.cs index a3db6db1..59a57c1c 100644 --- a/src/Infrastructure/BotSharp.Core/Instructs/Services/InstructService.Execute.cs +++ b/src/Infrastructure/BotSharp.Core/Instructs/Services/InstructService.Execute.cs @@ -178,10 +178,10 @@ public partial class InstructService var hooks = _services.GetHooks(agent.Id); var codeProvider = codeOptions?.Processor ?? "botsharp-py-interpreter"; - var codeInterpreter = _services.GetServices() + var codeProcessor = _services.GetServices() .FirstOrDefault(x => x.Provider.IsEqualTo(codeProvider)); - if (codeInterpreter == null) + if (codeProcessor == null) { #if DEBUG _logger.LogWarning($"No code interpreter found. (Agent: {agent.Id}, Code interpreter: {codeProvider})"); @@ -248,7 +248,7 @@ public partial class InstructService } // Run code script - var result = await codeInterpreter.RunAsync(context.CodeScript, options: new() + var codeResponse = await codeProcessor.RunAsync(context.CodeScript, options: new() { ScriptName = scriptName, Arguments = context.Arguments @@ -258,7 +258,7 @@ public partial class InstructService { MessageId = message.MessageId, Template = scriptName, - Text = result?.Result ?? result?.ErrorMsg + Text = codeResponse?.Result ?? codeResponse?.ErrorMsg }; if (context?.Arguments != null) @@ -273,7 +273,7 @@ public partial class InstructService await hook.OnResponseGenerated(new InstructResponseModel { AgentId = agent.Id, - Provider = codeInterpreter.Provider, + Provider = codeProcessor.Provider, Model = string.Empty, TemplateName = scriptName, UserMessage = message.Content,