Skip to content

Commit df09f02

Browse files
author
Max Hniebergall
committed
improvements from review
1 parent 1c2a48b commit df09f02

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

docs/changelog/116962.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pr: 116962
2-
summary: "[Inference API] Add special case for elastic reranker in inference API"
2+
summary: "Add special case for elastic reranker in inference API"
33
area: Machine Learning
44
type: enhancement
55
issues: []

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceNamedWriteablesProvider.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
import org.elasticsearch.xpack.inference.services.elasticsearch.CustomElandInternalServiceSettings;
6464
import org.elasticsearch.xpack.inference.services.elasticsearch.CustomElandInternalTextEmbeddingServiceSettings;
6565
import org.elasticsearch.xpack.inference.services.elasticsearch.CustomElandRerankTaskSettings;
66+
import org.elasticsearch.xpack.inference.services.elasticsearch.ElasticRerankerServiceSettings;
6667
import org.elasticsearch.xpack.inference.services.elasticsearch.ElasticsearchInternalServiceSettings;
6768
import org.elasticsearch.xpack.inference.services.elasticsearch.ElserInternalServiceSettings;
6869
import org.elasticsearch.xpack.inference.services.elasticsearch.ElserMlNodeTaskSettings;
@@ -415,6 +416,13 @@ private static void addInternalNamedWriteables(List<NamedWriteableRegistry.Entry
415416
MultilingualE5SmallInternalServiceSettings::new
416417
)
417418
);
419+
namedWriteables.add(
420+
new NamedWriteableRegistry.Entry(
421+
ServiceSettings.class,
422+
ElasticRerankerServiceSettings.NAME,
423+
ElasticRerankerServiceSettings::new
424+
)
425+
)
418426

419427
}
420428

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elasticsearch/ElasticRerankerServiceSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public ElasticRerankerServiceSettings(StreamInput in) throws IOException {
3636
}
3737

3838
/**
39-
* Parse the MultilingualE5SmallServiceSettings from map and validate the setting values.
39+
* Parse the ElasticRerankerServiceSettings from map and validate the setting values.
4040
*
4141
* If required setting are missing or the values are invalid an
4242
* {@link ValidationException} is thrown.

0 commit comments

Comments
 (0)