|
|
@@ -38,9 +38,11 @@ import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
import java.time.Duration;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Managed
|
|
|
@Slf4j
|
|
|
@@ -268,6 +270,8 @@ public class AiService {
|
|
|
"调取的数据还缺失哪些?");
|
|
|
}
|
|
|
String personName = personNames.stream().findAny().get();
|
|
|
- return qs.stream().map(q -> StrUtil.format(q, personName)).toList();
|
|
|
+ List<String> list = qs.stream().map(q -> StrUtil.format(q, personName)).collect(Collectors.toList());
|
|
|
+ Collections.shuffle(list);
|
|
|
+ return list.subList(0,3);
|
|
|
}
|
|
|
}
|