Skip to content

Commit 14c0be5

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 1802d60 commit 14c0be5

File tree

5 files changed

+8
-29
lines changed

5 files changed

+8
-29
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,3 @@ public boolean isStreaming() {
9090
return false;
9191
}
9292
}
93-
94-

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
6060
return builder;
6161
}
6262
}
63-

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/completion/ElasticInferenceServiceCompletionModelTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,3 @@ public static ElasticInferenceServiceCompletionModel createModel(String url, Str
9999
);
100100
}
101101
}
102-

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/request/ElasticInferenceServiceCompletionRequestEntityTests.java

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
public class ElasticInferenceServiceCompletionRequestEntityTests extends ESTestCase {
2222

2323
public void testToXContent_SingleInput() throws IOException {
24-
var entity = new ElasticInferenceServiceCompletionRequestEntity(
25-
List.of("What is 2+2?"),
26-
"my-model-id"
27-
);
24+
var entity = new ElasticInferenceServiceCompletionRequestEntity(List.of("What is 2+2?"), "my-model-id");
2825
String xContentString = xContentEntityToString(entity);
2926
assertThat(xContentString, equalToIgnoringWhitespaceInJsonString("""
3027
{
@@ -66,10 +63,7 @@ public void testToXContent_MultipleInputs() throws IOException {
6663
}
6764

6865
public void testToXContent_EmptyInput() throws IOException {
69-
var entity = new ElasticInferenceServiceCompletionRequestEntity(
70-
List.of(""),
71-
"my-model-id"
72-
);
66+
var entity = new ElasticInferenceServiceCompletionRequestEntity(List.of(""), "my-model-id");
7367
String xContentString = xContentEntityToString(entity);
7468
assertThat(xContentString, equalToIgnoringWhitespaceInJsonString("""
7569
{
@@ -87,12 +81,9 @@ public void testToXContent_EmptyInput() throws IOException {
8781
}
8882

8983
public void testToXContent_AlwaysNonStreaming() throws IOException {
90-
var entity = new ElasticInferenceServiceCompletionRequestEntity(
91-
List.of("test input"),
92-
"my-model-id"
93-
);
84+
var entity = new ElasticInferenceServiceCompletionRequestEntity(List.of("test input"), "my-model-id");
9485
String xContentString = xContentEntityToString(entity);
95-
86+
9687
// Verify stream is always false
9788
assertThat(xContentString, equalToIgnoringWhitespaceInJsonString("""
9889
{
@@ -110,12 +101,9 @@ public void testToXContent_AlwaysNonStreaming() throws IOException {
110101
}
111102

112103
public void testToXContent_AlwaysSetsNToOne() throws IOException {
113-
var entity = new ElasticInferenceServiceCompletionRequestEntity(
114-
List.of("input1", "input2", "input3"),
115-
"my-model-id"
116-
);
104+
var entity = new ElasticInferenceServiceCompletionRequestEntity(List.of("input1", "input2", "input3"), "my-model-id");
117105
String xContentString = xContentEntityToString(entity);
118-
106+
119107
// Verify n is always 1 regardless of number of inputs
120108
assertThat(xContentString, equalToIgnoringWhitespaceInJsonString("""
121109
{
@@ -141,12 +129,9 @@ public void testToXContent_AlwaysSetsNToOne() throws IOException {
141129
}
142130

143131
public void testToXContent_AllMessagesHaveUserRole() throws IOException {
144-
var entity = new ElasticInferenceServiceCompletionRequestEntity(
145-
List.of("first", "second", "third"),
146-
"test-model"
147-
);
132+
var entity = new ElasticInferenceServiceCompletionRequestEntity(List.of("first", "second", "third"), "test-model");
148133
String xContentString = xContentEntityToString(entity);
149-
134+
150135
// Verify all messages have "user" role
151136
assertThat(xContentString, equalToIgnoringWhitespaceInJsonString("""
152137
{
@@ -177,4 +162,3 @@ private String xContentEntityToString(ElasticInferenceServiceCompletionRequestEn
177162
return Strings.toString(builder);
178163
}
179164
}
180-

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/request/ElasticInferenceServiceCompletionRequestTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,3 @@ private ElasticInferenceServiceCompletionRequest createRequest(String url, Strin
188188
);
189189
}
190190
}
191-

0 commit comments

Comments
 (0)