Skip to content

Commit cd3e116

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 087d4e5 commit cd3e116

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/response/elastic/ElasticInferenceServiceDenseTextEmbeddingsResponseEntity.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,12 @@ public record EmbeddingFloatResult(List<EmbeddingFloatResultEntry> embeddingResu
7373

7474
static {
7575
// Custom field declaration to handle array of arrays format
76-
PARSER.declareField(
77-
constructorArg(),
78-
(parser, context) -> {
79-
return XContentParserUtils.parseList(parser, (p, index) -> {
80-
List<Float> embedding = XContentParserUtils.parseList(p, (innerParser, innerIndex) -> innerParser.floatValue());
81-
return EmbeddingFloatResultEntry.fromFloatArray(embedding);
82-
});
83-
},
84-
new ParseField("data"),
85-
org.elasticsearch.xcontent.ObjectParser.ValueType.OBJECT_ARRAY
86-
);
76+
PARSER.declareField(constructorArg(), (parser, context) -> {
77+
return XContentParserUtils.parseList(parser, (p, index) -> {
78+
List<Float> embedding = XContentParserUtils.parseList(p, (innerParser, innerIndex) -> innerParser.floatValue());
79+
return EmbeddingFloatResultEntry.fromFloatArray(embedding);
80+
});
81+
}, new ParseField("data"), org.elasticsearch.xcontent.ObjectParser.ValueType.OBJECT_ARRAY);
8782
}
8883

8984
public TextEmbeddingFloatResults toTextEmbeddingFloatResults() {

0 commit comments

Comments
 (0)