File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
BotSharp.Abstraction/Instructs/Models
BotSharp.Core/Instructs/Services Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,6 @@ namespace BotSharp.Abstraction.Instructs.Models;
22
33public class CodeInstructContext
44{
5+ public string CodeScript { get ; set ; }
56 public List < KeyValue > Arguments { get ; set ; } = [ ] ;
67}
Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ await hook.OnResponseGenerated(new InstructResponseModel
205205
206206 var context = new CodeInstructContext
207207 {
208+ CodeScript = codeScript ,
208209 Arguments = arguments
209210 } ;
210211
@@ -225,7 +226,7 @@ await hook.OnResponseGenerated(new InstructResponseModel
225226 }
226227
227228 // Run code script
228- var result = await codeInterpreter . RunCode ( codeScript , options : new ( )
229+ var result = await codeInterpreter . RunCode ( context . CodeScript , options : new ( )
229230 {
230231 Arguments = context . Arguments
231232 } ) ;
You can’t perform that action at this time.
0 commit comments