Commit c577eac5 authored by alex yao's avatar alex yao

feat: 构建知识库提示词优化结构

parent 27159d48
......@@ -574,7 +574,7 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
StringBuilder knowledgeResultsBuilder = new StringBuilder();
if (CollectionUtils.isNotEmpty(knowledgeResults)) {
for (int i = 1; i <= knowledgeResults.size(); i++) {
knowledgeResultsBuilder.append("## Chunk ").append(i).append(":").append(StringUtils.LF).append(knowledgeResults.get(i - 1)).append(StringUtils.LF);
knowledgeResultsBuilder.append("### Chunk ").append(i).append(":").append(StringUtils.LF).append(knowledgeResults.get(i - 1)).append(StringUtils.LF);
}
}
promptTemplate = promptTemplate.replace("${knowledgeResults}", knowledgeResultsBuilder.toString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment