From 02e296f286503574c719c6b6bb1afbb013d01fb7 Mon Sep 17 00:00:00 2001 From: Adam Demjen Date: Tue, 10 Dec 2024 13:39:27 -0500 Subject: [PATCH] [8.17] Update sparse text embeddings API route for Inference Service (#118368) * Update sparse text embeddings API route for Inference Service * Update docs/changelog/118368.yaml --- docs/changelog/118368.yaml | 5 +++++ .../ElasticInferenceServiceSparseEmbeddingsModel.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 docs/changelog/118368.yaml diff --git a/docs/changelog/118368.yaml b/docs/changelog/118368.yaml new file mode 100644 index 0000000000000..f97f8fd0b9056 --- /dev/null +++ b/docs/changelog/118368.yaml @@ -0,0 +1,5 @@ +pr: 118368 +summary: "[8.17] Update sparse text embeddings API route for Inference Service" +area: Inference +type: enhancement +issues: [] diff --git a/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceSparseEmbeddingsModel.java b/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceSparseEmbeddingsModel.java index 731153b3d5dbc..9b5baac09ef8e 100644 --- a/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceSparseEmbeddingsModel.java +++ b/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceSparseEmbeddingsModel.java @@ -108,6 +108,6 @@ private URI createUri() throws URISyntaxException { default -> throw new IllegalArgumentException("Unsupported model for EIS [" + modelId + "]"); } - return new URI(elasticInferenceServiceComponents().eisGatewayUrl() + "/api/v1/sparse-text-embedding/" + modelIdUriPath); + return new URI(elasticInferenceServiceComponents().eisGatewayUrl() + "/api/v1/sparse-text-embeddings/" + modelIdUriPath); } }