elasticsearch-serverless 0.6.0 → 0.7.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-serverless/api/async_search/delete.rb +3 -4
- data/lib/elasticsearch-serverless/api/async_search/get.rb +4 -5
- data/lib/elasticsearch-serverless/api/async_search/status.rb +7 -6
- data/lib/elasticsearch-serverless/api/async_search/submit.rb +5 -7
- data/lib/elasticsearch-serverless/api/bulk.rb +109 -22
- data/lib/elasticsearch-serverless/api/cat/aliases.rb +17 -14
- data/lib/elasticsearch-serverless/api/cat/component_templates.rb +14 -13
- data/lib/elasticsearch-serverless/api/cat/count.rb +13 -14
- data/lib/elasticsearch-serverless/api/cat/help.rb +5 -15
- data/lib/elasticsearch-serverless/api/cat/indices.rb +10 -11
- data/lib/elasticsearch-serverless/api/cat/ml_data_frame_analytics.rb +7 -13
- data/lib/elasticsearch-serverless/api/cat/ml_datafeeds.rb +6 -12
- data/lib/elasticsearch-serverless/api/cat/ml_jobs.rb +6 -12
- data/lib/elasticsearch-serverless/api/cat/ml_trained_models.rb +7 -12
- data/lib/elasticsearch-serverless/api/cat/transforms.rb +6 -12
- data/lib/elasticsearch-serverless/api/clear_scroll.rb +7 -6
- data/lib/elasticsearch-serverless/api/close_point_in_time.rb +3 -3
- data/lib/elasticsearch-serverless/api/cluster/delete_component_template.rb +3 -5
- data/lib/elasticsearch-serverless/api/cluster/exists_component_template.rb +4 -5
- data/lib/elasticsearch-serverless/api/cluster/get_component_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/cluster/info.rb +3 -4
- data/lib/elasticsearch-serverless/api/cluster/put_component_template.rb +6 -5
- data/lib/elasticsearch-serverless/api/connector/check_in.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/delete.rb +4 -4
- data/lib/elasticsearch-serverless/api/connector/get.rb +5 -5
- data/lib/elasticsearch-serverless/api/connector/list.rb +4 -3
- data/lib/elasticsearch-serverless/api/connector/post.rb +3 -3
- data/lib/elasticsearch-serverless/api/connector/put.rb +4 -5
- data/lib/elasticsearch-serverless/api/connector/sync_job_cancel.rb +7 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_delete.rb +7 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_get.rb +7 -6
- data/lib/elasticsearch-serverless/api/connector/sync_job_list.rb +3 -3
- data/lib/elasticsearch-serverless/api/connector/sync_job_post.rb +3 -3
- data/lib/elasticsearch-serverless/api/connector/update_active_filtering.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_api_key_id.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_configuration.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_error.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_filtering.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_filtering_validation.rb +2 -3
- data/lib/elasticsearch-serverless/api/connector/update_index_name.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_name.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_native.rb +2 -3
- data/lib/elasticsearch-serverless/api/connector/update_pipeline.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_scheduling.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_service_type.rb +3 -4
- data/lib/elasticsearch-serverless/api/connector/update_status.rb +3 -4
- data/lib/elasticsearch-serverless/api/count.rb +36 -25
- data/lib/elasticsearch-serverless/api/create.rb +77 -22
- data/lib/elasticsearch-serverless/api/delete.rb +44 -18
- data/lib/elasticsearch-serverless/api/delete_by_query.rb +91 -29
- data/lib/elasticsearch-serverless/api/delete_script.rb +10 -9
- data/lib/elasticsearch-serverless/api/enrich/delete_policy.rb +5 -5
- data/lib/elasticsearch-serverless/api/enrich/execute_policy.rb +6 -5
- data/lib/elasticsearch-serverless/api/enrich/get_policy.rb +6 -6
- data/lib/elasticsearch-serverless/api/enrich/put_policy.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/delete.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/get.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/get_status.rb +5 -5
- data/lib/elasticsearch-serverless/api/eql/search.rb +9 -5
- data/lib/elasticsearch-serverless/api/exists.rb +38 -19
- data/lib/elasticsearch-serverless/api/exists_source.rb +23 -18
- data/lib/elasticsearch-serverless/api/explain.rb +25 -16
- data/lib/elasticsearch-serverless/api/field_caps.rb +11 -10
- data/lib/elasticsearch-serverless/api/get.rb +71 -21
- data/lib/elasticsearch-serverless/api/get_script.rb +7 -6
- data/lib/elasticsearch-serverless/api/get_source.rb +25 -15
- data/lib/elasticsearch-serverless/api/graph/explore.rb +9 -5
- data/lib/elasticsearch-serverless/api/index.rb +110 -21
- data/lib/elasticsearch-serverless/api/indices/add_block.rb +23 -12
- data/lib/elasticsearch-serverless/api/indices/analyze.rb +9 -6
- data/lib/elasticsearch-serverless/api/indices/create.rb +19 -6
- data/lib/elasticsearch-serverless/api/indices/create_data_stream.rb +3 -5
- data/lib/elasticsearch-serverless/api/indices/delete.rb +11 -8
- data/lib/elasticsearch-serverless/api/indices/delete_alias.rb +4 -7
- data/lib/elasticsearch-serverless/api/indices/delete_data_stream.rb +3 -4
- data/lib/elasticsearch-serverless/api/indices/delete_index_template.rb +3 -4
- data/lib/elasticsearch-serverless/api/indices/exists.rb +7 -8
- data/lib/elasticsearch-serverless/api/indices/exists_alias.rb +8 -7
- data/lib/elasticsearch-serverless/api/indices/exists_index_template.rb +6 -6
- data/lib/elasticsearch-serverless/api/indices/explain_data_lifecycle.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/get.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/get_alias.rb +6 -5
- data/lib/elasticsearch-serverless/api/indices/get_data_lifecycle.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/get_data_stream.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/get_index_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/get_mapping.rb +4 -6
- data/lib/elasticsearch-serverless/api/indices/get_settings.rb +6 -7
- data/lib/elasticsearch-serverless/api/indices/migrate_to_data_stream.rb +3 -4
- data/lib/elasticsearch-serverless/api/indices/modify_data_stream.rb +3 -3
- data/lib/elasticsearch-serverless/api/indices/put_alias.rb +4 -7
- data/lib/elasticsearch-serverless/api/indices/put_data_lifecycle.rb +4 -6
- data/lib/elasticsearch-serverless/api/indices/put_index_template.rb +22 -4
- data/lib/elasticsearch-serverless/api/indices/put_mapping.rb +21 -6
- data/lib/elasticsearch-serverless/api/indices/put_settings.rb +17 -7
- data/lib/elasticsearch-serverless/api/indices/refresh.rb +11 -5
- data/lib/elasticsearch-serverless/api/indices/resolve_index.rb +5 -5
- data/lib/elasticsearch-serverless/api/indices/rollover.rb +28 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_index_template.rb +4 -5
- data/lib/elasticsearch-serverless/api/indices/simulate_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/indices/update_aliases.rb +3 -3
- data/lib/elasticsearch-serverless/api/indices/validate_query.rb +4 -5
- data/lib/elasticsearch-serverless/api/inference/chat_completion_unified.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/completion.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/delete.rb +6 -7
- data/lib/elasticsearch-serverless/api/inference/get.rb +4 -5
- data/lib/elasticsearch-serverless/api/inference/put.rb +12 -5
- data/lib/elasticsearch-serverless/api/inference/put_watsonx.rb +78 -0
- data/lib/elasticsearch-serverless/api/inference/rerank.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/sparse_embedding.rb +62 -0
- data/lib/elasticsearch-serverless/api/inference/text_embedding.rb +62 -0
- data/lib/elasticsearch-serverless/api/info.rb +4 -4
- data/lib/elasticsearch-serverless/api/ingest/delete_pipeline.rb +5 -5
- data/lib/elasticsearch-serverless/api/ingest/get_pipeline.rb +6 -6
- data/lib/elasticsearch-serverless/api/ingest/processor_grok.rb +5 -4
- data/lib/elasticsearch-serverless/api/ingest/put_pipeline.rb +3 -4
- data/lib/elasticsearch-serverless/api/ingest/simulate.rb +9 -8
- data/lib/elasticsearch-serverless/api/license/get.rb +4 -5
- data/lib/elasticsearch-serverless/api/logstash/delete_pipeline.rb +7 -6
- data/lib/elasticsearch-serverless/api/logstash/get_pipeline.rb +7 -7
- data/lib/elasticsearch-serverless/api/logstash/put_pipeline.rb +7 -6
- data/lib/elasticsearch-serverless/api/machine_learning/close_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_event.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_calendar_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_filter.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model.rb +4 -4
- data/lib/elasticsearch-serverless/api/machine_learning/delete_trained_model_alias.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/estimate_model_memory.rb +5 -5
- data/lib/elasticsearch-serverless/api/machine_learning/evaluate_data_frame.rb +3 -3
- data/lib/elasticsearch-serverless/api/machine_learning/flush_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendar_events.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_calendars.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_data_frame_analytics_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeed_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_datafeeds.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_filters.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_job_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_jobs.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_overall_buckets.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/get_trained_models_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/infer_trained_model.rb +3 -9
- data/lib/elasticsearch-serverless/api/machine_learning/open_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/post_calendar_events.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/preview_data_frame_analytics.rb +5 -6
- data/lib/elasticsearch-serverless/api/machine_learning/preview_datafeed.rb +4 -5
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_calendar_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_data_frame_analytics.rb +6 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_datafeed.rb +6 -6
- data/lib/elasticsearch-serverless/api/machine_learning/put_filter.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_job.rb +16 -5
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_alias.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_definition_part.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/put_trained_model_vocabulary.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/reset_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/start_trained_model_deployment.rb +7 -6
- data/lib/elasticsearch-serverless/api/machine_learning/stop_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/stop_trained_model_deployment.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_data_frame_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_datafeed.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_filter.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_job.rb +3 -4
- data/lib/elasticsearch-serverless/api/machine_learning/update_trained_model_deployment.rb +3 -4
- data/lib/elasticsearch-serverless/api/mget.rb +12 -5
- data/lib/elasticsearch-serverless/api/msearch.rb +16 -17
- data/lib/elasticsearch-serverless/api/msearch_template.rb +22 -15
- data/lib/elasticsearch-serverless/api/mtermvectors.rb +15 -12
- data/lib/elasticsearch-serverless/api/open_point_in_time.rb +29 -12
- data/lib/elasticsearch-serverless/api/ping.rb +8 -10
- data/lib/elasticsearch-serverless/api/put_script.rb +12 -11
- data/lib/elasticsearch-serverless/api/query_rules/delete_rule.rb +6 -5
- data/lib/elasticsearch-serverless/api/query_rules/delete_ruleset.rb +6 -5
- data/lib/elasticsearch-serverless/api/query_rules/get_rule.rb +5 -5
- data/lib/elasticsearch-serverless/api/query_rules/get_ruleset.rb +5 -5
- data/lib/elasticsearch-serverless/api/query_rules/list_rulesets.rb +7 -6
- data/lib/elasticsearch-serverless/api/query_rules/put_rule.rb +11 -7
- data/lib/elasticsearch-serverless/api/query_rules/put_ruleset.rb +11 -6
- data/lib/elasticsearch-serverless/api/query_rules/test.rb +5 -5
- data/lib/elasticsearch-serverless/api/rank_eval.rb +6 -6
- data/lib/elasticsearch-serverless/api/reindex.rb +146 -9
- data/lib/elasticsearch-serverless/api/render_search_template.rb +5 -6
- data/lib/elasticsearch-serverless/api/response.rb +1 -1
- data/lib/elasticsearch-serverless/api/scripts_painless_execute.rb +7 -3
- data/lib/elasticsearch-serverless/api/scroll.rb +4 -4
- data/lib/elasticsearch-serverless/api/search.rb +77 -69
- data/lib/elasticsearch-serverless/api/search_application/delete.rb +4 -5
- data/lib/elasticsearch-serverless/api/search_application/delete_behavioral_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/get.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/get_behavioral_analytics.rb +4 -5
- data/lib/elasticsearch-serverless/api/search_application/list.rb +5 -4
- data/lib/elasticsearch-serverless/api/search_application/put.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/put_behavioral_analytics.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_application/search.rb +3 -4
- data/lib/elasticsearch-serverless/api/search_mvt.rb +131 -9
- data/lib/elasticsearch-serverless/api/search_template.rb +12 -12
- data/lib/elasticsearch-serverless/api/security/authenticate.rb +3 -3
- data/lib/elasticsearch-serverless/api/security/create_api_key.rb +7 -3
- data/lib/elasticsearch-serverless/api/security/delete_role.rb +6 -5
- data/lib/elasticsearch-serverless/api/security/get_api_key.rb +3 -3
- data/lib/elasticsearch-serverless/api/security/get_builtin_privileges.rb +3 -3
- data/lib/elasticsearch-serverless/api/security/get_role.rb +11 -8
- data/lib/elasticsearch-serverless/api/security/has_privileges.rb +6 -5
- data/lib/elasticsearch-serverless/api/security/invalidate_api_key.rb +8 -6
- data/lib/elasticsearch-serverless/api/security/put_role.rb +3 -4
- data/lib/elasticsearch-serverless/api/security/query_api_keys.rb +12 -6
- data/lib/elasticsearch-serverless/api/security/query_role.rb +61 -0
- data/lib/elasticsearch-serverless/api/security/update_api_key.rb +74 -0
- data/lib/elasticsearch-serverless/api/sql/clear_cursor.rb +4 -4
- data/lib/elasticsearch-serverless/api/sql/delete_async.rb +10 -6
- data/lib/elasticsearch-serverless/api/sql/get_async.rb +16 -13
- data/lib/elasticsearch-serverless/api/sql/get_async_status.rb +6 -6
- data/lib/elasticsearch-serverless/api/sql/query.rb +8 -5
- data/lib/elasticsearch-serverless/api/sql/translate.rb +6 -4
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym.rb +17 -6
- data/lib/elasticsearch-serverless/api/synonyms/delete_synonym_rule.rb +7 -7
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym.rb +7 -8
- data/lib/elasticsearch-serverless/api/synonyms/get_synonym_rule.rb +7 -7
- data/lib/elasticsearch-serverless/api/synonyms/get_synonyms_sets.rb +7 -6
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym.rb +9 -6
- data/lib/elasticsearch-serverless/api/synonyms/put_synonym_rule.rb +9 -7
- data/lib/elasticsearch-serverless/api/tasks/get.rb +9 -7
- data/lib/elasticsearch-serverless/api/terms_enum.rb +7 -9
- data/lib/elasticsearch-serverless/api/termvectors.rb +39 -16
- data/lib/elasticsearch-serverless/api/transform/delete_transform.rb +3 -5
- data/lib/elasticsearch-serverless/api/transform/get_transform.rb +5 -6
- data/lib/elasticsearch-serverless/api/transform/get_transform_stats.rb +4 -5
- data/lib/elasticsearch-serverless/api/transform/preview_transform.rb +4 -5
- data/lib/elasticsearch-serverless/api/transform/put_transform.rb +3 -4
- data/lib/elasticsearch-serverless/api/transform/reset_transform.rb +4 -5
- data/lib/elasticsearch-serverless/api/transform/schedule_now_transform.rb +7 -8
- data/lib/elasticsearch-serverless/api/transform/start_transform.rb +3 -5
- data/lib/elasticsearch-serverless/api/transform/stop_transform.rb +3 -4
- data/lib/elasticsearch-serverless/api/transform/update_transform.rb +3 -4
- data/lib/elasticsearch-serverless/api/update.rb +36 -24
- data/lib/elasticsearch-serverless/api/update_by_query.rb +102 -31
- data/lib/elasticsearch-serverless/api.rb +22 -25
- data/lib/elasticsearch-serverless/version.rb +1 -1
- data/lib/elasticsearch-serverless.rb +7 -0
- metadata +18 -7
@@ -23,21 +23,20 @@ module ElasticsearchServerless
|
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
25
|
# Simulate an index.
|
26
|
-
#
|
26
|
+
# Get the index configuration that would be applied to the specified index from an existing index template.
|
27
27
|
#
|
28
28
|
# @option arguments [String] :name Name of the index to simulate (*Required*)
|
29
29
|
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
30
30
|
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
|
31
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
32
|
#
|
33
|
-
# @see https://www.elastic.co/
|
33
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template
|
34
34
|
#
|
35
35
|
def simulate_index_template(arguments = {})
|
36
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_index_template' }
|
37
37
|
|
38
|
-
defined_params = [:name].
|
38
|
+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
|
39
39
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
-
set_variables
|
41
40
|
end
|
42
41
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
42
|
|
@@ -23,7 +23,7 @@ module ElasticsearchServerless
|
|
23
23
|
module Indices
|
24
24
|
module Actions
|
25
25
|
# Simulate an index template.
|
26
|
-
#
|
26
|
+
# Get the index configuration that would be applied by a particular index template.
|
27
27
|
#
|
28
28
|
# @option arguments [String] :name Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit
|
29
29
|
# this parameter and specify the template configuration in the request body.
|
@@ -33,14 +33,13 @@ module ElasticsearchServerless
|
|
33
33
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
34
|
# @option arguments [Hash] :body request body
|
35
35
|
#
|
36
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template
|
37
37
|
#
|
38
38
|
def simulate_template(arguments = {})
|
39
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'indices.simulate_template' }
|
40
40
|
|
41
|
-
defined_params = [:name].
|
41
|
+
defined_params = [:name].each_with_object({}) do |variable, set_variables|
|
42
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
43
|
-
set_variables
|
44
43
|
end
|
45
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
46
45
|
|
@@ -55,7 +54,7 @@ module ElasticsearchServerless
|
|
55
54
|
path = if _name
|
56
55
|
"_index_template/_simulate/#{Utils.listify(_name)}"
|
57
56
|
else
|
58
|
-
|
57
|
+
'_index_template/_simulate'
|
59
58
|
end
|
60
59
|
params = Utils.process_params(arguments)
|
61
60
|
|
@@ -32,10 +32,10 @@ module ElasticsearchServerless
|
|
32
32
|
# @option arguments [Hash] :headers Custom HTTP headers
|
33
33
|
# @option arguments [Hash] :body request body
|
34
34
|
#
|
35
|
-
# @see https://www.elastic.co/
|
35
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases
|
36
36
|
#
|
37
37
|
def update_aliases(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'indices.update_aliases' }
|
39
39
|
|
40
40
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
41
41
|
|
@@ -45,7 +45,7 @@ module ElasticsearchServerless
|
|
45
45
|
body = arguments.delete(:body)
|
46
46
|
|
47
47
|
method = ElasticsearchServerless::API::HTTP_POST
|
48
|
-
path =
|
48
|
+
path = '_aliases'
|
49
49
|
params = Utils.process_params(arguments)
|
50
50
|
|
51
51
|
ElasticsearchServerless::API::Response.new(
|
@@ -49,14 +49,13 @@ module ElasticsearchServerless
|
|
49
49
|
# @option arguments [Hash] :headers Custom HTTP headers
|
50
50
|
# @option arguments [Hash] :body request body
|
51
51
|
#
|
52
|
-
# @see https://www.elastic.co/
|
52
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query
|
53
53
|
#
|
54
54
|
def validate_query(arguments = {})
|
55
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
55
|
+
request_opts = { endpoint: arguments[:endpoint] || 'indices.validate_query' }
|
56
56
|
|
57
|
-
defined_params = [:index].
|
57
|
+
defined_params = [:index].each_with_object({}) do |variable, set_variables|
|
58
58
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
59
|
-
set_variables
|
60
59
|
end
|
61
60
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
62
61
|
|
@@ -76,7 +75,7 @@ module ElasticsearchServerless
|
|
76
75
|
path = if _index
|
77
76
|
"#{Utils.listify(_index)}/_validate/query"
|
78
77
|
else
|
79
|
-
|
78
|
+
'_validate/query'
|
80
79
|
end
|
81
80
|
params = Utils.process_params(arguments)
|
82
81
|
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform chat completion inference
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The inference Id (*Required*)
|
28
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference
|
33
|
+
#
|
34
|
+
def chat_completion_unified(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.chat_completion_unified' }
|
36
|
+
|
37
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = arguments.delete(:body)
|
48
|
+
|
49
|
+
_inference_id = arguments.delete(:inference_id)
|
50
|
+
|
51
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
52
|
+
path = "_inference/chat_completion/#{Utils.listify(_inference_id)}/_stream"
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform completion inference on the service
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The inference Id (*Required*)
|
28
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference
|
33
|
+
#
|
34
|
+
def completion(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.completion' }
|
36
|
+
|
37
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = arguments.delete(:body)
|
48
|
+
|
49
|
+
_inference_id = arguments.delete(:inference_id)
|
50
|
+
|
51
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
52
|
+
path = "_inference/completion/#{Utils.listify(_inference_id)}"
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -25,19 +25,18 @@ module ElasticsearchServerless
|
|
25
25
|
# Delete an inference endpoint
|
26
26
|
#
|
27
27
|
# @option arguments [String] :task_type The task type
|
28
|
-
# @option arguments [String] :inference_id The inference
|
29
|
-
# @option arguments [Boolean] :dry_run When true, the endpoint is not deleted
|
30
|
-
# @option arguments [Boolean] :force When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields
|
28
|
+
# @option arguments [String] :inference_id The inference identifier. (*Required*)
|
29
|
+
# @option arguments [Boolean] :dry_run When true, the endpoint is not deleted and a list of ingest processors which reference this endpoint is returned.
|
30
|
+
# @option arguments [Boolean] :force When true, the inference endpoint is forcefully deleted even if it is still being used by ingest processors or semantic text fields.
|
31
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
32
|
#
|
33
|
-
# @see https://www.elastic.co/
|
33
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete
|
34
34
|
#
|
35
35
|
def delete(arguments = {})
|
36
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.delete' }
|
37
37
|
|
38
|
-
defined_params = [:inference_id, :task_type].
|
38
|
+
defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables|
|
39
39
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
-
set_variables
|
41
40
|
end
|
42
41
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
42
|
|
@@ -28,14 +28,13 @@ module ElasticsearchServerless
|
|
28
28
|
# @option arguments [String] :inference_id The inference Id
|
29
29
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/
|
31
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get
|
32
32
|
#
|
33
33
|
def get(arguments = {})
|
34
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.get' }
|
35
35
|
|
36
|
-
defined_params = [:inference_id, :task_type].
|
36
|
+
defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables|
|
37
37
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
-
set_variables
|
39
38
|
end
|
40
39
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
40
|
|
@@ -54,7 +53,7 @@ module ElasticsearchServerless
|
|
54
53
|
elsif _inference_id
|
55
54
|
"_inference/#{Utils.listify(_inference_id)}"
|
56
55
|
else
|
57
|
-
|
56
|
+
'_inference'
|
58
57
|
end
|
59
58
|
params = {}
|
60
59
|
|
@@ -22,21 +22,28 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Inference
|
24
24
|
module Actions
|
25
|
-
# Create an inference endpoint
|
25
|
+
# Create an inference endpoint.
|
26
|
+
# When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running.
|
27
|
+
# After creating the endpoint, wait for the model deployment to complete before using it.
|
28
|
+
# To verify the deployment status, use the get trained model statistics API.
|
29
|
+
# Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+.
|
30
|
+
# Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.
|
31
|
+
# IMPORTANT: The inference APIs enable you to use certain services, such as built-in machine learning models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google Vertex AI, Anthropic, Watsonx.ai, or Hugging Face.
|
32
|
+
# For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
|
33
|
+
# However, if you do not plan to use the inference APIs to use these models or if you want to use non-NLP models, use the machine learning trained model APIs.
|
26
34
|
#
|
27
35
|
# @option arguments [String] :task_type The task type
|
28
36
|
# @option arguments [String] :inference_id The inference Id (*Required*)
|
29
37
|
# @option arguments [Hash] :headers Custom HTTP headers
|
30
38
|
# @option arguments [Hash] :body inference_config
|
31
39
|
#
|
32
|
-
# @see https://www.elastic.co/
|
40
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put
|
33
41
|
#
|
34
42
|
def put(arguments = {})
|
35
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
43
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put' }
|
36
44
|
|
37
|
-
defined_params = [:inference_id, :task_type].
|
45
|
+
defined_params = [:inference_id, :task_type].each_with_object({}) do |variable, set_variables|
|
38
46
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
-
set_variables
|
40
47
|
end
|
41
48
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
42
49
|
|
@@ -0,0 +1,78 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Create a Watsonx inference endpoint.
|
26
|
+
# Creates an inference endpoint to perform an inference task with the +watsonxai+ service.
|
27
|
+
# You need an IBM Cloud Databases for Elasticsearch deployment to use the +watsonxai+ inference service.
|
28
|
+
# You can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform.
|
29
|
+
# When you create an inference endpoint, the associated machine learning model is automatically deployed if it is not already running.
|
30
|
+
# After creating the endpoint, wait for the model deployment to complete before using it.
|
31
|
+
# To verify the deployment status, use the get trained model statistics API.
|
32
|
+
# Look for +"state": "fully_allocated"+ in the response and ensure that the +"allocation_count"+ matches the +"target_allocation_count"+.
|
33
|
+
# Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.
|
34
|
+
#
|
35
|
+
# @option arguments [String] :task_type The task type.
|
36
|
+
# The only valid task type for the model to perform is +text_embedding+. (*Required*)
|
37
|
+
# @option arguments [String] :watsonx_inference_id The unique identifier of the inference endpoint. (*Required*)
|
38
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
39
|
+
# @option arguments [Hash] :body request body
|
40
|
+
#
|
41
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-service-watsonx-ai.html
|
42
|
+
#
|
43
|
+
def put_watsonx(arguments = {})
|
44
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_watsonx' }
|
45
|
+
|
46
|
+
defined_params = [:task_type, :watsonx_inference_id].each_with_object({}) do |variable, set_variables|
|
47
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
48
|
+
end
|
49
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
50
|
+
|
51
|
+
raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
|
52
|
+
|
53
|
+
unless arguments[:watsonx_inference_id]
|
54
|
+
raise ArgumentError,
|
55
|
+
"Required argument 'watsonx_inference_id' missing"
|
56
|
+
end
|
57
|
+
|
58
|
+
arguments = arguments.clone
|
59
|
+
headers = arguments.delete(:headers) || {}
|
60
|
+
|
61
|
+
body = arguments.delete(:body)
|
62
|
+
|
63
|
+
_task_type = arguments.delete(:task_type)
|
64
|
+
|
65
|
+
_watsonx_inference_id = arguments.delete(:watsonx_inference_id)
|
66
|
+
|
67
|
+
method = ElasticsearchServerless::API::HTTP_PUT
|
68
|
+
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_watsonx_inference_id)}"
|
69
|
+
params = {}
|
70
|
+
|
71
|
+
ElasticsearchServerless::API::Response.new(
|
72
|
+
perform_request(method, path, params, body, headers, request_opts)
|
73
|
+
)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform rereanking inference on the service
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The unique identifier for the inference endpoint. (*Required*)
|
28
|
+
# @option arguments [Time] :timeout The amount of time to wait for the inference request to complete. Server default: 30s.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference
|
33
|
+
#
|
34
|
+
def rerank(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.rerank' }
|
36
|
+
|
37
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = arguments.delete(:body)
|
48
|
+
|
49
|
+
_inference_id = arguments.delete(:inference_id)
|
50
|
+
|
51
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
52
|
+
path = "_inference/rerank/#{Utils.listify(_inference_id)}"
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform sparse embedding inference on the service
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The inference Id (*Required*)
|
28
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference
|
33
|
+
#
|
34
|
+
def sparse_embedding(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.sparse_embedding' }
|
36
|
+
|
37
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = arguments.delete(:body)
|
48
|
+
|
49
|
+
_inference_id = arguments.delete(:inference_id)
|
50
|
+
|
51
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
52
|
+
path = "_inference/sparse_embedding/#{Utils.listify(_inference_id)}"
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,62 @@
|
|
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
|
+
# Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch-specification
|
20
|
+
#
|
21
|
+
module ElasticsearchServerless
|
22
|
+
module API
|
23
|
+
module Inference
|
24
|
+
module Actions
|
25
|
+
# Perform text embedding inference on the service
|
26
|
+
#
|
27
|
+
# @option arguments [String] :inference_id The inference Id (*Required*)
|
28
|
+
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference request to complete. Server default: 30s.
|
29
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
30
|
+
# @option arguments [Hash] :body request body
|
31
|
+
#
|
32
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference
|
33
|
+
#
|
34
|
+
def text_embedding(arguments = {})
|
35
|
+
request_opts = { endpoint: arguments[:endpoint] || 'inference.text_embedding' }
|
36
|
+
|
37
|
+
defined_params = [:inference_id].each_with_object({}) do |variable, set_variables|
|
38
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
42
|
+
raise ArgumentError, "Required argument 'inference_id' missing" unless arguments[:inference_id]
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = arguments.delete(:body)
|
48
|
+
|
49
|
+
_inference_id = arguments.delete(:inference_id)
|
50
|
+
|
51
|
+
method = ElasticsearchServerless::API::HTTP_POST
|
52
|
+
path = "_inference/text_embedding/#{Utils.listify(_inference_id)}"
|
53
|
+
params = Utils.process_params(arguments)
|
54
|
+
|
55
|
+
ElasticsearchServerless::API::Response.new(
|
56
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
|
+
)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -22,14 +22,14 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Actions
|
24
24
|
# Get cluster info.
|
25
|
-
#
|
25
|
+
# Get basic build, version, and cluster information.
|
26
26
|
#
|
27
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
28
28
|
#
|
29
|
-
# @see https://www.elastic.co/
|
29
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info
|
30
30
|
#
|
31
31
|
def info(arguments = {})
|
32
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
32
|
+
request_opts = { endpoint: arguments[:endpoint] || 'info' }
|
33
33
|
|
34
34
|
arguments = arguments.clone
|
35
35
|
headers = arguments.delete(:headers) || {}
|
@@ -37,7 +37,7 @@ module ElasticsearchServerless
|
|
37
37
|
body = nil
|
38
38
|
|
39
39
|
method = ElasticsearchServerless::API::HTTP_GET
|
40
|
-
path =
|
40
|
+
path = ''
|
41
41
|
params = {}
|
42
42
|
|
43
43
|
ElasticsearchServerless::API::Response.new(
|
@@ -22,7 +22,8 @@ module ElasticsearchServerless
|
|
22
22
|
module API
|
23
23
|
module Ingest
|
24
24
|
module Actions
|
25
|
-
#
|
25
|
+
# Delete pipelines.
|
26
|
+
# Delete one or more ingest pipelines.
|
26
27
|
#
|
27
28
|
# @option arguments [String] :id Pipeline ID or wildcard expression of pipeline IDs used to limit the request.
|
28
29
|
# To delete all ingest pipelines in a cluster, use a value of +*+. (*Required*)
|
@@ -32,14 +33,13 @@ module ElasticsearchServerless
|
|
32
33
|
# If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
|
33
34
|
# @option arguments [Hash] :headers Custom HTTP headers
|
34
35
|
#
|
35
|
-
# @see https://www.elastic.co/
|
36
|
+
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline
|
36
37
|
#
|
37
38
|
def delete_pipeline(arguments = {})
|
38
|
-
request_opts = { endpoint: arguments[:endpoint] ||
|
39
|
+
request_opts = { endpoint: arguments[:endpoint] || 'ingest.delete_pipeline' }
|
39
40
|
|
40
|
-
defined_params = [:id].
|
41
|
+
defined_params = [:id].each_with_object({}) do |variable, set_variables|
|
41
42
|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
-
set_variables
|
43
43
|
end
|
44
44
|
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
45
45
|
|