You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elasticsearch/ElasticsearchInternalService.java
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,7 @@ public void parseRequestConfig(
151
151
config,
152
152
arch,
153
153
serviceSettingsMap,
154
+
true,
154
155
chunkingSettings,
155
156
modelListener
156
157
)
@@ -182,6 +183,7 @@ public void parseRequestConfig(
182
183
config,
183
184
arch,
184
185
serviceSettingsMap,
186
+
OLD_ELSER_SERVICE_NAME.equals(serviceName),
185
187
chunkingSettings,
186
188
modelListener
187
189
)
@@ -341,6 +343,7 @@ private void elserCase(
341
343
Map<String, Object> config,
342
344
Set<String> platformArchitectures,
343
345
Map<String, Object> serviceSettingsMap,
346
+
booleanisElserService,
344
347
ChunkingSettingschunkingSettings,
345
348
ActionListener<Model> modelListener
346
349
) {
@@ -371,15 +374,17 @@ private void elserCase(
371
374
}
372
375
}
373
376
374
-
DEPRECATION_LOGGER.warn(
375
-
DeprecationCategory.API,
376
-
"inference_api_elser_service",
377
-
"The [{}] service is deprecated and will be removed in a future release. Use the [{}] service instead, with"
378
-
+ " [model_id] set to [{}] in the [service_settings]",
379
-
OLD_ELSER_SERVICE_NAME,
380
-
ElasticsearchInternalService.NAME,
381
-
defaultModelId
382
-
);
377
+
if (isElserService) {
378
+
DEPRECATION_LOGGER.warn(
379
+
DeprecationCategory.API,
380
+
"inference_api_elser_service",
381
+
"The [{}] service is deprecated and will be removed in a future release. Use the [{}] service instead, with"
382
+
+ " [model_id] set to [{}] in the [service_settings]",
383
+
OLD_ELSER_SERVICE_NAME,
384
+
ElasticsearchInternalService.NAME,
385
+
defaultModelId
386
+
);
387
+
}
383
388
384
389
if (modelVariantDoesNotMatchArchitecturesAndIsNotPlatformAgnostic(platformArchitectures, esServiceSettingsBuilder.getModelId())) {
0 commit comments