elasticsearch-api 8.17.2 → 8.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/elasticsearch/api/actions/bulk.rb +1 -0
  3. data/lib/elasticsearch/api/actions/cat/help.rb +1 -3
  4. data/lib/elasticsearch/api/actions/cat/segments.rb +2 -0
  5. data/lib/elasticsearch/api/actions/cat/tasks.rb +2 -0
  6. data/lib/elasticsearch/api/actions/create.rb +1 -0
  7. data/lib/elasticsearch/api/actions/eql/search.rb +2 -0
  8. data/lib/elasticsearch/api/actions/esql/async_query_stop.rb +60 -0
  9. data/lib/elasticsearch/api/actions/index.rb +1 -0
  10. data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +1 -3
  11. data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +0 -1
  12. data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +1 -3
  13. data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +1 -3
  14. data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +1 -3
  15. data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +1 -3
  16. data/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +11 -8
  17. data/lib/elasticsearch/api/actions/indices/rollover.rb +0 -1
  18. data/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +61 -0
  19. data/lib/elasticsearch/api/actions/inference/completion.rb +61 -0
  20. data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +69 -0
  21. data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +69 -0
  22. data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +69 -0
  23. data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +69 -0
  24. data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +69 -0
  25. data/lib/elasticsearch/api/actions/inference/put_cohere.rb +65 -0
  26. data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +69 -0
  27. data/lib/elasticsearch/api/actions/inference/put_elser.rb +65 -0
  28. data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +69 -0
  29. data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +69 -0
  30. data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +69 -0
  31. data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +65 -0
  32. data/lib/elasticsearch/api/actions/inference/put_mistral.rb +69 -0
  33. data/lib/elasticsearch/api/actions/inference/put_openai.rb +65 -0
  34. data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +69 -0
  35. data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +69 -0
  36. data/lib/elasticsearch/api/actions/inference/rerank.rb +61 -0
  37. data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +61 -0
  38. data/lib/elasticsearch/api/actions/inference/{stream_inference.rb → stream_completion.rb} +5 -12
  39. data/lib/elasticsearch/api/actions/inference/text_embedding.rb +61 -0
  40. data/lib/elasticsearch/api/actions/inference/update.rb +1 -1
  41. data/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +1 -3
  42. data/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +1 -3
  43. data/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +1 -3
  44. data/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +1 -3
  45. data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +2 -1
  46. data/lib/elasticsearch/api/actions/update.rb +1 -0
  47. data/lib/elasticsearch/api/version.rb +1 -1
  48. data/spec/elasticsearch/api/actions/esql/async_query_stop_spec.rb +35 -0
  49. data/spec/elasticsearch/api/actions/indices/resolve_cluster_spec.rb +14 -9
  50. data/spec/elasticsearch/api/actions/inference/chat_completion_unified_spec.rb +36 -0
  51. data/spec/elasticsearch/api/actions/inference/completion_spec.rb +36 -0
  52. data/spec/elasticsearch/api/actions/inference/put_alibabacloud_spec.rb +36 -0
  53. data/spec/elasticsearch/api/actions/inference/put_amazonbedrock_spec.rb +36 -0
  54. data/spec/elasticsearch/api/actions/inference/put_anthropic_spec.rb +36 -0
  55. data/spec/elasticsearch/api/actions/inference/put_azureaistudio_spec.rb +36 -0
  56. data/spec/elasticsearch/api/actions/inference/put_azureopenai_spec.rb +36 -0
  57. data/spec/elasticsearch/api/actions/inference/put_cohere_spec.rb +36 -0
  58. data/spec/elasticsearch/api/actions/inference/put_elasticsearch_spec.rb +36 -0
  59. data/spec/elasticsearch/api/actions/inference/put_elser_spec.rb +36 -0
  60. data/spec/elasticsearch/api/actions/inference/put_googleaistudio_spec.rb +36 -0
  61. data/spec/elasticsearch/api/actions/inference/put_googlevertexai_spec.rb +36 -0
  62. data/spec/elasticsearch/api/actions/inference/put_huggingface_spec.rb +36 -0
  63. data/spec/elasticsearch/api/actions/inference/put_jinaai_spec.rb +36 -0
  64. data/spec/elasticsearch/api/actions/inference/put_mistral_spec.rb +36 -0
  65. data/spec/elasticsearch/api/actions/inference/put_openai_spec.rb +36 -0
  66. data/spec/elasticsearch/api/actions/inference/put_voyageai_spec.rb +36 -0
  67. data/spec/elasticsearch/api/actions/inference/put_watsonx_spec.rb +36 -0
  68. data/spec/elasticsearch/api/actions/inference/rerank_spec.rb +35 -0
  69. data/spec/elasticsearch/api/actions/inference/{stream_inference_spec.rb → sparse_embedding_spec.rb} +4 -4
  70. data/spec/elasticsearch/api/actions/inference/stream_completion_spec.rb +35 -0
  71. data/spec/elasticsearch/api/actions/inference/text_embedding_spec.rb +35 -0
  72. data/spec/elasticsearch/api/actions/inference/update_spec.rb +1 -1
  73. data/spec/elasticsearch/api/actions/ingest/delete_geoip_database_spec.rb +1 -1
  74. data/spec/elasticsearch/api/actions/ingest/delete_ip_location_database_spec.rb +1 -1
  75. data/spec/rest_api/skipped_tests_free.yml +15 -0
  76. data/spec/rest_api/skipped_tests_platinum.yml +13 -0
  77. data/spec/unit/actions/async_search/delete_spec.rb +35 -0
  78. data/spec/unit/actions/async_search/get_spec.rb +35 -0
  79. data/spec/unit/actions/async_search/status_spec.rb +34 -0
  80. data/spec/unit/actions/async_search/submit_spec.rb +87 -0
  81. data/spec/yaml-test-runner/run.rb +4 -1
  82. metadata +79 -5
