Skip to content

Commit fda443e

Browse files
authored
Merge pull request #1203 from yileicn/master
add file_count for InstructCompletion
2 parents b8ad47e + 52dc469 commit fda443e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Infrastructure/BotSharp.OpenAPI/Controllers/InstructModeController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public async Task<InstructResult> InstructCompletion([FromRoute] string agentId,
3636
.SetState("code_options", input.CodeOptions, source: StateSource.External)
3737
.SetState("file_options", input.FileOptions, source: StateSource.External);
3838

39+
if (!input.Files.IsNullOrEmpty()) state.SetState("file_count", input.Files.Count, source: StateSource.External);
40+
3941
var instructor = _services.GetRequiredService<IInstructService>();
4042
var result = await instructor.Execute(agentId,
4143
new RoleDialogModel(AgentRole.User, input.Text),

0 commit comments

Comments
 (0)