Module org.elasticsearch.xcore
Class InferenceAction.Request
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.xpack.core.inference.action.BaseInferenceActionRequest
org.elasticsearch.xpack.core.inference.action.InferenceAction.Request
- All Implemented Interfaces:
Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
- Enclosing class:
InferenceAction
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.core.TimeValuestatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsConstructorDescriptionRequest(StreamInput in) Request(TaskType taskType, String inferenceEntityId, String query, Boolean returnDocuments, Integer topN, List<String> input, Map<String, Object> taskSettings, InputType inputType, org.elasticsearch.core.TimeValue inferenceTimeout, boolean stream) Request(TaskType taskType, String inferenceEntityId, String query, Boolean returnDocuments, Integer topN, List<String> input, Map<String, Object> taskSettings, InputType inputType, org.elasticsearch.core.TimeValue inferenceTimeout, boolean stream, InferenceContext context) -
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.elasticsearch.core.TimeValuegetInput()getQuery()getTopN()inthashCode()booleanparseRequest(String inferenceEntityId, TaskType taskType, InferenceContext context, org.elasticsearch.xcontent.XContentParser parser) toString()validate()voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.core.inference.action.BaseInferenceActionRequest
getContext, hasBeenRerouted, setHasBeenReroutedMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestIdMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
mustIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
DEFAULT_TIMEOUT
public static final org.elasticsearch.core.TimeValue DEFAULT_TIMEOUT -
INPUT
public static final org.elasticsearch.xcontent.ParseField INPUT -
INPUT_TYPE
public static final org.elasticsearch.xcontent.ParseField INPUT_TYPE -
TASK_SETTINGS
public static final org.elasticsearch.xcontent.ParseField TASK_SETTINGS -
QUERY
public static final org.elasticsearch.xcontent.ParseField QUERY -
RETURN_DOCUMENTS
public static final org.elasticsearch.xcontent.ParseField RETURN_DOCUMENTS -
TOP_N
public static final org.elasticsearch.xcontent.ParseField TOP_N -
TIMEOUT
public static final org.elasticsearch.xcontent.ParseField TIMEOUT
-
-
Constructor Details
-
Request
-
Request
-
Request
- Throws:
IOException
-
-
Method Details
-
builder
-
parseRequest
public static InferenceAction.Request.Builder parseRequest(String inferenceEntityId, TaskType taskType, InferenceContext context, org.elasticsearch.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
getTaskType
- Specified by:
getTaskTypein classBaseInferenceActionRequest
-
getInferenceEntityId
- Specified by:
getInferenceEntityIdin classBaseInferenceActionRequest
-
getInput
-
getQuery
-
getReturnDocuments
-
getTopN
-
getTaskSettings
-
getInputType
-
getInferenceTimeout
public org.elasticsearch.core.TimeValue getInferenceTimeout() -
isStreaming
public boolean isStreaming()- Specified by:
isStreamingin classBaseInferenceActionRequest
-
validate
- Specified by:
validatein classActionRequest
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBaseInferenceActionRequest- Throws:
IOException
-
equals
- Overrides:
equalsin classBaseInferenceActionRequest
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseInferenceActionRequest
-
toString
- Overrides:
toStringin classTransportRequest
-