Skip to content

Commit 8b9ceae

Browse files
authored
[Inference API] EIS: adapt paths (#120734)
The final EIS task types definitions changes the names of the routes.
1 parent efc18fe commit 8b9ceae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private URI createUri() throws ElasticsearchStatusException {
115115
try {
116116
// TODO, consider transforming the base URL into a URI for better error handling.
117117
return new URI(
118-
elasticInferenceServiceComponents().elasticInferenceServiceUrl() + "/api/v1/sparse-text-embeddings/" + modelIdUriPath
118+
elasticInferenceServiceComponents().elasticInferenceServiceUrl() + "/api/v1/embed/text/sparse/" + modelIdUriPath
119119
);
120120
} catch (URISyntaxException e) {
121121
throw new ElasticsearchStatusException(

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/elastic/completion/ElasticInferenceServiceCompletionModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public URI uri() {
106106
private URI createUri() throws ElasticsearchStatusException {
107107
try {
108108
// TODO, consider transforming the base URL into a URI for better error handling.
109-
return new URI(elasticInferenceServiceComponents().elasticInferenceServiceUrl() + "/api/v1/chat/completions");
109+
return new URI(elasticInferenceServiceComponents().elasticInferenceServiceUrl() + "/api/v1/chat");
110110
} catch (URISyntaxException e) {
111111
throw new ElasticsearchStatusException(
112112
"Failed to create URI for service ["

0 commit comments

Comments
 (0)