Skip to content

Udpates main #2751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions elasticsearch-api/lib/elasticsearch/api/actions/bulk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ module Actions
# * JavaScript: Check out `client.helpers.*`
# * .NET: Check out `BulkAllObservable`
# * PHP: Check out bulk indexing.
# * Ruby: Check out `Elasticsearch::Helpers::BulkHelper`
# **Submitting bulk requests with cURL**
# If you're providing text file input to `curl`, you must use the `--data-binary` flag instead of plain `-d`.
# The latter doesn't preserve newlines. For example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Actions
# IMPORTANT: CAT APIs are only intended for human consumption using the command line or the Kibana console. They are not intended for use by applications. For application consumption, use the aliases API.
#
# @option arguments [String, Array<String>] :name A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`.
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
# Sorting defaults to ascending and can be changed by setting `:asc`
# or `:desc` as a suffix to the column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Actions
#
# @option arguments [String, Array] :node_id A comma-separated list of node identifiers or names used to limit the returned information.
# @option arguments [String] :bytes The unit used to display byte values.
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
# Sorting defaults to ascending and can be changed by setting `:asc`
# or `:desc` as a suffix to the column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module Actions
# @option arguments [String] :name The name of the component template.
# It accepts wildcard expressions.
# If it is omitted, all component templates are returned.
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
# Sorting defaults to ascending and can be changed by setting `:asc`
# or `:desc` as a suffix to the column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module Actions
# @option arguments [String, Array] :index A comma-separated list of data streams, indices, and aliases used to limit the request.
# It supports wildcards (`*`).
# To target all data streams and indices, omit this parameter or use `*` or `_all`.
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
# Sorting defaults to ascending and can be changed by setting `:asc`
# or `:desc` as a suffix to the column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module Actions
# @option arguments [String, Array<String>] :fields Comma-separated list of fields used to limit returned information.
# To retrieve all fields, omit this parameter.
# @option arguments [String] :bytes The unit used to display byte values.
# @option arguments [String, Array<String>] :h List of columns to appear in the response. Supports simple wildcards.
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
# Sorting defaults to ascending and can be changed by setting `:asc`
# or `:desc` as a suffix to the column name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ module Actions
# By default, it returns only settings that have been explicitly defined.
#
# @option arguments [Boolean] :flat_settings If `true`, returns settings in flat format.
# @option arguments [Boolean] :include_defaults If `true`, returns default cluster settings from the local node.
# @option arguments [Boolean] :include_defaults If `true`, also returns default values for all other cluster settings, reflecting the values
# in the `elasticsearch.yml` file of one of the nodes in the cluster. If the nodes in your
# cluster do not all have the same values in their `elasticsearch.yml` config files then the
# values returned by this API may vary from invocation to invocation and may not reflect the
# values that Elasticsearch uses in all situations. Use the `GET _nodes/settings` API to
# fetch the settings for each individual node in your cluster.
# @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.
# @option arguments [Time] :timeout Period to wait for a response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ module Actions
# It is valid only for the CSV format.
# @option arguments [Boolean] :drop_null_columns Indicates whether columns that are entirely `null` will be removed from the `columns` and `values` portion of the results.
# If `true`, the response will include an extra section under the name `all_columns` which has the name of all the columns.
# @option arguments [String] :format A short version of the Accept header, for example `json` or `yaml`.
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.For async requests, nothing will be returned if the async query doesn't finish within the timeout.
# The query ID and running status are available in the `X-Elasticsearch-Async-Id` and `X-Elasticsearch-Async-Is-Running` HTTP headers of the response, respectively.
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Actions
# minor version, meaning that your referencing code may break when this
# library is upgraded.
#
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.
# @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.`csv`, `tsv`, and `txt` formats will return results in a tabular format, excluding other metadata fields from the response.
# @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format.
# @option arguments [Boolean] :drop_null_columns Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?
# Defaults to `false`. If `true` then the response will include an extra section under the name `all_columns` which has the name of all columns.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module Actions
# - Update supported mapping parameters
# - Change a field's mapping using reindexing
# - Rename a field using a field alias
# Learn how to use the update mapping API with practical examples in the {https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples Update mapping API examples} guide.
# Learn how to use the update mapping API with practical examples in the {https://www.elastic.co/docs/manage-data/data-store/mapping/update-mappings-examples Update mapping API examples} guide.
#
# @option arguments [String, Array] :index A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. (*Required*)
# @option arguments [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices.
Expand Down
10 changes: 6 additions & 4 deletions elasticsearch-api/lib/elasticsearch/api/actions/inference/put.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,26 @@ module Actions
# For built-in models and models uploaded through Eland, the inference APIs offer an alternative way to use and manage trained models.
# 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.
# The following integrations are available through the inference API. You can find the available task types next to the integration name:
# * AI21 (`chat_completion`, `completion`)
# * AlibabaCloud AI Search (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)
# * Amazon Bedrock (`completion`, `text_embedding`)
# * Amazon SageMaker (`chat_completion`, `completion`, `rerank`, `sparse_embedding`, `text_embedding`)
# * Anthropic (`completion`)
# * Azure AI Studio (`completion`, 'rerank', `text_embedding`)
# * Azure OpenAI (`completion`, `text_embedding`)
# * Cohere (`completion`, `rerank`, `text_embedding`)
# * DeepSeek (`completion`, `chat_completion`)
# * DeepSeek (`chat_completion`, `completion`)
# * Elasticsearch (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)
# * ELSER (`sparse_embedding`)
# * Google AI Studio (`completion`, `text_embedding`)
# * Google Vertex AI (`rerank`, `text_embedding`)
# * Google Vertex AI (`chat_completion`, `completion`, `rerank`, `text_embedding`)
# * Hugging Face (`chat_completion`, `completion`, `rerank`, `text_embedding`)
# * JinaAI (`rerank`, `text_embedding`)
# * Llama (`chat_completion`, `completion`, `text_embedding`)
# * Mistral (`chat_completion`, `completion`, `text_embedding`)
# * OpenAI (`chat_completion`, `completion`, `text_embedding`)
# * VoyageAI (`text_embedding`, `rerank`)
# * VoyageAI (`rerank`, `text_embedding`)
# * Watsonx inference integration (`text_embedding`)
# * JinaAI (`text_embedding`, `rerank`)
#
# @option arguments [String] :task_type The task type. Refer to the integration list in the API description for the available task types.
# @option arguments [String] :inference_id The inference Id (*Required*)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module Inference
module Actions
# Create a AI21 inference endpoint.
# Create an inference endpoint to perform an inference task with the `ai21` service.
#
# @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
# @option arguments [String] :ai21_inference_id The unique identifier of the inference endpoint. (*Required*)
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
# returned by Elasticsearch.
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
# For example `"exists_time": "1h"` for humans and
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
# readable values will be omitted. This makes sense for responses being consumed
# only by machines.
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
# this option for debugging only.
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body request body
#
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-ai21
#
def put_ai21(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_ai21' }

defined_params = [:task_type, :ai21_inference_id].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
end
request_opts[:defined_params] = defined_params unless defined_params.empty?

raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
raise ArgumentError, "Required argument 'ai21_inference_id' missing" unless arguments[:ai21_inference_id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

_task_type = arguments.delete(:task_type)

_ai21_inference_id = arguments.delete(:ai21_inference_id)

method = Elasticsearch::API::HTTP_PUT
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_ai21_inference_id)}"
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# This code was automatically generated from the Elasticsearch Specification
# See https://github.com/elastic/elasticsearch-specification
# See Elasticsearch::ES_SPECIFICATION_COMMIT for commit hash.
module Elasticsearch
module API
module Inference
module Actions
# Create a Llama inference endpoint.
# Create an inference endpoint to perform an inference task with the `llama` service.
#
# @option arguments [String] :task_type The type of the inference task that the model will perform. (*Required*)
# @option arguments [String] :llama_inference_id The unique identifier of the inference endpoint. (*Required*)
# @option arguments [Time] :timeout Specifies the amount of time to wait for the inference endpoint to be created. Server default: 30s.
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
# when they occur.
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response
# returned by Elasticsearch.
# @option arguments [Boolean] :human When set to `true` will return statistics in a format suitable for humans.
# For example `"exists_time": "1h"` for humans and
# `"exists_time_in_millis": 3600000` for computers. When disabled the human
# readable values will be omitted. This makes sense for responses being consumed
# only by machines.
# @option arguments [Boolean] :pretty If set to `true` the returned JSON will be "pretty-formatted". Only use
# this option for debugging only.
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body request body
#
# @see https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-llama
#
def put_llama(arguments = {})
request_opts = { endpoint: arguments[:endpoint] || 'inference.put_llama' }

