fix(llm): 重置 Unirest 配置以避免内存泄漏

- 在更新知识库时添加了 Unirest 配置重置操作
- 确保每次请求后都重新设置 Unirest 配置,防止潜在的内存泄漏问题
This commit is contained in:
Liuyang 2025-02-08 18:34:21 +08:00
parent e0f79f13aa
commit 87f597b690

View File

@ -72,6 +72,7 @@ public class KnowledgeBaseServiceImpl implements KnowledgeBaseService {
KnowledgeBaseDO updateObj = BeanUtils.toBean(updateReqVO, KnowledgeBaseDO.class);
knowledgeBaseMapper.updateById(updateObj);
Unirest.config().reset();
Unirest.config()
.socketTimeout(86400000)
.connectTimeout(100000)