@@ -67,89 +67,89 @@ public ElasticsearchInferenceAsyncClient withTransportOptions(@Nullable Transpor
67
67
return new ElasticsearchInferenceAsyncClient (this .transport , transportOptions );
68
68
}
69
69
70
- // ----- Endpoint: inference.delete_model
70
+ // ----- Endpoint: inference.delete
71
71
72
72
/**
73
- * Delete model in the Inference API
73
+ * Delete an inference endpoint
74
74
*
75
75
* @see <a href=
76
76
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html">Documentation
77
77
* on elastic.co</a>
78
78
*/
79
79
80
- public CompletableFuture <DeleteModelResponse > deleteModel ( DeleteModelRequest request ) {
80
+ public CompletableFuture <DeleteInferenceResponse > delete ( DeleteInferenceRequest request ) {
81
81
@ SuppressWarnings ("unchecked" )
82
- JsonEndpoint <DeleteModelRequest , DeleteModelResponse , ErrorResponse > endpoint = (JsonEndpoint <DeleteModelRequest , DeleteModelResponse , ErrorResponse >) DeleteModelRequest ._ENDPOINT ;
82
+ JsonEndpoint <DeleteInferenceRequest , DeleteInferenceResponse , ErrorResponse > endpoint = (JsonEndpoint <DeleteInferenceRequest , DeleteInferenceResponse , ErrorResponse >) DeleteInferenceRequest ._ENDPOINT ;
83
83
84
84
return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
85
85
}
86
86
87
87
/**
88
- * Delete model in the Inference API
88
+ * Delete an inference endpoint
89
89
*
90
90
* @param fn
91
91
* a function that initializes a builder to create the
92
- * {@link DeleteModelRequest }
92
+ * {@link DeleteInferenceRequest }
93
93
* @see <a href=
94
94
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html">Documentation
95
95
* on elastic.co</a>
96
96
*/
97
97
98
- public final CompletableFuture <DeleteModelResponse > deleteModel (
99
- Function <DeleteModelRequest .Builder , ObjectBuilder <DeleteModelRequest >> fn ) {
100
- return deleteModel (fn .apply (new DeleteModelRequest .Builder ()).build ());
98
+ public final CompletableFuture <DeleteInferenceResponse > delete (
99
+ Function <DeleteInferenceRequest .Builder , ObjectBuilder <DeleteInferenceRequest >> fn ) {
100
+ return delete (fn .apply (new DeleteInferenceRequest .Builder ()).build ());
101
101
}
102
102
103
- // ----- Endpoint: inference.get_model
103
+ // ----- Endpoint: inference.get
104
104
105
105
/**
106
- * Get a model in the Inference API
106
+ * Get an inference endpoint
107
107
*
108
108
* @see <a href=
109
109
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html">Documentation
110
110
* on elastic.co</a>
111
111
*/
112
112
113
- public CompletableFuture <GetModelResponse > getModel ( GetModelRequest request ) {
113
+ public CompletableFuture <GetInferenceResponse > get ( GetInferenceRequest request ) {
114
114
@ SuppressWarnings ("unchecked" )
115
- JsonEndpoint <GetModelRequest , GetModelResponse , ErrorResponse > endpoint = (JsonEndpoint <GetModelRequest , GetModelResponse , ErrorResponse >) GetModelRequest ._ENDPOINT ;
115
+ JsonEndpoint <GetInferenceRequest , GetInferenceResponse , ErrorResponse > endpoint = (JsonEndpoint <GetInferenceRequest , GetInferenceResponse , ErrorResponse >) GetInferenceRequest ._ENDPOINT ;
116
116
117
117
return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
118
118
}
119
119
120
120
/**
121
- * Get a model in the Inference API
121
+ * Get an inference endpoint
122
122
*
123
123
* @param fn
124
124
* a function that initializes a builder to create the
125
- * {@link GetModelRequest }
125
+ * {@link GetInferenceRequest }
126
126
* @see <a href=
127
127
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html">Documentation
128
128
* on elastic.co</a>
129
129
*/
130
130
131
- public final CompletableFuture <GetModelResponse > getModel (
132
- Function <GetModelRequest .Builder , ObjectBuilder <GetModelRequest >> fn ) {
133
- return getModel (fn .apply (new GetModelRequest .Builder ()).build ());
131
+ public final CompletableFuture <GetInferenceResponse > get (
132
+ Function <GetInferenceRequest .Builder , ObjectBuilder <GetInferenceRequest >> fn ) {
133
+ return get (fn .apply (new GetInferenceRequest .Builder ()).build ());
134
134
}
135
135
136
136
/**
137
- * Get a model in the Inference API
137
+ * Get an inference endpoint
138
138
*
139
139
* @see <a href=
140
140
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html">Documentation
141
141
* on elastic.co</a>
142
142
*/
143
143
144
- public CompletableFuture <GetModelResponse > getModel () {
145
- return this .transport .performRequestAsync (new GetModelRequest .Builder ().build (), GetModelRequest . _ENDPOINT ,
146
- this .transportOptions );
144
+ public CompletableFuture <GetInferenceResponse > get () {
145
+ return this .transport .performRequestAsync (new GetInferenceRequest .Builder ().build (),
146
+ GetInferenceRequest . _ENDPOINT , this .transportOptions );
147
147
}
148
148
149
149
// ----- Endpoint: inference.inference
150
150
151
151
/**
152
- * Perform inference on a model
152
+ * Perform inference
153
153
*
154
154
* @see <a href=
155
155
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html">Documentation
@@ -164,7 +164,7 @@ public CompletableFuture<InferenceResponse> inference(InferenceRequest request)
164
164
}
165
165
166
166
/**
167
- * Perform inference on a model
167
+ * Perform inference
168
168
*
169
169
* @param fn
170
170
* a function that initializes a builder to create the
@@ -179,37 +179,36 @@ public final CompletableFuture<InferenceResponse> inference(
179
179
return inference (fn .apply (new InferenceRequest .Builder ()).build ());
180
180
}
181
181
182
- // ----- Endpoint: inference.put_model
182
+ // ----- Endpoint: inference.put
183
183
184
184
/**
185
- * Configure a model for use in the Inference API
185
+ * Configure an inference endpoint for use in the Inference API
186
186
*
187
187
* @see <a href=
188
188
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html">Documentation
189
189
* on elastic.co</a>
190
190
*/
191
191
192
- public CompletableFuture <PutModelResponse > putModel ( PutModelRequest request ) {
192
+ public CompletableFuture <PutResponse > put ( PutRequest request ) {
193
193
@ SuppressWarnings ("unchecked" )
194
- JsonEndpoint <PutModelRequest , PutModelResponse , ErrorResponse > endpoint = (JsonEndpoint <PutModelRequest , PutModelResponse , ErrorResponse >) PutModelRequest ._ENDPOINT ;
194
+ JsonEndpoint <PutRequest , PutResponse , ErrorResponse > endpoint = (JsonEndpoint <PutRequest , PutResponse , ErrorResponse >) PutRequest ._ENDPOINT ;
195
195
196
196
return this .transport .performRequestAsync (request , endpoint , this .transportOptions );
197
197
}
198
198
199
199
/**
200
- * Configure a model for use in the Inference API
200
+ * Configure an inference endpoint for use in the Inference API
201
201
*
202
202
* @param fn
203
203
* a function that initializes a builder to create the
204
- * {@link PutModelRequest }
204
+ * {@link PutRequest }
205
205
* @see <a href=
206
206
* "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html">Documentation
207
207
* on elastic.co</a>
208
208
*/
209
209
210
- public final CompletableFuture <PutModelResponse > putModel (
211
- Function <PutModelRequest .Builder , ObjectBuilder <PutModelRequest >> fn ) {
212
- return putModel (fn .apply (new PutModelRequest .Builder ()).build ());
210
+ public final CompletableFuture <PutResponse > put (Function <PutRequest .Builder , ObjectBuilder <PutRequest >> fn ) {
211
+ return put (fn .apply (new PutRequest .Builder ()).build ());
213
212
}
214
213
215
214
}
0 commit comments