Class InferenceRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.inference.InferenceRequest
- All Implemented Interfaces:
JsonpSerializable
Perform inference on the service
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<InferenceRequest>
Json deserializer forInferenceRequest
static final Endpoint<InferenceRequest,
InferenceResponse, ErrorResponse> Endpoint "inference.inference
". -
Method Summary
Modifier and TypeMethodDescriptionfinal String
Required - The inference Idinput()
Required - Text input to the model.static InferenceRequest
final String
query()
Query input, required for rerank task.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final JsonData
Optional task settingsfinal TaskType
taskType()
The task typefinal Time
timeout()
Specifies the amount of time to wait for the inference request to complete.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forInferenceRequest
-
_ENDPOINT
Endpoint "inference.inference
".
-
-
Method Details
-
of
public static InferenceRequest of(Function<InferenceRequest.Builder, ObjectBuilder<InferenceRequest>> fn) -
inferenceId
Required - The inference IdAPI name:
inference_id
-
input
Required - Text input to the model. Either a string or an array of strings.API name:
input
-
query
Query input, required for rerank task. Not required for other tasks.API name:
query
-
taskSettings
Optional task settingsAPI name:
task_settings
-
taskType
The task typeAPI name:
task_type
-
timeout
Specifies the amount of time to wait for the inference request to complete.API name:
timeout
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupInferenceRequestDeserializer
protected static void setupInferenceRequestDeserializer(ObjectDeserializer<InferenceRequest.Builder> op)
-