Skip to content

Commit a9b44b5

Browse files
Adding javadoc
1 parent 8f22f56 commit a9b44b5

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
import java.util.List;
1111
import java.util.Objects;
1212

13+
/**
14+
* This class encapsulates the input text passed by the request and indicates whether the response should be streamed.
15+
* The main difference between this class and {@link UnifiedChatInput} is this should only be used for
16+
* {@link org.elasticsearch.inference.TaskType#COMPLETION} originating through the
17+
* {@link org.elasticsearch.inference.InferenceService#infer} code path. These are requests sent to the
18+
* API without using the <code>_unified</code> route.
19+
*/
1320
public class ChatCompletionInput extends InferenceInputs {
1421
private final List<String> input;
1522

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,21 @@
77

88
package org.elasticsearch.xpack.inference.external.http.sender;
99

10+
import org.elasticsearch.action.ActionListener;
11+
import org.elasticsearch.core.TimeValue;
12+
import org.elasticsearch.inference.Model;
1013
import org.elasticsearch.inference.UnifiedCompletionRequest;
1114

1215
import java.util.List;
1316
import java.util.Objects;
1417

18+
/**
19+
* This class encapsulates the unified request.
20+
* The main difference between this class and {@link ChatCompletionInput} is this should only be used for
21+
* {@link org.elasticsearch.inference.TaskType#COMPLETION} originating through the
22+
* {@link org.elasticsearch.inference.InferenceService#unifiedCompletionInfer(Model, UnifiedCompletionRequest, TimeValue, ActionListener)}
23+
* code path. These are requests sent to the API with the <code>_unified</code> route.
24+
*/
1525
public class UnifiedChatInput extends InferenceInputs {
1626
private final UnifiedCompletionRequest request;
1727

0 commit comments

Comments
 (0)