refactor(yudao-module-llm): 优化知识库服务实现和 HTTP 服务逻辑

-移除了 KnowledgeBaseServiceImpl 中的多余空行
- 删除了 RagHttpService 中的冗余代码,包括不必要的变量赋值和日志记录
This commit is contained in:
Liuyang 2025-02-12 10:46:44 +08:00
parent f889a78295
commit 7b19c298ee
2 changed files with 1 additions and 4 deletions

View File

@ -246,12 +246,10 @@ public class RagHttpService {
if (jsonObject.getBoolean("status")) {
log.info(" ========= Response Body Result: {}", response.getBody());
aDo.setKnowledgeBaseIntro("11-- success: " + ragEmbed);
knowledgeBaseMapper.updateById(aDo);
throw exception(new ErrorCode(10047, " ------------ 知识库上传成功"));
} else {
aDo.setKnowledgeBaseIntro("11-- error: " + ragEmbed);
knowledgeBaseMapper.updateById(aDo);
throw exception(new ErrorCode(10047, " xxxxxxxxxxxx 知识库上传失败"));
}

View File

@ -77,8 +77,7 @@ public class KnowledgeBaseServiceImpl implements KnowledgeBaseService {
.socketTimeout(86400000)
.connectTimeout(100000)
.concurrency(10, 5)
.setDefaultHeader("Accept", "application/json")
;
.setDefaultHeader("Accept", "application/json");
// 4. 处理附表知识文档数据
if (!CollectionUtils.isAnyEmpty(updateReqVO.getKnowledgeDocuments())) {