elasticsearch-api 9.1.3 → 9.2.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.
- checksums.yaml +4 -4
- data/lib/elasticsearch/api/actions/async_search/submit.rb +8 -0
- data/lib/elasticsearch/api/actions/cat/count.rb +8 -0
- data/lib/elasticsearch/api/actions/cat/nodes.rb +1 -1
- data/lib/elasticsearch/api/actions/cat/segments.rb +0 -10
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +2 -0
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +5 -0
- data/lib/elasticsearch/api/actions/cluster/state.rb +1 -1
- data/lib/elasticsearch/api/actions/count.rb +10 -2
- data/lib/elasticsearch/api/actions/delete_by_query.rb +2 -2
- data/lib/elasticsearch/api/actions/eql/search.rb +8 -0
- data/lib/elasticsearch/api/actions/explain.rb +2 -2
- data/lib/elasticsearch/api/actions/field_caps.rb +8 -0
- data/lib/elasticsearch/api/actions/fleet/search.rb +2 -6
- data/lib/elasticsearch/api/actions/get.rb +1 -0
- data/lib/elasticsearch/api/actions/graph/explore.rb +2 -6
- data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +1 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/analyze.rb +3 -6
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/get_data_stream_mappings.rb +75 -0
- data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/put_data_stream_mappings.rb +84 -0
- data/lib/elasticsearch/api/actions/indices/put_data_stream_options.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +9 -0
- data/lib/elasticsearch/api/actions/indices/rollover.rb +1 -1
- data/lib/elasticsearch/api/actions/indices/shrink.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/split.rb +1 -0
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +1 -1
- data/lib/elasticsearch/api/actions/inference/completion.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/inference.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put.rb +2 -1
- data/lib/elasticsearch/api/actions/inference/put_ai21.rb +79 -0
- data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_amazonsagemaker.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_cohere.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_contextualai.rb +84 -0
- data/lib/elasticsearch/api/actions/inference/put_custom.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_deepseek.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_elser.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_llama.rb +79 -0
- data/lib/elasticsearch/api/actions/inference/put_mistral.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_openai.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/rerank.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/stream_completion.rb +1 -0
- data/lib/elasticsearch/api/actions/inference/text_embedding.rb +1 -0
- data/lib/elasticsearch/api/actions/license/get.rb +3 -1
- data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +1 -1
- data/lib/elasticsearch/api/actions/msearch.rb +7 -0
- data/lib/elasticsearch/api/actions/msearch_template.rb +8 -0
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +8 -0
- data/lib/elasticsearch/api/actions/project/tags.rb +65 -0
- data/lib/elasticsearch/api/actions/render_search_template.rb +3 -6
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +3 -6
- data/lib/elasticsearch/api/actions/search.rb +11 -2
- data/lib/elasticsearch/api/actions/search_mvt.rb +8 -0
- data/lib/elasticsearch/api/actions/search_template.rb +8 -0
- data/lib/elasticsearch/api/actions/security/get_stats.rb +62 -0
- data/lib/elasticsearch/api/actions/simulate/ingest.rb +4 -0
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +17 -10
- data/lib/elasticsearch/api/actions/snapshot/status.rb +5 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +1 -0
- data/lib/elasticsearch/api/actions/sql/query.rb +8 -0
- data/lib/elasticsearch/api/actions/streams/status.rb +1 -1
- data/lib/elasticsearch/api/actions/terms_enum.rb +2 -6
- data/lib/elasticsearch/api/actions/update_by_query.rb +2 -2
- data/lib/elasticsearch/api/version.rb +2 -2
- data/lib/elasticsearch/api.rb +1 -0
- metadata +8 -1
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
# This code was automatically generated from the Elasticsearch Specification
|
|
19
|
+
# See https://github.com/elastic/elasticsearch-specification
|
|
20
|
+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
|
|
21
|
+
module Elasticsearch
|
|
22
|
+
module API
|
|
23
|
+
module Inference
|
|
24
|
+
module Actions
|
|
25
|
+
# Create a AI21 inference endpoint.
|
|
26
|
+
# Create an inference endpoint to perform an inference task with the `ai21` service.
|
|
27
|
+
#
|
|
28
|
+
# @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
|
|
29
|
+
# @option arguments [String] :ai21_inference_id The unique identifier of the inference endpoint. (*Required*)
|
|
30
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
|
|
31
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
32
|
+
# when they occur.
|
|
33
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
34
|
+
# returned by Elasticsearch.
|
|
35
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
36
|
+
# For example `"exists_time": "1h"` for humans and
|
|
37
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
38
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
39
|
+
# only by machines.
|
|
40
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
41
|
+
# this option for debugging only.
|
|
42
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
|
43
|
+
# @option arguments [Hash] :body request body
|
|
44
|
+
#
|
|
45
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-ai21
|
|
46
|
+
#
|
|
47
|
+
def put_ai21(arguments = {})
|
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_ai21' }
|
|
49
|
+
|
|
50
|
+
defined_params = [:task_type, :ai21_inference_id].each_with_object({}) do |variable, set_variables|
|
|
51
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
|
52
|
+
end
|
|
53
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
|
+
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
|
+
raise ArgumentError, "Required argument 'ai21_inference_id' missing" unless arguments[:ai21_inference_id]
|
|
58
|
+
|
|
59
|
+
arguments = arguments.clone
|
|
60
|
+
headers = arguments.delete(:headers) || {}
|
|
61
|
+
|
|
62
|
+
body = arguments.delete(:body)
|
|
63
|
+
|
|
64
|
+
_task_type = arguments.delete(:task_type)
|
|
65
|
+
|
|
66
|
+
_ai21_inference_id = arguments.delete(:ai21_inference_id)
|
|
67
|
+
|
|
68
|
+
method = Elasticsearch::API::HTTP_PUT
|
|
69
|
+
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_ai21_inference_id)}"
|
|
70
|
+
params = Utils.process_params(arguments)
|
|
71
|
+
|
|
72
|
+
Elasticsearch::API::Response.new(
|
|
73
|
+
perform_request(method, path, params, body, headers, request_opts)
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:alibabacloud_inference_id]
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:amazonbedrock_inference_id]
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:amazonsagemaker_inference_id]
|
|
@@ -53,6 +53,7 @@ module Elasticsearch
|
|
|
53
53
|
end
|
|
54
54
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
55
55
|
|
|
56
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
57
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
58
|
|
|
58
59
|
unless arguments[:anthropic_inference_id]
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:azureaistudio_inference_id]
|
|
@@ -57,6 +57,7 @@ module Elasticsearch
|
|
|
57
57
|
end
|
|
58
58
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
59
59
|
|
|
60
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
60
61
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
61
62
|
|
|
62
63
|
unless arguments[:azureopenai_inference_id]
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:cohere_inference_id]
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
# This code was automatically generated from the Elasticsearch Specification
|
|
19
|
+
# See https://github.com/elastic/elasticsearch-specification
|
|
20
|
+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
|
|
21
|
+
module Elasticsearch
|
|
22
|
+
module API
|
|
23
|
+
module Inference
|
|
24
|
+
module Actions
|
|
25
|
+
# Create an Contextual AI inference endpoint.
|
|
26
|
+
# Create an inference endpoint to perform an inference task with the `contexualai` service.
|
|
27
|
+
# To review the available `rerank` models, refer to <https://docs.contextual.ai/api-reference/rerank/rerank#body-model>.
|
|
28
|
+
#
|
|
29
|
+
# @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
|
|
30
|
+
# @option arguments [String] :contextualai_inference_id The unique identifier of the inference endpoint. (*Required*)
|
|
31
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
|
|
32
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
33
|
+
# when they occur.
|
|
34
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
35
|
+
# returned by Elasticsearch.
|
|
36
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
37
|
+
# For example `"exists_time": "1h"` for humans and
|
|
38
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
39
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
40
|
+
# only by machines.
|
|
41
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
42
|
+
# this option for debugging only.
|
|
43
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
|
44
|
+
# @option arguments [Hash] :body request body
|
|
45
|
+
#
|
|
46
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-contextualai
|
|
47
|
+
#
|
|
48
|
+
def put_contextualai(arguments = {})
|
|
49
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_contextualai' }
|
|
50
|
+
|
|
51
|
+
defined_params = [:task_type, :contextualai_inference_id].each_with_object({}) do |variable, set_variables|
|
|
52
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
|
53
|
+
end
|
|
54
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
55
|
+
|
|
56
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
57
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
58
|
+
|
|
59
|
+
unless arguments[:contextualai_inference_id]
|
|
60
|
+
raise ArgumentError,
|
|
61
|
+
"Required argument 'contextualai_inference_id' missing"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
arguments = arguments.clone
|
|
65
|
+
headers = arguments.delete(:headers) || {}
|
|
66
|
+
|
|
67
|
+
body = arguments.delete(:body)
|
|
68
|
+
|
|
69
|
+
_task_type = arguments.delete(:task_type)
|
|
70
|
+
|
|
71
|
+
_contextualai_inference_id = arguments.delete(:contextualai_inference_id)
|
|
72
|
+
|
|
73
|
+
method = Elasticsearch::API::HTTP_PUT
|
|
74
|
+
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_contextualai_inference_id)}"
|
|
75
|
+
params = Utils.process_params(arguments)
|
|
76
|
+
|
|
77
|
+
Elasticsearch::API::Response.new(
|
|
78
|
+
perform_request(method, path, params, body, headers, request_opts)
|
|
79
|
+
)
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -82,6 +82,7 @@ module Elasticsearch
|
|
|
82
82
|
end
|
|
83
83
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
84
84
|
|
|
85
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
85
86
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
86
87
|
|
|
87
88
|
unless arguments[:custom_inference_id]
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:deepseek_inference_id]
|
|
@@ -53,6 +53,7 @@ module Elasticsearch
|
|
|
53
53
|
end
|
|
54
54
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
55
55
|
|
|
56
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
57
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
58
|
|
|
58
59
|
unless arguments[:elasticsearch_inference_id]
|
|
@@ -53,6 +53,7 @@ module Elasticsearch
|
|
|
53
53
|
end
|
|
54
54
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
55
55
|
|
|
56
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
57
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
58
|
raise ArgumentError, "Required argument 'elser_inference_id' missing" unless arguments[:elser_inference_id]
|
|
58
59
|
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:googleaistudio_inference_id]
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:googlevertexai_inference_id]
|
|
@@ -80,6 +80,7 @@ module Elasticsearch
|
|
|
80
80
|
end
|
|
81
81
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
82
82
|
|
|
83
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
83
84
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
84
85
|
|
|
85
86
|
unless arguments[:huggingface_inference_id]
|
|
@@ -54,6 +54,7 @@ module Elasticsearch
|
|
|
54
54
|
end
|
|
55
55
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
56
56
|
|
|
57
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
57
58
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
58
59
|
|
|
59
60
|
unless arguments[:jinaai_inference_id]
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
# This code was automatically generated from the Elasticsearch Specification
|
|
19
|
+
# See https://github.com/elastic/elasticsearch-specification
|
|
20
|
+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
|
|
21
|
+
module Elasticsearch
|
|
22
|
+
module API
|
|
23
|
+
module Inference
|
|
24
|
+
module Actions
|
|
25
|
+
# Create a Llama inference endpoint.
|
|
26
|
+
# Create an inference endpoint to perform an inference task with the `llama` service.
|
|
27
|
+
#
|
|
28
|
+
# @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
|
|
29
|
+
# @option arguments [String] :llama_inference_id The unique identifier of the inference endpoint. (*Required*)
|
|
30
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
|
|
31
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
32
|
+
# when they occur.
|
|
33
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
34
|
+
# returned by Elasticsearch.
|
|
35
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
36
|
+
# For example `"exists_time": "1h"` for humans and
|
|
37
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
38
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
39
|
+
# only by machines.
|
|
40
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
41
|
+
# this option for debugging only.
|
|
42
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
|
43
|
+
# @option arguments [Hash] :body request body
|
|
44
|
+
#
|
|
45
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-llama
|
|
46
|
+
#
|
|
47
|
+
def put_llama(arguments = {})
|
|
48
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_llama' }
|
|
49
|
+
|
|
50
|
+
defined_params = [:task_type, :llama_inference_id].each_with_object({}) do |variable, set_variables|
|
|
51
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
|
52
|
+
end
|
|
53
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
|
+
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
|
+
raise ArgumentError, "Required argument 'llama_inference_id' missing" unless arguments[:llama_inference_id]
|
|
58
|
+
|
|
59
|
+
arguments = arguments.clone
|
|
60
|
+
headers = arguments.delete(:headers) || {}
|
|
61
|
+
|
|
62
|
+
body = arguments.delete(:body)
|
|
63
|
+
|
|
64
|
+
_task_type = arguments.delete(:task_type)
|
|
65
|
+
|
|
66
|
+
_llama_inference_id = arguments.delete(:llama_inference_id)
|
|
67
|
+
|
|
68
|
+
method = Elasticsearch::API::HTTP_PUT
|
|
69
|
+
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_llama_inference_id)}"
|
|
70
|
+
params = Utils.process_params(arguments)
|
|
71
|
+
|
|
72
|
+
Elasticsearch::API::Response.new(
|
|
73
|
+
perform_request(method, path, params, body, headers, request_opts)
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -52,6 +52,7 @@ module Elasticsearch
|
|
|
52
52
|
end
|
|
53
53
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
54
54
|
|
|
55
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
56
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
56
57
|
|
|
57
58
|
unless arguments[:mistral_inference_id]
|
|
@@ -53,6 +53,7 @@ module Elasticsearch
|
|
|
53
53
|
end
|
|
54
54
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
55
55
|
|
|
56
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
57
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
58
|
|
|
58
59
|
unless arguments[:openai_inference_id]
|
|
@@ -53,6 +53,7 @@ module Elasticsearch
|
|
|
53
53
|
end
|
|
54
54
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
55
55
|
|
|
56
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
56
57
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
57
58
|
|
|
58
59
|
unless arguments[:voyageai_inference_id]
|
|
@@ -54,6 +54,7 @@ module Elasticsearch
|
|
|
54
54
|
end
|
|
55
55
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
56
56
|
|
|
57
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
57
58
|
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
|
58
59
|
|
|
59
60
|
unless arguments[:watsonx_inference_id]
|
|
@@ -50,6 +50,7 @@ module Elasticsearch
|
|
|
50
50
|
end
|
|
51
51
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
52
52
|
|
|
53
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
53
54
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
|
54
55
|
|
|
55
56
|
arguments = arguments.clone
|
|
@@ -50,6 +50,7 @@ module Elasticsearch
|
|
|
50
50
|
end
|
|
51
51
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
52
52
|
|
|
53
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
53
54
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
|
54
55
|
|
|
55
56
|
arguments = arguments.clone
|
|
@@ -54,6 +54,7 @@ module Elasticsearch
|
|
|
54
54
|
end
|
|
55
55
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
56
56
|
|
|
57
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
57
58
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
|
58
59
|
|
|
59
60
|
arguments = arguments.clone
|
|
@@ -50,6 +50,7 @@ module Elasticsearch
|
|
|
50
50
|
end
|
|
51
51
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
52
52
|
|
|
53
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
53
54
|
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
|
54
55
|
|
|
55
56
|
arguments = arguments.clone
|
|
@@ -27,7 +27,9 @@ module Elasticsearch
|
|
|
27
27
|
#
|
|
28
28
|
# @option arguments [Boolean] :accept_enterprise If `true`, this parameter returns enterprise for Enterprise license types. If `false`, this parameter returns platinum for both platinum and enterprise license types. This behavior is maintained for backwards compatibility.
|
|
29
29
|
# This parameter is deprecated and will always be set to true in 8.x. Server default: true.
|
|
30
|
-
# @option arguments [Boolean] :local Specifies whether to retrieve local information.
|
|
30
|
+
# @option arguments [Boolean] :local Specifies whether to retrieve local information.
|
|
31
|
+
# From 9.2 onwards the default value is `true`, which means the information is retrieved from the responding node.
|
|
32
|
+
# In earlier versions the default is `false`, which means the information is retrieved from the elected master node. Server default: true.
|
|
31
33
|
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
32
34
|
# when they occur.
|
|
33
35
|
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
@@ -59,7 +59,7 @@ module Elasticsearch
|
|
|
59
59
|
# the optional `bucket_span` parameter.
|
|
60
60
|
# @option arguments [String, Time] :end Returns overall buckets with timestamps earlier than this time.
|
|
61
61
|
# @option arguments [Boolean] :exclude_interim If `true`, the output excludes interim results.
|
|
62
|
-
# @option arguments [Float
|
|
62
|
+
# @option arguments [Float] :overall_score Returns overall buckets with overall scores greater than or equal to this
|
|
63
63
|
# value.
|
|
64
64
|
# @option arguments [String, Time] :start Returns overall buckets with timestamps after this time.
|
|
65
65
|
# @option arguments [Integer] :top_n The number of top anomaly detection job bucket scores to be used in the
|
|
@@ -57,6 +57,13 @@ module Elasticsearch
|
|
|
57
57
|
# Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.
|
|
58
58
|
# @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5.
|
|
59
59
|
# @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
|
|
60
|
+
# @option arguments [String] :project_routing Specifies a subset of projects to target for a search using project metadata
|
|
61
|
+
# tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag
|
|
62
|
+
# and a single value (possible wildcarded). Examples:
|
|
63
|
+
# _alias:my-project
|
|
64
|
+
# _alias:_origin
|
|
65
|
+
# _alias:*pr*
|
|
66
|
+
# Supported in serverless only.
|
|
60
67
|
# @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
|
|
61
68
|
# @option arguments [String] :routing Custom routing value used to route search operations to a specific shard.
|
|
62
69
|
# @option arguments [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents.
|
|
@@ -40,6 +40,14 @@ module Elasticsearch
|
|
|
40
40
|
# To search all data streams and indices, omit this parameter or use `*`.
|
|
41
41
|
# @option arguments [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips are minimized for cross-cluster search requests. Server default: true.
|
|
42
42
|
# @option arguments [Integer] :max_concurrent_searches The maximum number of concurrent searches the API can run.
|
|
43
|
+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
|
|
44
|
+
# metadata tags in a subset of Lucene query syntax.
|
|
45
|
+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
|
|
46
|
+
# Examples:
|
|
47
|
+
# _alias:my-project
|
|
48
|
+
# _alias:_origin
|
|
49
|
+
# _alias:*pr*
|
|
50
|
+
# Supported in serverless only.
|
|
43
51
|
# @option arguments [String] :search_type The type of the search operation.
|
|
44
52
|
# @option arguments [Boolean] :rest_total_hits_as_int If `true`, the response returns `hits.total` as an integer.
|
|
45
53
|
# If `false`, it returns `hits.total` as an object.
|
|
@@ -53,6 +53,14 @@ module Elasticsearch
|
|
|
53
53
|
# @option arguments [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index.
|
|
54
54
|
# @option arguments [String] :preference The node or shard the operation should be performed on.
|
|
55
55
|
# By default, it is random.
|
|
56
|
+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the PIT request using project
|
|
57
|
+
# metadata tags in a subset of Lucene query syntax.
|
|
58
|
+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
|
|
59
|
+
# Examples:
|
|
60
|
+
# _alias:my-project
|
|
61
|
+
# _alias:_origin
|
|
62
|
+
# _alias:*pr*
|
|
63
|
+
# Supported in serverless only.
|
|
56
64
|
# @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
|
|
57
65
|
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
|
|
58
66
|
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
# This code was automatically generated from the Elasticsearch Specification
|
|
19
|
+
# See https://github.com/elastic/elasticsearch-specification
|
|
20
|
+
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
|
|
21
|
+
module Elasticsearch
|
|
22
|
+
module API
|
|
23
|
+
module Project
|
|
24
|
+
module Actions
|
|
25
|
+
# Return tags defined for the project
|
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
|
29
|
+
# support SLA of official GA features.
|
|
30
|
+
#
|
|
31
|
+
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
|
|
32
|
+
# when they occur.
|
|
33
|
+
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
|
|
34
|
+
# returned by Elasticsearch.
|
|
35
|
+
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
|
|
36
|
+
# For example `"exists_time": "1h"` for humans and
|
|
37
|
+
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
|
|
38
|
+
# readable values will be omitted. This makes sense for responses being consumed
|
|
39
|
+
# only by machines.
|
|
40
|
+
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
|
|
41
|
+
# this option for debugging only.
|
|
42
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
|
43
|
+
#
|
|
44
|
+
# @see
|
|
45
|
+
#
|
|
46
|
+
def tags(arguments = {})
|
|
47
|
+
request_opts = { endpoint: arguments[:endpoint] || 'project.tags' }
|
|
48
|
+
|
|
49
|
+
arguments = arguments.clone
|
|
50
|
+
headers = arguments.delete(:headers) || {}
|
|
51
|
+
|
|
52
|
+
body = nil
|
|
53
|
+
|
|
54
|
+
method = Elasticsearch::API::HTTP_GET
|
|
55
|
+
path = '_project/tags'
|
|
56
|
+
params = Utils.process_params(arguments)
|
|
57
|
+
|
|
58
|
+
Elasticsearch::API::Response.new(
|
|
59
|
+
perform_request(method, path, params, body, headers, request_opts)
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -50,6 +50,8 @@ module Elasticsearch
|
|
|
50
50
|
end
|
|
51
51
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
|
52
52
|
|
|
53
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
54
|
+
|
|
53
55
|
arguments = arguments.clone
|
|
54
56
|
headers = arguments.delete(:headers) || {}
|
|
55
57
|
|
|
@@ -57,12 +59,7 @@ module Elasticsearch
|
|
|
57
59
|
|
|
58
60
|
_id = arguments.delete(:id)
|
|
59
61
|
|
|
60
|
-
method =
|
|
61
|
-
Elasticsearch::API::HTTP_POST
|
|
62
|
-
else
|
|
63
|
-
Elasticsearch::API::HTTP_GET
|
|
64
|
-
end
|
|
65
|
-
|
|
62
|
+
method = Elasticsearch::API::HTTP_POST
|
|
66
63
|
path = if _id
|
|
67
64
|
"_render/template/#{Utils.listify(_id)}"
|
|
68
65
|
else
|
|
@@ -51,17 +51,14 @@ module Elasticsearch
|
|
|
51
51
|
def scripts_painless_execute(arguments = {})
|
|
52
52
|
request_opts = { endpoint: arguments[:endpoint] || 'scripts_painless_execute' }
|
|
53
53
|
|
|
54
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
|
55
|
+
|
|
54
56
|
arguments = arguments.clone
|
|
55
57
|
headers = arguments.delete(:headers) || {}
|
|
56
58
|
|
|
57
59
|
body = arguments.delete(:body)
|
|
58
60
|
|
|
59
|
-
method =
|
|
60
|
-
Elasticsearch::API::HTTP_POST
|
|
61
|
-
else
|
|
62
|
-
Elasticsearch::API::HTTP_GET
|
|
63
|
-
end
|
|
64
|
-
|
|
61
|
+
method = Elasticsearch::API::HTTP_POST
|
|
65
62
|
path = '_scripts/painless/_execute'
|
|
66
63
|
params = Utils.process_params(arguments)
|
|
67
64
|
|