File tree Expand file tree Collapse file tree 7 files changed +21
-21
lines changed
lib/elasticsearch/api/actions/inference
spec/elasticsearch/api/actions/inference Expand file tree Collapse file tree 7 files changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -22,20 +22,20 @@ module Elasticsearch
22
22
module API
23
23
module Inference
24
24
module Actions
25
- # Delete model in the Inference API
25
+ # Delete an inference endpoint
26
26
# This functionality is Experimental and may be changed or removed
27
27
# completely in a future release. Elastic will take a best effort approach
28
28
# to fix any issues, but experimental features are not subject to the
29
29
# support SLA of official GA features.
30
30
#
31
- # @option arguments [String] :inference_id The model Id
31
+ # @option arguments [String] :inference_id The inference Id
32
32
# @option arguments [String] :task_type The task type
33
33
# @option arguments [Hash] :headers Custom HTTP headers
34
34
#
35
35
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-inference-api.html
36
36
#
37
- def delete_model ( arguments = { } )
38
- request_opts = { endpoint : arguments [ :endpoint ] || 'inference.delete_model ' }
37
+ def delete ( arguments = { } )
38
+ request_opts = { endpoint : arguments [ :endpoint ] || 'inference.delete ' }
39
39
40
40
defined_params = %i[ inference_id task_type ] . each_with_object ( { } ) do |variable , set_variables |
41
41
set_variables [ variable ] = arguments [ variable ] if arguments . key? ( variable )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Elasticsearch
22
22
module API
23
23
module Inference
24
24
module Actions
25
- # Get a model in the Inference API
25
+ # Get an inference endpoint
26
26
# This functionality is Experimental and may be changed or removed
27
27
# completely in a future release. Elastic will take a best effort approach
28
28
# to fix any issues, but experimental features are not subject to the
@@ -34,8 +34,8 @@ module Actions
34
34
#
35
35
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-api.html
36
36
#
37
- def get_model ( arguments = { } )
38
- request_opts = { endpoint : arguments [ :endpoint ] || 'inference.get_model ' }
37
+ def get ( arguments = { } )
38
+ request_opts = { endpoint : arguments [ :endpoint ] || 'inference.get ' }
39
39
40
40
defined_params = %i[ inference_id task_type ] . each_with_object ( { } ) do |variable , set_variables |
41
41
set_variables [ variable ] = arguments [ variable ] if arguments . key? ( variable )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Elasticsearch
22
22
module API
23
23
module Inference
24
24
module Actions
25
- # Perform inference on a model
25
+ # Perform inference
26
26
# This functionality is Experimental and may be changed or removed
27
27
# completely in a future release. Elastic will take a best effort approach
28
28
# to fix any issues, but experimental features are not subject to the
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ module Elasticsearch
22
22
module API
23
23
module Inference
24
24
module Actions
25
- # Configure a model for use in the Inference API
25
+ # Configure an inference endpoint for use in the Inference API
26
26
# This functionality is Experimental and may be changed or removed
27
27
# completely in a future release. Elastic will take a best effort approach
28
28
# to fix any issues, but experimental features are not subject to the
@@ -31,12 +31,12 @@ module Actions
31
31
# @option arguments [String] :inference_id The inference Id
32
32
# @option arguments [String] :task_type The task type
33
33
# @option arguments [Hash] :headers Custom HTTP headers
34
- # @option arguments [Hash] :body The model 's task and service settings
34
+ # @option arguments [Hash] :body The inference endpoint 's task and service settings
35
35
#
36
36
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/put-inference-api.html
37
37
#
38
- def put_model ( arguments = { } )
39
- request_opts = { endpoint : arguments [ :endpoint ] || 'inference.put_model ' }
38
+ def put ( arguments = { } )
39
+ request_opts = { endpoint : arguments [ :endpoint ] || 'inference.put ' }
40
40
41
41
defined_params = %i[ inference_id task_type ] . each_with_object ( { } ) do |variable , set_variables |
42
42
set_variables [ variable ] = arguments [ variable ] if arguments . key? ( variable )
Original file line number Diff line number Diff line change 17
17
18
18
require 'spec_helper'
19
19
20
- describe 'client#inference.delete_model ' do
20
+ describe 'client#inference.delete ' do
21
21
let ( :expected_args ) do
22
22
[
23
23
'DELETE' ,
26
26
nil ,
27
27
{ } ,
28
28
{ defined_params : { inference_id : 'bar' , task_type : 'foo' } ,
29
- endpoint : 'inference.delete_model ' }
29
+ endpoint : 'inference.delete ' }
30
30
]
31
31
end
32
32
33
33
it 'performs the request' do
34
- expect ( client_double . inference . delete_model ( task_type : 'foo' , inference_id : 'bar' ) ) . to be_a Elasticsearch ::API ::Response
34
+ expect ( client_double . inference . delete ( task_type : 'foo' , inference_id : 'bar' ) ) . to be_a Elasticsearch ::API ::Response
35
35
end
36
36
end
Original file line number Diff line number Diff line change 17
17
18
18
require 'spec_helper'
19
19
20
- describe 'client#inference.get_model ' do
20
+ describe 'client#inference.get ' do
21
21
let ( :expected_args ) do
22
22
[
23
23
'GET' ,
26
26
nil ,
27
27
{ } ,
28
28
{ defined_params : { inference_id : 'bar' , task_type : 'foo' } ,
29
- endpoint : 'inference.get_model ' }
29
+ endpoint : 'inference.get ' }
30
30
]
31
31
end
32
32
33
33
it 'performs the request' do
34
- expect ( client_double . inference . get_model ( task_type : 'foo' , inference_id : 'bar' ) ) . to be_a Elasticsearch ::API ::Response
34
+ expect ( client_double . inference . get ( task_type : 'foo' , inference_id : 'bar' ) ) . to be_a Elasticsearch ::API ::Response
35
35
end
36
36
end
Original file line number Diff line number Diff line change 17
17
18
18
require 'spec_helper'
19
19
20
- describe 'client#inference.put_model ' do
20
+ describe 'client#inference.put ' do
21
21
let ( :expected_args ) do
22
22
[
23
23
'PUT' ,
26
26
nil ,
27
27
{ } ,
28
28
{ defined_params : { inference_id : 'bar' , task_type : 'foo' } ,
29
- endpoint : 'inference.put_model ' }
29
+ endpoint : 'inference.put ' }
30
30
]
31
31
end
32
32
33
33
it 'performs the request' do
34
- expect ( client_double . inference . put_model ( task_type : 'foo' , inference_id : 'bar' ) ) . to be_a Elasticsearch ::API ::Response
34
+ expect ( client_double . inference . put ( task_type : 'foo' , inference_id : 'bar' ) ) . to be_a Elasticsearch ::API ::Response
35
35
end
36
36
end
You can’t perform that action at this time.
0 commit comments