@@ -24,6 +24,7 @@ public async Task<InstructResult> InstructCompletion([FromRoute] string agentId,
2424 {
2525 var state = _services . GetRequiredService < IConversationStateService > ( ) ;
2626 input . States . ForEach ( x => state . SetState ( x . Key , x . Value , activeRounds : x . ActiveRounds , source : StateSource . External ) ) ;
27+
2728 state . SetState ( "provider" , input . Provider , source : StateSource . External )
2829 . SetState ( "model" , input . Model , source : StateSource . External )
2930 . SetState ( "model_id" , input . ModelId , source : StateSource . External )
@@ -33,7 +34,8 @@ public async Task<InstructResult> InstructCompletion([FromRoute] string agentId,
3334 . SetState ( "channel" , input . Channel , source : StateSource . External )
3435 . SetState ( "code_options" , input . CodeOptions , source : StateSource . External )
3536 . SetState ( "file_options" , input . FileOptions , source : StateSource . External )
36- . SetState ( "file_count" , ! input . Files . IsNullOrEmpty ( ) ? input . Files . Count : ( int ? ) null , source : StateSource . External ) ;
37+ . SetState ( "file_count" , input . Files ? . Count , source : StateSource . External )
38+ . SetState ( "file_urls" , input . Files ? . Select ( p => p . ToString ( ) ) , source : StateSource . External ) ;
3739
3840 var instructor = _services . GetRequiredService < IInstructService > ( ) ;
3941 var result = await instructor . Execute ( agentId ,
0 commit comments