Skip to content

Commit 6bb2a95

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent e7c62d8 commit 6bb2a95

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/custom/CustomServiceSettingsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public void testFromMap_RemovesNullValues_FromMaps() {
259259
),
260260
ConfigurationParseContext.REQUEST,
261261
TaskType.TEXT_EMBEDDING,
262-
"inference_id"
262+
"inference_id"
263263
);
264264

265265
MatcherAssert.assertThat(

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/custom/CustomServiceTests.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,16 @@ private static Map<String, Object> createServiceSettingsMap(TaskType taskType) {
164164
);
165165

166166
if (taskType == TaskType.TEXT_EMBEDDING) {
167-
settingsMap.putAll(Map.of(ServiceFields.SIMILARITY,
168-
SimilarityMeasure.DOT_PRODUCT.toString(),
169-
ServiceFields.DIMENSIONS,
170-
1536,
171-
ServiceFields.MAX_INPUT_TOKENS,
172-
512));
167+
settingsMap.putAll(
168+
Map.of(
169+
ServiceFields.SIMILARITY,
170+
SimilarityMeasure.DOT_PRODUCT.toString(),
171+
ServiceFields.DIMENSIONS,
172+
1536,
173+
ServiceFields.MAX_INPUT_TOKENS,
174+
512
175+
)
176+
);
173177
}
174178

175179
return settingsMap;
@@ -235,12 +239,7 @@ private static CustomModel createInternalEmbeddingModel(
235239
TaskType.TEXT_EMBEDDING,
236240
CustomService.NAME,
237241
new CustomServiceSettings(
238-
new CustomServiceSettings.TextEmbeddingSettings(
239-
similarityMeasure,
240-
123,
241-
456,
242-
DenseVectorFieldMapper.ElementType.FLOAT
243-
),
242+
new CustomServiceSettings.TextEmbeddingSettings(similarityMeasure, 123, 456, DenseVectorFieldMapper.ElementType.FLOAT),
244243
url,
245244
Map.of("key", "value"),
246245
QueryParameters.EMPTY,

0 commit comments

Comments
 (0)