Skip to content

Commit 24c52e8

Browse files
Refactor OpenAiUnifiedChatCompletionRequestEntity to remove unused fields and streamline constructor
1 parent cc13241 commit 24c52e8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/openai/request/OpenAiUnifiedChatCompletionRequestEntity.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,10 @@
2121
public class OpenAiUnifiedChatCompletionRequestEntity implements ToXContentObject {
2222

2323
public static final String USER_FIELD = "user";
24-
private static final String MODEL_FIELD = "model";
25-
private static final String MAX_COMPLETION_TOKENS_FIELD = "max_completion_tokens";
26-
27-
private final UnifiedChatInput unifiedChatInput;
2824
private final OpenAiChatCompletionModel model;
2925
private final UnifiedChatCompletionRequestEntity unifiedRequestEntity;
3026

3127
public OpenAiUnifiedChatCompletionRequestEntity(UnifiedChatInput unifiedChatInput, OpenAiChatCompletionModel model) {
32-
this.unifiedChatInput = Objects.requireNonNull(unifiedChatInput);
3328
this.unifiedRequestEntity = new UnifiedChatCompletionRequestEntity(unifiedChatInput);
3429
this.model = Objects.requireNonNull(model);
3530
}

0 commit comments

Comments
 (0)