Class TextEmbeddingRequest
java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.inference.TextEmbeddingRequest
- All Implemented Interfaces:
- JsonpSerializable
@JsonpDeserializable
public class TextEmbeddingRequest
extends RequestBase
implements JsonpSerializable
Perform text embedding inference on the service
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBaseRequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<TextEmbeddingRequest>Json deserializer forTextEmbeddingRequeststatic final Endpoint<TextEmbeddingRequest,TextEmbeddingResponse, ErrorResponse> Endpoint "inference.text_embedding".
- 
Method SummaryModifier and TypeMethodDescriptionfinal StringRequired - The inference Idinput()Required - Inference input.final StringThe input data type for the text embedding model.static TextEmbeddingRequestvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal JsonDataOptional task settingsfinal Timetimeout()Specifies the amount of time to wait for the inference request to complete.Methods inherited from class co.elastic.clients.elasticsearch._types.RequestBasetoString
- 
Field Details- 
_DESERIALIZERJson deserializer forTextEmbeddingRequest
- 
_ENDPOINTEndpoint "inference.text_embedding".
 
- 
- 
Method Details- 
ofpublic static TextEmbeddingRequest of(Function<TextEmbeddingRequest.Builder, ObjectBuilder<TextEmbeddingRequest>> fn) 
- 
inferenceIdRequired - The inference IdAPI name: inference_id
- 
inputRequired - Inference input. Either a string or an array of strings.API name: input
- 
inputTypeThe input data type for the text embedding model. Possible values include:- SEARCH
- INGEST
- CLASSIFICATION
- CLUSTERINGNot all services support all values. Unsupported values will trigger a validation exception. Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.
 info The input_typeparameter specified on the root level of the request body will take precedence over theinput_typeparameter specified intask_settings.API name: input_type
- 
taskSettingsOptional task settingsAPI name: task_settings
- 
timeoutSpecifies the amount of time to wait for the inference request to complete.API name: timeout
- 
serializeSerialize this object to JSON.- Specified by:
- serializein interface- JsonpSerializable
 
- 
serializeInternal
- 
setupTextEmbeddingRequestDeserializerprotected static void setupTextEmbeddingRequestDeserializer(ObjectDeserializer<TextEmbeddingRequest.Builder> op) 
 
-