File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Infrastructure/BotSharp.Core/Instructs/Services Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,11 @@ await hook.OnResponseGenerated(new InstructResponseModel
238238 Text = result ? . Result ? . ToString ( )
239239 } ;
240240
241+ if ( context ? . Arguments != null )
242+ {
243+ context . Arguments . ForEach ( x => state . SetState ( x . Key , x . Value , source : StateSource . External ) ) ;
244+ }
245+
241246 // After code execution
242247 foreach ( var hook in hooks )
243248 {
@@ -249,7 +254,7 @@ await hook.OnResponseGenerated(new InstructResponseModel
249254 Model = string . Empty ,
250255 TemplateName = scriptName ,
251256 UserMessage = message . Content ,
252- SystemInstruction = string . Empty ,
257+ SystemInstruction = context ? . CodeScript ,
253258 CompletionText = response . Text
254259 } ) ;
255260 }
You can’t perform that action at this time.
0 commit comments