Skip to content

Commit 9c7eee5

Browse files
author
Jicheng Lu
committed
fix typo
1 parent a75c0a0 commit 9c7eee5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.SelectFile.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ private async Task<IEnumerable<MessageFileModel>> SelectFiles(IEnumerable<Messag
8080
{
8181
return res;
8282
}
83+
else if (files.Count() == 1)
84+
{
85+
return files;
86+
}
8387

8488
var agentService = _services.GetRequiredService<IAgentService>();
8589
var llmProviderService = _services.GetRequiredService<ILlmProviderService>();
@@ -115,7 +119,7 @@ private async Task<IEnumerable<MessageFileModel>> SelectFiles(IEnumerable<Messag
115119
}).ToList();
116120

117121
var agentId = !string.IsNullOrWhiteSpace(options.AgentId) ? options.AgentId : BuiltInAgentId.FileAssistant;
118-
var template = !string.IsNullOrWhiteSpace(options.Template) ? options.Template : "select_chat_file_instruction";
122+
var template = !string.IsNullOrWhiteSpace(options.Template) ? options.Template : "select-chat-file_instruction";
119123
var prompt = db.GetAgentTemplate(agentId, template);
120124

121125
var data = new Dictionary<string, object>

0 commit comments

Comments
 (0)