refactor(yudao-module-llm): 修复知识文档匹配率查询逻辑
- 将 rightPushIfPresent 方法替换为 rightPush 方法,确保段落匹配率信息总是被添加到 Redis 列表中 - 优化了知识文档匹配率的查询流程,提高了数据的准确性和可靠性
This commit is contained in:
parent
1138058d74
commit
768c67f898
@ -523,7 +523,7 @@ public class ConversationServiceImpl implements ConversationService {
|
||||
|
||||
// 请求结果添加到 Redis,查询段落命中率
|
||||
String redisKey = String.format("%s:%s", KNOWLEDGE_DOCUMENTS_REDIS_KEY, chatReqVO.getUuid());
|
||||
stringRedisTemplate.opsForList().rightPushIfPresent(redisKey, JSON.toJSONString(paragraphHitRateListVO));
|
||||
stringRedisTemplate.opsForList().rightPush(redisKey, JSON.toJSONString(paragraphHitRateListVO));
|
||||
|
||||
List<String> paragraphHitRateList = stringRedisTemplate.opsForList().range(redisKey, 0, -1);
|
||||
if (paragraphHitRateList != null && !paragraphHitRateList.isEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user