[improvement][project]Remove unnecessary copy from Request to Context objects.

This commit is contained in:
jerryjzhang
2024-10-27 15:59:49 +08:00
parent 397b527bc6
commit 1842261dfe
14 changed files with 66 additions and 96 deletions

View File

@@ -70,8 +70,8 @@ public class ExemplarServiceImpl implements ExemplarService, CommandLineRunner {
RetrieveQuery.builder().queryTextsList(Lists.newArrayList(query)).build();
List<RetrieveQueryResult> results =
embeddingService.retrieveQuery(collection, retrieveQuery, num);
results.stream().forEach(ret -> {
ret.getRetrieval().stream().forEach(r -> {
results.forEach(ret -> {
ret.getRetrieval().forEach(r -> {
exemplars.add(JsonUtil.mapToObject(r.getMetadata(), Text2SQLExemplar.class));
});
});