Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ private Map<String, OnnxTensor> removeUnknownModelInputs(Map<String, OnnxTensor>
return modelInputs.entrySet()
.stream()
.filter(a -> this.onnxModelInputs.contains(a.getKey()))
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ else if (metadataMode == MetadataMode.EMBED) {
return new HashMap<>(metadata.entrySet()
.stream()
.filter(e -> usableMetadataKeys.contains(e.getKey()))
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())));
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
}

public String getMetadataTemplate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ public static <T> T merge(Object source, Object target, Class<T> clazz, List<Str
targetMap.putAll(sourceMap.entrySet()
.stream()
.filter(e -> e.getValue() != null)
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())));
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));

targetMap = targetMap.entrySet()
.stream()
.filter(e -> requestFieldNames.contains(e.getKey()))
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));

return ModelOptionsUtils.mapToClass(targetMap, clazz);
}
Expand Down Expand Up @@ -229,7 +229,7 @@ public static Map<String, Object> objectToMap(Object source) {
.entrySet()
.stream()
.filter(e -> e.getValue() != null)
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
}
catch (JsonProcessingException e) {
throw new RuntimeException(e);
Expand Down