Class ElasticsearchInferenceClient
java.lang.Object
co.elastic.clients.ApiClient<ElasticsearchTransport,ElasticsearchInferenceClient>
co.elastic.clients.elasticsearch.inference.ElasticsearchInferenceClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
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 TypeMethodDescriptiondelete
(DeleteInferenceRequest request) Delete an inference endpointfinal DeleteInferenceResponse
Delete an inference endpointget()
Get an inference endpointget
(GetInferenceRequest request) Get an inference endpointfinal GetInferenceResponse
Get an inference endpointinference
(InferenceRequest request) Perform inference on the servicefinal InferenceResponse
Perform inference on the serviceput
(PutRequest request) Create an inference endpointfinal PutResponse
Create an inference endpointwithTransportOptions
(TransportOptions transportOptions) Creates a new client with some request optionsMethods inherited from class co.elastic.clients.ApiClient
_jsonpMapper, _transport, _transportOptions, close, 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>
-
delete
public DeleteInferenceResponse delete(DeleteInferenceRequest request) throws IOException, ElasticsearchException Delete an inference endpoint- Throws:
IOException
ElasticsearchException
- See Also:
-
delete
public final DeleteInferenceResponse delete(Function<DeleteInferenceRequest.Builder, ObjectBuilder<DeleteInferenceRequest>> fn) throws IOException, ElasticsearchExceptionDelete an inference endpoint- Parameters:
fn
- a function that initializes a builder to create theDeleteInferenceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public GetInferenceResponse get(GetInferenceRequest request) throws IOException, ElasticsearchException Get an inference endpoint- Throws:
IOException
ElasticsearchException
- See Also:
-
get
public final GetInferenceResponse get(Function<GetInferenceRequest.Builder, ObjectBuilder<GetInferenceRequest>> fn) throws IOException, ElasticsearchExceptionGet an inference endpoint- Parameters:
fn
- a function that initializes a builder to create theGetInferenceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
get
Get an inference endpoint- Throws:
IOException
ElasticsearchException
- See Also:
-
inference
public InferenceResponse inference(InferenceRequest request) throws IOException, ElasticsearchException Perform inference on the service- Throws:
IOException
ElasticsearchException
- See Also:
-
inference
public final InferenceResponse inference(Function<InferenceRequest.Builder, ObjectBuilder<InferenceRequest>> fn) throws IOException, ElasticsearchExceptionPerform inference on the service- Parameters:
fn
- a function that initializes a builder to create theInferenceRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-
put
Create an inference endpoint- Throws:
IOException
ElasticsearchException
- See Also:
-
put
public final PutResponse put(Function<PutRequest.Builder, ObjectBuilder<PutRequest>> fn) throws IOException, ElasticsearchExceptionCreate an inference endpoint- Parameters:
fn
- a function that initializes a builder to create thePutRequest
- Throws:
IOException
ElasticsearchException
- See Also:
-