Skip to content

Commit 6757b07

Browse files
Add Hugging Face Server Test
1 parent 965093b commit 6757b07

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public void testGetServicesWithRerankTaskType() throws IOException {
115115
@SuppressWarnings("unchecked")
116116
public void testGetServicesWithCompletionTaskType() throws IOException {
117117
List<Object> services = getServices(TaskType.COMPLETION);
118-
assertThat(services.size(), equalTo(10));
118+
assertThat(services.size(), equalTo(11));
119119

120120
String[] providers = new String[services.size()];
121121
for (int i = 0; i < services.size(); i++) {
@@ -133,6 +133,7 @@ public void testGetServicesWithCompletionTaskType() throws IOException {
133133
"cohere",
134134
"deepseek",
135135
"googleaistudio",
136+
"hugging_face",
136137
"openai",
137138
"streaming_completion_test_service"
138139
).toArray(),
@@ -143,15 +144,16 @@ public void testGetServicesWithCompletionTaskType() throws IOException {
143144
@SuppressWarnings("unchecked")
144145
public void testGetServicesWithChatCompletionTaskType() throws IOException {
145146
List<Object> services = getServices(TaskType.CHAT_COMPLETION);
146-
assertThat(services.size(), equalTo(4));
147+
assertThat(services.size(), equalTo(5));
147148

148149
String[] providers = new String[services.size()];
149150
for (int i = 0; i < services.size(); i++) {
150151
Map<String, Object> serviceConfig = (Map<String, Object>) services.get(i);
151152
providers[i] = (String) serviceConfig.get("service");
152153
}
153154

154-
assertArrayEquals(List.of("deepseek", "elastic", "openai", "streaming_completion_test_service").toArray(), providers);
155+
assertArrayEquals(List.of("deepseek", "elastic", "hugging_face", "openai",
156+
"streaming_completion_test_service").toArray(), providers);
155157
}
156158

157159
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)