Class ElasticsearchInferenceClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchInferenceClient>
co.elastic.clients.elasticsearch.inference.ElasticsearchInferenceClient
public class ElasticsearchInferenceClient
extends ApiClient<ElasticsearchTransport,ElasticsearchInferenceClient>
Client for the inference namespace.
-
Field Summary
Fields inherited from class co.elastic.clients.ApiClient
transport, transportOptions
-
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchInferenceClient
(ElasticsearchTransport transport, TransportOptions transportOptions) -
Method Summary
Modifier and TypeMethodDescriptiondeleteModel
(DeleteModelRequest request) Delete model in the Inference APIfinal DeleteModelResponse
Delete model in the Inference APIgetModel
(GetModelRequest request) Get a model in the Inference APIfinal GetModelResponse
Get a model in the Inference APIinference
(InferenceRequest request) Perform inference on a modelfinal InferenceResponse
Perform inference on a modelputModel
(PutModelRequest request) Configure a model for use in the Inference APIfinal PutModelResponse
Configure a model for use in the Inference APIwithTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, getDeserializer, withTransportOptions
-
Constructor Details
-
ElasticsearchInferenceClient
-
ElasticsearchInferenceClient
public ElasticsearchInferenceClient(ElasticsearchTransport transport, @Nullable TransportOptions transportOptions)
-
-
Method Details
-
withTransportOptions
public ElasticsearchInferenceClient withTransportOptions(@Nullable TransportOptions transportOptions) Description copied from class:ApiClient
Creates a new client with some request options- Specified by:
withTransportOptions
in classApiClient<ElasticsearchTransport,
ElasticsearchInferenceClient>
-
deleteModel
public DeleteModelResponse deleteModel(DeleteModelRequest request) throws IOException, ElasticsearchException Delete model in the Inference API- Throws:
IOException
ElasticsearchException
- See Also:
-
deleteModel
public final DeleteModelResponse deleteModel(Function<DeleteModelRequest.Builder, ObjectBuilder<DeleteModelRequest>> fn) throws IOException, ElasticsearchExceptionDelete model in the Inference API- Parameters:
fn
- a function that initializes a builder to create theDeleteModelRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
getModel
public GetModelResponse getModel(GetModelRequest request) throws IOException, ElasticsearchException Get a model in the Inference API- Throws:
IOException
ElasticsearchException
- See Also:
-
getModel
public final GetModelResponse getModel(Function<GetModelRequest.Builder, ObjectBuilder<GetModelRequest>> fn) throws IOException, ElasticsearchExceptionGet a model in the Inference API- Parameters:
fn
- a function that initializes a builder to create theGetModelRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
inference
public InferenceResponse inference(InferenceRequest request) throws IOException, ElasticsearchException Perform inference on a model- Throws:
IOException
ElasticsearchException
- See Also:
-
inference
public final InferenceResponse inference(Function<InferenceRequest.Builder, ObjectBuilder<InferenceRequest>> fn) throws IOException, ElasticsearchExceptionPerform inference on a model- Parameters:
fn
- a function that initializes a builder to create theInferenceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
putModel
public PutModelResponse putModel(PutModelRequest request) throws IOException, ElasticsearchException Configure a model for use in the Inference API- Throws:
IOException
ElasticsearchException
- See Also:
-
putModel
public final PutModelResponse putModel(Function<PutModelRequest.Builder, ObjectBuilder<PutModelRequest>> fn) throws IOException, ElasticsearchExceptionConfigure a model for use in the Inference API- Parameters:
fn
- a function that initializes a builder to create thePutModelRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-