Skip to content

Commit 952f8b4

Browse files
[ML] Exposing ai21 and llama in the services api (elastic#133233)
* Exposing ai21 and llama in the services api * Fixing tests
1 parent c0560ef commit 952f8b4

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceGetServicesIT.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public void testGetServicesWithoutTaskType() throws IOException {
3434
allProviders(),
3535
containsInAnyOrder(
3636
List.of(
37+
"ai21",
3738
"alibabacloud-ai-search",
3839
"amazonbedrock",
3940
"anthropic",
@@ -47,6 +48,7 @@ public void testGetServicesWithoutTaskType() throws IOException {
4748
"googlevertexai",
4849
"hugging_face",
4950
"jinaai",
51+
"llama",
5052
"mistral",
5153
"openai",
5254
"streaming_completion_test_service",
@@ -91,6 +93,7 @@ public void testGetServicesWithTextEmbeddingTaskType() throws IOException {
9193
"googlevertexai",
9294
"hugging_face",
9395
"jinaai",
96+
"llama",
9497
"mistral",
9598
"openai",
9699
"text_embedding_test_service",
@@ -131,6 +134,8 @@ public void testGetServicesWithCompletionTaskType() throws IOException {
131134
providersFor(TaskType.COMPLETION),
132135
containsInAnyOrder(
133136
List.of(
137+
"ai21",
138+
"llama",
134139
"alibabacloud-ai-search",
135140
"amazonbedrock",
136141
"anthropic",
@@ -157,6 +162,8 @@ public void testGetServicesWithChatCompletionTaskType() throws IOException {
157162
providersFor(TaskType.CHAT_COMPLETION),
158163
containsInAnyOrder(
159164
List.of(
165+
"ai21",
166+
"llama",
160167
"deepseek",
161168
"elastic",
162169
"openai",

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,6 @@ public TransportVersion getMinimalSupportedVersion() {
227227
return TransportVersions.ML_INFERENCE_AI21_COMPLETION_ADDED;
228228
}
229229

230-
@Override
231-
public boolean hideFromConfigurationApi() {
232-
// The AI21 service is very configurable so we're going to hide it from being exposed in the service API.
233-
return true;
234-
}
235-
236230
@Override
237231
public Set<TaskType> supportedStreamingTasks() {
238232
return EnumSet.of(TaskType.COMPLETION, TaskType.CHAT_COMPLETION);

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,6 @@ public TransportVersion getMinimalSupportedVersion() {
366366
return TransportVersions.ML_INFERENCE_LLAMA_ADDED;
367367
}
368368

369-
@Override
370-
public boolean hideFromConfigurationApi() {
371-
// The Llama service is very configurable so we're going to hide it from being exposed in the service API.
372-
return true;
373-
}
374-
375369
/**
376370
* Configuration class for the Llama inference service.
377371
* It provides the settings and configurations required for the service.

0 commit comments

Comments
 (0)