Skip to content

Commit f7f8a2e

Browse files
author
Max Hniebergall
committed
precommit
1 parent ab53397 commit f7f8a2e

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/UnifiedCompletionRequestTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public static UnifiedCompletionRequest randomUnifiedCompletionRequest() {
187187
randomList(5, UnifiedCompletionRequestTests::randomMessage),
188188
randomAlphaOfLengthOrNull(10),
189189
randomPositiveLongOrNull(),
190-
randomStopOrNull(),
190+
randomStopOrNull(),
191191
randomFloatOrNull(),
192192
randomToolChoiceOrNull(),
193193
randomToolListOrNull(),

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/sender/UnifiedChatInput.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ public UnifiedChatInput(UnifiedCompletionRequest request, boolean stream) {
2222
}
2323

2424
public UnifiedChatInput(ChatCompletionInput completionInput, String roleValue) {
25-
this(
26-
completionInput.getInputs(), roleValue, completionInput.stream()
27-
);
25+
this(completionInput.getInputs(), roleValue, completionInput.stream());
2826
}
2927

3028
public UnifiedChatInput(List<String> inputs, String roleValue, boolean stream) {
@@ -33,7 +31,15 @@ public UnifiedChatInput(List<String> inputs, String roleValue, boolean stream) {
3331

3432
private static List<UnifiedCompletionRequest.Message> convertToMessages(List<String> inputs, String roleValue) {
3533
return inputs.stream()
36-
.map(value -> new UnifiedCompletionRequest.Message(new UnifiedCompletionRequest.ContentString(value), roleValue, null, null, null))
34+
.map(
35+
value -> new UnifiedCompletionRequest.Message(
36+
new UnifiedCompletionRequest.ContentString(value),
37+
roleValue,
38+
null,
39+
null,
40+
null
41+
)
42+
)
3743
.toList();
3844
}
3945

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/openai/completion/OpenAiChatCompletionRequestTaskSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.elasticsearch.common.ValidationException;
1111
import org.elasticsearch.core.Nullable;
1212
import org.elasticsearch.inference.ModelConfigurations;
13-
import org.elasticsearch.inference.UnifiedCompletionRequest;
1413

1514
import java.util.Map;
1615

0 commit comments

Comments
 (0)