defined_params = [:task_type, :llama_inference_id].each_with_object({}) do |variable, set_variables|
set_variables[variable] = arguments[variable] if arguments.key?(variable)
end
request_opts[:defined_params] = defined_params unless defined_params.empty?

raise ArgumentError, "Required argument 'task_type' missing" unless arguments[:task_type]
raise ArgumentError, "Required argument 'llama_inference_id' missing" unless arguments[:llama_inference_id]

arguments = arguments.clone
headers = arguments.delete(:headers) || {}

body = arguments.delete(:body)

_task_type = arguments.delete(:task_type)

_llama_inference_id = arguments.delete(:llama_inference_id)

method = Elasticsearch::API::HTTP_PUT
path = "_inference/#{Utils.listify(_task_type)}/#{Utils.listify(_llama_inference_id)}"
params = Utils.process_params(arguments)

Elasticsearch::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
)
end
end
end
end
end
2 changes: 1 addition & 1 deletion elasticsearch-api/lib/elasticsearch/api/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
module Elasticsearch
module API
VERSION = '9.1.0'.freeze
ES_SPECIFICATION_COMMIT = 'e585438d116b00ff34643179e6286e402c0bcaaf'.freeze
ES_SPECIFICATION_COMMIT = 'c26dfd2c787bc7b187f3ccac15b9c5993d45f801'.freeze
end
end
Loading