diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb similarity index 75% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb index c4e21cf04f..6d2276b844 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/unified_inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb @@ -22,19 +22,18 @@ module Elasticsearch module API module Inference module Actions - # Perform inference using the Unified Schema + # Perform chat completion inference # # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The inference payload # - # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/unified-inference-api.html + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/chat-completion-inference.html # - def unified_inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.unified_inference' } + def chat_completion_unified(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.chat_completion_unified' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -48,14 +47,8 @@ def unified_inference(arguments = {}) _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST - path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_unified" - else - "_inference/#{Utils.__listify(_inference_id)}/_unified" - end + path = "_inference/chat_completion/#{Utils.__listify(_inference_id)}/_stream" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb similarity index 71% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb index 01fe4fa1b0..7fb488576d 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/completion.rb @@ -22,23 +22,18 @@ module Elasticsearch module API module Inference module Actions - # Perform inference - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Perform completion inference # # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The inference payload # # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html # - def inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.inference' } + def completion(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.completion' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,14 +47,8 @@ def inference(arguments = {}) _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST - path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}" - else - "_inference/#{Utils.__listify(_inference_id)}" - end + path = "_inference/completion/#{Utils.__listify(_inference_id)}" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb index 33b0096969..0d08490a49 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/delete.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Delete an inference endpoint - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb index f729e629b3..efc0563f1f 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/get.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Get an inference endpoint - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb index 79ebabb611..7e4de038c0 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb @@ -23,10 +23,6 @@ module API module Inference module Actions # Configure an inference endpoint for use in the Inference API - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. # # @option arguments [String] :inference_id The inference Id # @option arguments [String] :task_type The task type diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb new file mode 100644 index 0000000000..3b1405114d --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/rerank.rb @@ -0,0 +1,61 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Perform reranking inference + # + # @option arguments [String] :inference_id The inference Id + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference payload + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html + # + def rerank(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.rerank' } + + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/rerank/#{Utils.__listify(_inference_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb new file mode 100644 index 0000000000..a54bd778db --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/sparse_embedding.rb @@ -0,0 +1,61 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Perform sparse embedding inference + # + # @option arguments [String] :inference_id The inference Id + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference payload + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html + # + def sparse_embedding(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.sparse_embedding' } + + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/sparse_embedding/#{Utils.__listify(_inference_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb similarity index 70% rename from elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb rename to elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb index c18861fbb8..8ab0857fae 100644 --- a/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_inference.rb +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/stream_completion.rb @@ -22,23 +22,18 @@ module Elasticsearch module API module Inference module Actions - # Perform streaming inference - # This functionality is Experimental and may be changed or removed - # completely in a future release. Elastic will take a best effort approach - # to fix any issues, but experimental features are not subject to the - # support SLA of official GA features. + # Perform streaming completion inference # # @option arguments [String] :inference_id The inference Id - # @option arguments [String] :task_type The task type # @option arguments [Hash] :headers Custom HTTP headers # @option arguments [Hash] :body The inference payload # # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-stream-inference-api.html # - def stream_inference(arguments = {}) - request_opts = { endpoint: arguments[:endpoint] || 'inference.stream_inference' } + def stream_completion(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.stream_completion' } - defined_params = %i[inference_id task_type].each_with_object({}) do |variable, set_variables| + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| set_variables[variable] = arguments[variable] if arguments.key?(variable) end request_opts[:defined_params] = defined_params unless defined_params.empty? @@ -52,14 +47,8 @@ def stream_inference(arguments = {}) _inference_id = arguments.delete(:inference_id) - _task_type = arguments.delete(:task_type) - method = Elasticsearch::API::HTTP_POST - path = if _task_type && _inference_id - "_inference/#{Utils.__listify(_task_type)}/#{Utils.__listify(_inference_id)}/_stream" - else - "_inference/#{Utils.__listify(_inference_id)}/_stream" - end + path = "_inference/completion/#{Utils.__listify(_inference_id)}/_stream" params = {} Elasticsearch::API::Response.new( diff --git a/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb new file mode 100644 index 0000000000..1fad048238 --- /dev/null +++ b/elasticsearch-api/lib/elasticsearch/api/actions/inference/text_embedding.rb @@ -0,0 +1,61 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80 +# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec +# +module Elasticsearch + module API + module Inference + module Actions + # Perform text embedding inference + # + # @option arguments [String] :inference_id The inference Id + # @option arguments [Hash] :headers Custom HTTP headers + # @option arguments [Hash] :body The inference payload + # + # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.17/post-inference-api.html + # + def text_embedding(arguments = {}) + request_opts = { endpoint: arguments[:endpoint] || 'inference.text_embedding' } + + defined_params = [:inference_id].each_with_object({}) do |variable, set_variables| + set_variables[variable] = arguments[variable] if arguments.key?(variable) + end + request_opts[:defined_params] = defined_params unless defined_params.empty? + + raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id] + + arguments = arguments.clone + headers = arguments.delete(:headers) || {} + + body = arguments.delete(:body) + + _inference_id = arguments.delete(:inference_id) + + method = Elasticsearch::API::HTTP_POST + path = "_inference/text_embedding/#{Utils.__listify(_inference_id)}" + params = {} + + Elasticsearch::API::Response.new( + perform_request(method, path, params, body, headers, request_opts) + ) + end + end + end + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/chat_completion_unified_spec.rb similarity index 73% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/inference/chat_completion_unified_spec.rb index daed8332d7..6abc29076e 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/unified_inference_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/chat_completion_unified_spec.rb @@ -17,20 +17,20 @@ require 'spec_helper' -describe 'client#inference.unified_inference' do +describe 'client#inference.chat_completion_unified' do let(:expected_args) do [ 'POST', - '_inference/foo/bar/_unified', + '_inference/chat_completion/bar/_stream', {}, nil, {}, - { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.unified_inference' } + { defined_params: { inference_id: 'bar' }, + endpoint: 'inference.chat_completion_unified' } ] end it 'performs the request' do - expect(client_double.inference.unified_inference(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.chat_completion_unified(inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/completion_spec.rb similarity index 75% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/inference/completion_spec.rb index c87efa07b4..8817e72a32 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/inference_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/completion_spec.rb @@ -17,20 +17,20 @@ require 'spec_helper' -describe 'client#inference.inference' do +describe 'client#inference.completion' do let(:expected_args) do [ 'POST', - '_inference/foo/bar', + '_inference/completion/bar', {}, nil, {}, - { defined_params: { inference_id: 'bar', task_type: 'foo' }, - endpoint: 'inference.inference' } + { defined_params: { inference_id: 'bar' }, + endpoint: 'inference.completion' } ] end it 'performs the request' do - expect(client_double.inference.inference(task_type: 'foo', inference_id: 'bar')).to be_a Elasticsearch::API::Response + expect(client_double.inference.completion(inference_id: 'bar')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/rerank_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/rerank_spec.rb new file mode 100644 index 0000000000..7417cd74fa --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/rerank_spec.rb @@ -0,0 +1,35 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +require 'spec_helper' + +describe 'client#inference.rerank' do + let(:expected_args) do + [ + 'POST', + '_inference/rerank/foo', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.rerank' } + ] + end + + it 'performs the request' do + expect(client_double.inference.rerank(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/sparse_embedding_spec.rb similarity index 85% rename from elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb rename to elasticsearch-api/spec/elasticsearch/api/actions/inference/sparse_embedding_spec.rb index 191ad643d5..856dface5a 100644 --- a/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_inference_spec.rb +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/sparse_embedding_spec.rb @@ -17,19 +17,19 @@ require 'spec_helper' -describe 'client#inference.stream_inference' do +describe 'client#inference.sparse_embedding' do let(:expected_args) do [ 'POST', - '_inference/foo/_stream', + '_inference/sparse_embedding/foo', {}, nil, {}, - { defined_params: { inference_id: 'foo' }, endpoint: 'inference.stream_inference' } + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.sparse_embedding' } ] end it 'performs the request' do - expect(client_double.inference.stream_inference(inference_id: 'foo')).to be_a Elasticsearch::API::Response + expect(client_double.inference.sparse_embedding(inference_id: 'foo')).to be_a Elasticsearch::API::Response end end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_completion_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_completion_spec.rb new file mode 100644 index 0000000000..542b1d9941 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/stream_completion_spec.rb @@ -0,0 +1,35 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +require 'spec_helper' + +describe 'client#inference.stream_completion' do + let(:expected_args) do + [ + 'POST', + '_inference/completion/foo/_stream', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.stream_completion' } + ] + end + + it 'performs the request' do + expect(client_double.inference.stream_completion(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/elasticsearch/api/actions/inference/text_embedding_spec.rb b/elasticsearch-api/spec/elasticsearch/api/actions/inference/text_embedding_spec.rb new file mode 100644 index 0000000000..e97fda5865 --- /dev/null +++ b/elasticsearch-api/spec/elasticsearch/api/actions/inference/text_embedding_spec.rb @@ -0,0 +1,35 @@ +# Licensed to Elasticsearch B.V. under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Elasticsearch B.V. licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +require 'spec_helper' + +describe 'client#inference.text_embedding' do + let(:expected_args) do + [ + 'POST', + '_inference/text_embedding/foo', + {}, + nil, + {}, + { defined_params: { inference_id: 'foo' }, endpoint: 'inference.text_embedding' } + ] + end + + it 'performs the request' do + expect(client_double.inference.text_embedding(inference_id: 'foo')).to be_a Elasticsearch::API::Response + end +end diff --git a/elasticsearch-api/spec/yaml-test-runner/run.rb b/elasticsearch-api/spec/yaml-test-runner/run.rb index c25c3a71c3..f477f3d56a 100644 --- a/elasticsearch-api/spec/yaml-test-runner/run.rb +++ b/elasticsearch-api/spec/yaml-test-runner/run.rb @@ -64,4 +64,7 @@ current_branch = `git rev-parse --abbrev-ref HEAD`.strip branch = current_branch.match(/[0-9]\.[0-9]+/)&.[](0) || ENV['ES_YAML_TESTS_BRANCH'] || nil Elasticsearch::Tests::Downloader::run(tests_path, branch) -Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger).run + +runner = Elasticsearch::Tests::TestRunner.new(CLIENT, tests_path, logger) +runner.add_tests_to_skip('inference/10_basic.yml') # TODO: Extract into file +runner.run