@@ -17,16 +17,15 @@
17
17
 
18
18
  require 'spec_helper'
19
19
 
20
- describe 'client.indices#delete_alias' do
21
-
20
+ describe 'client.indices#resolve_cluster' do
22
21
  let(:expected_args) do
23
22
  [
24
23
  'GET',
25
- '_resolve/cluster/foo',
24
+ path,
26
25
  {},
27
26
  nil,
28
27
  {},
29
- { defined_params: { name: 'foo'}, endpoint: 'indices.resolve_cluster' }
28
+ otel
30
29
  ]
31
30
  end
32
31
 
@@ -34,16 +33,22 @@ describe 'client.indices#delete_alias' do
34
33
  let(:client) do
35
34
  Class.new { include Elasticsearch::API }.new
36
35
  end
36
+ let(:path) { '_resolve/cluster' }
37
+ let(:otel) do
38
+ { endpoint: 'indices.resolve_cluster' }
39
+ end
37
40
 
38
- it 'raises an exception' do
39
- expect {
40
- client.indices.resolve_cluster
41
- }.to raise_exception(ArgumentError)
41
+ it 'performs the request' do
42
+ expect(client_double.indices.resolve_cluster).to be_a Elasticsearch::API::Response
42
43
  end
43
44
  end
44
45
 
45
-
46
46
  context 'when name is specified' do
47
+ let(:path) { '_resolve/cluster/foo' }
48
+ let(:otel) do
49
+ { defined_params: { name: 'foo' }, endpoint: 'indices.resolve_cluster' }
50
+ end
51
+
47
52
  it 'performs the request' do
48
53
  expect(client_double.indices.resolve_cluster(name: 'foo')).to be_a Elasticsearch::API::Response
49
54
  end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.chat_completion_unified' do
21
+ let(:expected_args) do
22
+ [
23
+ 'POST',
24
+ '_inference/chat_completion/bar/_stream',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { inference_id: 'bar' },
29
+ endpoint: 'inference.chat_completion_unified' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.chat_completion_unified(inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.completion' do
21
+ let(:expected_args) do
22
+ [
23
+ 'POST',
24
+ '_inference/completion/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { inference_id: 'bar' },
29
+ endpoint: 'inference.completion' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.completion(inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_alibabacloud' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { alibabacloud_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_alibabacloud' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_alibabacloud(task_type: 'foo', alibabacloud_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_amazonbedrock' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { amazonbedrock_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_amazonbedrock' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_amazonbedrock(task_type: 'foo', amazonbedrock_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_anthropic' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { anthropic_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_anthropic' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_anthropic(task_type: 'foo', anthropic_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_azureaistudio' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { azureaistudio_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_azureaistudio' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_azureaistudio(task_type: 'foo', azureaistudio_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_azureopenai' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { azureopenai_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_azureopenai' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_azureopenai(task_type: 'foo', azureopenai_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_cohere' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { cohere_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_cohere' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_cohere(task_type: 'foo', cohere_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_elasticsearch' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { elasticsearch_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_elasticsearch' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_elasticsearch(task_type: 'foo', elasticsearch_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_elser' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { elser_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_elser' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_elser(task_type: 'foo', elser_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_googleaistudio' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { googleaistudio_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_googleaistudio' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_googleaistudio(task_type: 'foo', googleaistudio_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_googlevertexai' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { googlevertexai_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_googlevertexai' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_googlevertexai(task_type: 'foo', googlevertexai_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_hugging_face' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { huggingface_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_hugging_face' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_hugging_face(task_type: 'foo', huggingface_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_jinaai' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { jinaai_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_jinaai' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_jinaai(task_type: 'foo', jinaai_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_mistral' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { mistral_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_mistral' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_mistral(task_type: 'foo', mistral_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_openai' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { openai_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_openai' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_openai(task_type: 'foo', openai_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # Licensed to Elasticsearch B.V. under one or more contributor
2
+ # license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright
4
+ # ownership. Elasticsearch B.V. licenses this file to you under
5
+ # the Apache License, Version 2.0 (the "License"); you may
6
+ # not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ require 'spec_helper'
19
+
20
+ describe 'client#inference.put_voyageai' do
21
+ let(:expected_args) do
22
+ [
23
+ 'PUT',
24
+ '_inference/foo/bar',
25
+ {},
26
+ nil,
27
+ {},
28
+ { defined_params: { voyageai_inference_id: 'bar', task_type: 'foo' },
29
+ endpoint: 'inference.put_voyageai' }
30
+ ]
31
+ end
32
+
33
+ it 'performs the request' do
34
+ expect(client_double.inference.put_voyageai(task_type: 'foo', voyageai_inference_id: 'bar')).to be_a Elasticsearch::API::Response
35
+ end
36
+ end