From a449fbb0008b65721c8b03f8cb10340c48d74aab Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Thu, 8 May 2025 11:51:47 +0200 Subject: [PATCH 1/2] bump version --- config/version.txt | 2 +- .../java/co/elastic/clients/transport/VersionInfo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/version.txt b/config/version.txt index 5e460d892..b3b01cfd8 100644 --- a/config/version.txt +++ b/config/version.txt @@ -1 +1 @@ -8.18.1 +8.18.2 diff --git a/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java b/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java index 59e711e13..f59899c62 100644 --- a/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java +++ b/java-client/src/main-flavored/java/co/elastic/clients/transport/VersionInfo.java @@ -21,5 +21,5 @@ // Package private class VersionInfo { - static final String VERSION = "8.18.1"; + static final String VERSION = "8.18.2"; } From 4c5d50260672505998848760fa1ec7fe4d11b75e Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 27 May 2025 12:06:11 +0200 Subject: [PATCH 2/2] [codegen] update to latest spec --- .../analysis/IcuNormalizationCharFilter.java | 30 + .../elasticsearch/cat/CatNodeColumn.java | 533 ++++++++++++++++++ .../elasticsearch/cat/NodesRequest.java | 37 +- .../core/search/ShardProfile.java | 12 +- .../elasticsearch/doc-files/api-spec.html | 247 ++++---- .../indices/DeleteTemplateRequest.java | 9 +- .../ElasticsearchIndicesAsyncClient.java | 21 +- .../indices/ElasticsearchIndicesClient.java | 21 +- .../indices/GetTemplateRequest.java | 8 +- .../indices/PutTemplateRequest.java | 6 +- .../ChatCompletionUnifiedRequest.java | 22 + .../ElasticsearchInferenceAsyncClient.java | 334 ++--------- .../ElasticsearchInferenceClient.java | 334 ++--------- .../InferenceEndpointInfoJinaAi.java | 141 +++++ .../inference/PutAlibabacloudRequest.java | 10 - .../inference/PutAmazonbedrockRequest.java | 12 +- .../inference/PutAnthropicRequest.java | 10 - .../inference/PutAzureaistudioRequest.java | 10 - .../inference/PutAzureopenaiRequest.java | 10 - .../inference/PutCohereRequest.java | 10 - .../inference/PutGoogleaistudioRequest.java | 10 - .../inference/PutGooglevertexaiRequest.java | 10 - .../inference/PutHuggingFaceRequest.java | 12 +- .../inference/PutJinaaiRequest.java | 10 - .../inference/PutJinaaiResponse.java | 6 +- .../inference/PutMistralRequest.java | 10 - .../inference/PutOpenaiRequest.java | 10 - .../elasticsearch/inference/PutRequest.java | 11 +- .../inference/PutWatsonxRequest.java | 10 - .../inference/RequestChatCompletion.java | 28 +- .../inference/TaskTypeJinaAi.java | 66 +++ .../snapshot/SnapshotShardFailure.java | 13 +- 32 files changed, 1123 insertions(+), 890 deletions(-) create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeColumn.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceEndpointInfoJinaAi.java create mode 100644 java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeJinaAi.java diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuNormalizationCharFilter.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuNormalizationCharFilter.java index 6db1a9fb1..57ad404b3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuNormalizationCharFilter.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/_types/analysis/IcuNormalizationCharFilter.java @@ -26,6 +26,7 @@ import co.elastic.clients.json.ObjectDeserializer; import co.elastic.clients.util.ObjectBuilder; import jakarta.json.stream.JsonGenerator; +import java.lang.String; import java.util.Objects; import java.util.function.Function; import javax.annotation.Nullable; @@ -61,6 +62,9 @@ public class IcuNormalizationCharFilter extends CharFilterBase implements CharFi @Nullable private final IcuNormalizationType name; + @Nullable + private final String unicodeSetFilter; + // --------------------------------------------------------------------------------------------- private IcuNormalizationCharFilter(Builder builder) { @@ -68,6 +72,7 @@ private IcuNormalizationCharFilter(Builder builder) { this.mode = builder.mode; this.name = builder.name; + this.unicodeSetFilter = builder.unicodeSetFilter; } @@ -99,6 +104,14 @@ public final IcuNormalizationType name() { return this.name; } + /** + * API name: {@code unicode_set_filter} + */ + @Nullable + public final String unicodeSetFilter() { + return this.unicodeSetFilter; + } + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.write("type", "icu_normalizer"); @@ -111,6 +124,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { generator.writeKey("name"); this.name.serialize(generator, mapper); } + if (this.unicodeSetFilter != null) { + generator.writeKey("unicode_set_filter"); + generator.write(this.unicodeSetFilter); + + } } @@ -129,6 +147,9 @@ public static class Builder extends CharFilterBase.AbstractBuilder @Nullable private IcuNormalizationType name; + @Nullable + private String unicodeSetFilter; + /** * API name: {@code mode} */ @@ -145,6 +166,14 @@ public final Builder name(@Nullable IcuNormalizationType value) { return this; } + /** + * API name: {@code unicode_set_filter} + */ + public final Builder unicodeSetFilter(@Nullable String value) { + this.unicodeSetFilter = value; + return this; + } + @Override protected Builder self() { return this; @@ -176,6 +205,7 @@ protected static void setupIcuNormalizationCharFilterDeserializer( CharFilterBase.setupCharFilterBaseDeserializer(op); op.add(Builder::mode, IcuNormalizationMode._DESERIALIZER, "mode"); op.add(Builder::name, IcuNormalizationType._DESERIALIZER, "name"); + op.add(Builder::unicodeSetFilter, JsonpDeserializer.stringDeserializer(), "unicode_set_filter"); op.ignore("type"); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeColumn.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeColumn.java new file mode 100644 index 000000000..732a7f016 --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/CatNodeColumn.java @@ -0,0 +1,533 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch.cat; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum CatNodeColumn implements JsonEnum { + /** + * The Elasticsearch build hash. For example: 5c03844. + */ + Build("build", "b"), + + /** + * The size of completion. For example: 0b. + */ + CompletionSize("completion.size", "cs", "completionSize"), + + /** + * The percentage of recent system CPU used. + */ + Cpu("cpu"), + + /** + * The available disk space. For example: 198.4gb. + */ + DiskAvail("disk.avail", "d", "disk", "diskAvail"), + + /** + * The total disk space. For example: 458.3gb. + */ + DiskTotal("disk.total", "dt", "diskTotal"), + + /** + * The used disk space. For example: 259.8gb. + */ + DiskUsed("disk.used", "du", "diskUsed"), + + /** + * The percentage of disk space used. + */ + DiskUsedPercent("disk.used_percent", "dup", "diskUsedPercent"), + + /** + * The number of fielddata cache evictions. + */ + FielddataEvictions("fielddata.evictions", "fe", "fielddataEvictions"), + + /** + * The fielddata cache memory used. For example: 0b. + */ + FielddataMemorySize("fielddata.memory_size", "fm", "fielddataMemory"), + + /** + * The number of file descriptors used. + */ + FileDescCurrent("file_desc.current", "fdc", "fileDescriptorCurrent"), + + /** + * The maximum number of file descriptors. + */ + FileDescMax("file_desc.max", "fdm", "fileDescriptorMax"), + + /** + * The percentage of file descriptors used. + */ + FileDescPercent("file_desc.percent", "fdp", "fileDescriptorPercent"), + + /** + * The number of flushes. + */ + FlushTotal("flush.total", "ft", "flushTotal"), + + /** + * The amount of time spent in flush. + */ + FlushTotalTime("flush.total_time", "ftt", "flushTotalTime"), + + /** + * The number of current get operations. + */ + GetCurrent("get.current", "gc", "getCurrent"), + + /** + * The time spent in successful get operations. For example: 14ms. + */ + GetExistsTime("get.exists_time", "geti", "getExistsTime"), + + /** + * The number of successful get operations. + */ + GetExistsTotal("get.exists_total", "geto", "getExistsTotal"), + + /** + * The time spent in failed get operations. For example: 0s. + */ + GetMissingTime("get.missing_time", "gmti", "getMissingTime"), + + /** + * The number of failed get operations. + */ + GetMissingTotal("get.missing_total", "gmto", "getMissingTotal"), + + /** + * The amount of time spent in get operations. For example: 14ms. + */ + GetTime("get.time", "gti", "getTime"), + + /** + * The number of get operations. + */ + GetTotal("get.total", "gto", "getTotal"), + + /** + * The used heap size. For example: 311.2mb. + */ + HeapCurrent("heap.current", "hc", "heapCurrent"), + + /** + * The total heap size. For example: 4gb. + */ + HeapMax("heap.max", "hm", "heapMax"), + + /** + * The used percentage of total allocated Elasticsearch JVM heap. This value + * reflects only the Elasticsearch process running within the operating system + * and is the most direct indicator of its JVM, heap, or memory resource + * performance. + */ + HeapPercent("heap.percent", "hp", "heapPercent"), + + /** + * The bound HTTP address. + */ + HttpAddress("http_address", "http"), + + /** + * The identifier for the node. + */ + Id("id", "nodeId"), + + /** + * The number of current deletion operations. + */ + IndexingDeleteCurrent("indexing.delete_current", "idc", "indexingDeleteCurrent"), + + /** + * The time spent in deletion operations. For example: 2ms. + */ + IndexingDeleteTime("indexing.delete_time", "idti", "indexingDeleteTime"), + + /** + * The number of deletion operations. + */ + IndexingDeleteTotal("indexing.delete_total", "idto", "indexingDeleteTotal"), + + /** + * The number of current indexing operations. + */ + IndexingIndexCurrent("indexing.index_current", "iic", "indexingIndexCurrent"), + + /** + * The number of failed indexing operations. + */ + IndexingIndexFailed("indexing.index_failed", "iif", "indexingIndexFailed"), + + /** + * The number of indexing operations that failed due to version conflict. + */ + IndexingIndexFailedDueToVersionConflict("indexing.index_failed_due_to_version_conflict", "iifvc", + "indexingIndexFailedDueToVersionConflict"), + + /** + * The time spent in indexing operations. For example: 134ms. + */ + IndexingIndexTime("indexing.index_time", "iiti", "indexingIndexTime"), + + /** + * The number of indexing operations. + */ + IndexingIndexTotal("indexing.index_total", "iito", "indexingIndexTotal"), + + /** + * The IP address. + */ + Ip("ip", "i"), + + /** + * The Java version. For example: 1.8.0. + */ + Jdk("jdk", "j"), + + /** + * The most recent load average. For example: 0.22. + */ + Load_1m("load_1m", "l"), + + /** + * The load average for the last five minutes. For example: 0.78. + */ + Load_5m("load_5m", "l"), + + /** + * The load average for the last fifteen minutes. For example: + * 1.24. + */ + Load_15m("load_15m", "l"), + + /** + * The number of mappings, including runtime and object fields. + */ + MappingsTotalCount("mappings.total_count", "mtc", "mappingsTotalCount"), + + /** + * The estimated heap overhead, in bytes, of mappings on this node, which allows + * for 1KiB of heap for every mapped field. + */ + MappingsTotalEstimatedOverheadInBytes("mappings.total_estimated_overhead_in_bytes", "mteo", + "mappingsTotalEstimatedOverheadInBytes"), + + /** + * Indicates whether the node is the elected master node. Returned values + * include * (elected master) and - (not elected + * master). + */ + Master("master", "m"), + + /** + * The number of current merge operations. + */ + MergesCurrent("merges.current", "mc", "mergesCurrent"), + + /** + * The number of current merging documents. + */ + MergesCurrentDocs("merges.current_docs", "mcd", "mergesCurrentDocs"), + + /** + * The size of current merges. For example: 0b. + */ + MergesCurrentSize("merges.current_size", "mcs", "mergesCurrentSize"), + + /** + * The number of completed merge operations. + */ + MergesTotal("merges.total", "mt", "mergesTotal"), + + /** + * The number of merged documents. + */ + MergesTotalDocs("merges.total_docs", "mtd", "mergesTotalDocs"), + + /** + * The total size of merges. For example: 0b. + */ + MergesTotalSize("merges.total_size", "mts", "mergesTotalSize"), + + /** + * The time spent merging documents. For example: 0s. + */ + MergesTotalTime("merges.total_time", "mtt", "mergesTotalTime"), + + /** + * The node name. + */ + Name("name", "n"), + + /** + * The roles of the node. Returned values include c (cold node), + * d (data node), f (frozen node), h (hot + * node), i (ingest node), l (machine learning node), + * m (master-eligible node), r (remote cluster client + * node), s (content node), t (transform node), + * v (voting-only node), w (warm node), and + * - (coordinating node only). For example, dim + * indicates a master-eligible data and ingest node. + */ + NodeRole("node.role", "r", "role", "nodeRole"), + + /** + * The process identifier. + */ + Pid("pid", "p"), + + /** + * The bound transport port number. + */ + Port("port", "po"), + + /** + * The used query cache memory. For example: 0b. + */ + QueryCacheMemorySize("query_cache.memory_size", "qcm", "queryCacheMemory"), + + /** + * The number of query cache evictions. + */ + QueryCacheEvictions("query_cache.evictions", "qce", "queryCacheEvictions"), + + /** + * The query cache hit count. + */ + QueryCacheHitCount("query_cache.hit_count", "qchc", "queryCacheHitCount"), + + /** + * The query cache miss count. + */ + QueryCacheMissCount("query_cache.miss_count", "qcmc", "queryCacheMissCount"), + + /** + * The used total memory. For example: 513.4mb. + */ + RamCurrent("ram.current", "rc", "ramCurrent"), + + /** + * The total memory. For example: 2.9gb. + */ + RamMax("ram.max", "rm", "ramMax"), + + /** + * The used percentage of the total operating system memory. This reflects all + * processes running on the operating system instead of only Elasticsearch and + * is not guaranteed to correlate to its performance. + */ + RamPercent("ram.percent", "rp", "ramPercent"), + + /** + * The number of refresh operations. + */ + RefreshTotal("refresh.total", "rto", "refreshTotal"), + + /** + * The time spent in refresh operations. For example: 91ms. + */ + RefreshTime("refresh.time", "rti", "refreshTime"), + + /** + * The used request cache memory. For example: 0b. + */ + RequestCacheMemorySize("request_cache.memory_size", "rcm", "requestCacheMemory"), + + /** + * The number of request cache evictions. + */ + RequestCacheEvictions("request_cache.evictions", "rce", "requestCacheEvictions"), + + /** + * The request cache hit count. + */ + RequestCacheHitCount("request_cache.hit_count", "rchc", "requestCacheHitCount"), + + /** + * The request cache miss count. + */ + RequestCacheMissCount("request_cache.miss_count", "rcmc", "requestCacheMissCount"), + + /** + * The number of total script compilations. + */ + ScriptCompilations("script.compilations", "scrcc", "scriptCompilations"), + + /** + * The number of total compiled scripts evicted from cache. + */ + ScriptCacheEvictions("script.cache_evictions", "scrce", "scriptCacheEvictions"), + + /** + * The number of current fetch phase operations. + */ + SearchFetchCurrent("search.fetch_current", "sfc", "searchFetchCurrent"), + + /** + * The time spent in fetch phase. For example: 37ms. + */ + SearchFetchTime("search.fetch_time", "sfti", "searchFetchTime"), + + /** + * The number of fetch operations. + */ + SearchFetchTotal("search.fetch_total", "sfto", "searchFetchTotal"), + + /** + * The number of open search contexts. + */ + SearchOpenContexts("search.open_contexts", "so", "searchOpenContexts"), + + /** + * The number of current query phase operations. + */ + SearchQueryCurrent("search.query_current", "sqc", "searchQueryCurrent"), + + /** + * The time spent in query phase. For example: 43ms. + */ + SearchQueryTime("search.query_time", "sqti", "searchQueryTime"), + + /** + * The number of query operations. + */ + SearchQueryTotal("search.query_total", "sqto", "searchQueryTotal"), + + /** + * The number of open scroll contexts. + */ + SearchScrollCurrent("search.scroll_current", "scc", "searchScrollCurrent"), + + /** + * The amount of time scroll contexts were held open. For example: + * 2m. + */ + SearchScrollTime("search.scroll_time", "scti", "searchScrollTime"), + + /** + * The number of completed scroll contexts. + */ + SearchScrollTotal("search.scroll_total", "scto", "searchScrollTotal"), + + /** + * The number of segments. + */ + SegmentsCount("segments.count", "sc", "segmentsCount"), + + /** + * The memory used by fixed bit sets for nested object field types and type + * filters for types referred in join fields. For example: 1.0kb. + */ + SegmentsFixedBitsetMemory("segments.fixed_bitset_memory", "sfbm", "fixedBitsetMemory"), + + /** + * The memory used by the index writer. For example: 18mb. + */ + SegmentsIndexWriterMemory("segments.index_writer_memory", "siwm", "segmentsIndexWriterMemory"), + + /** + * The memory used by segments. For example: 1.4kb. + */ + SegmentsMemory("segments.memory", "sm", "segmentsMemory"), + + /** + * The memory used by the version map. For example: 1.0kb. + */ + SegmentsVersionMapMemory("segments.version_map_memory", "svmm", "segmentsVersionMapMemory"), + + /** + * The number of shards assigned. + */ + ShardStatsTotalCount("shard_stats.total_count", "sstc", "shards", "shardStatsTotalCount"), + + /** + * The number of current suggest operations. + */ + SuggestCurrent("suggest.current", "suc", "suggestCurrent"), + + /** + * The time spent in suggest operations. + */ + SuggestTime("suggest.time", "suti", "suggestTime"), + + /** + * The number of suggest operations. + */ + SuggestTotal("suggest.total", "suto", "suggestTotal"), + + /** + * The amount of node uptime. For example: 17.3m. + */ + Uptime("uptime", "u"), + + /** + * The Elasticsearch version. For example: 9.0.0. + */ + Version("version", "v"), + + ; + + private final String jsonValue; + private final String[] aliases; + + CatNodeColumn(String jsonValue, String... aliases) { + this.jsonValue = jsonValue; + this.aliases = aliases; + } + + public String jsonValue() { + return this.jsonValue; + } + + public String[] aliases() { + return this.aliases; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + CatNodeColumn.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java index f00be48f5..6390a4f02 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/cat/NodesRequest.java @@ -132,7 +132,8 @@ public final Boolean fullId() { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} */ @@ -152,7 +153,7 @@ public final Boolean includeUnloadedSegments() { } /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. *

* API name: {@code master_timeout} */ @@ -162,9 +163,9 @@ public final Time masterTimeout() { } /** - * 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. + * A comma-separated list of column names or aliases that determines the sort + * order. Sorting defaults to ascending and can be changed by setting + * :asc or :desc as a suffix to the column name. *

* API name: {@code s} */ @@ -173,7 +174,7 @@ public final List s() { } /** - * Unit used to display time values. + * The unit used to display time values. *

* API name: {@code time} */ @@ -232,7 +233,8 @@ public final Builder fullId(@Nullable Boolean value) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -244,7 +246,8 @@ public final Builder h(List list) { } /** - * List of columns to appear in the response. Supports simple wildcards. + * A comma-separated list of columns names to display. It supports simple + * wildcards. *

* API name: {@code h} *

@@ -267,7 +270,7 @@ public final Builder includeUnloadedSegments(@Nullable Boolean value) { } /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. *

* API name: {@code master_timeout} */ @@ -277,7 +280,7 @@ public final Builder masterTimeout(@Nullable Time value) { } /** - * Period to wait for a connection to the master node. + * The period to wait for a connection to the master node. *

* API name: {@code master_timeout} */ @@ -286,9 +289,9 @@ public final Builder masterTimeout(Function> f } /** - * 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. + * A comma-separated list of column names or aliases that determines the sort + * order. Sorting defaults to ascending and can be changed by setting + * :asc or :desc as a suffix to the column name. *

* API name: {@code s} *

@@ -300,9 +303,9 @@ public final Builder s(List list) { } /** - * 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. + * A comma-separated list of column names or aliases that determines the sort + * order. Sorting defaults to ascending and can be changed by setting + * :asc or :desc as a suffix to the column name. *

* API name: {@code s} *

@@ -314,7 +317,7 @@ public final Builder s(String value, String... values) { } /** - * Unit used to display time values. + * The unit used to display time values. *

* API name: {@code time} */ diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java index 1b199e402..bfead3d10 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/core/search/ShardProfile.java @@ -30,7 +30,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; -import java.lang.Long; +import java.lang.Integer; import java.lang.String; import java.util.List; import java.util.Objects; @@ -80,7 +80,7 @@ public class ShardProfile implements JsonpSerializable { private final List searches; - private final long shardId; + private final int shardId; // --------------------------------------------------------------------------------------------- @@ -163,7 +163,7 @@ public final List searches() { /** * Required - API name: {@code shard_id} */ - public final long shardId() { + public final int shardId() { return this.shardId; } @@ -255,7 +255,7 @@ public static class Builder extends WithJsonObjectBuilderBase implement private List searches; - private Long shardId; + private Integer shardId; /** * Required - API name: {@code aggregations} @@ -380,7 +380,7 @@ public final Builder searches(Function 1) { hash = hash.substring(1); } - window.location = "https://github.com/elastic/elasticsearch-specification/tree/68c914c921730ba183c12d9f6f2edb994fa817d3/specification/" + (paths[hash] || ""); + window.location = "https://github.com/elastic/elasticsearch-specification/tree/0b326d89a5dc4013a2ef7239e58fe98f3db2639a/specification/" + (paths[hash] || ""); - Please see the Elasticsearch API specification. + Please see the Elasticsearch API specification. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java index 1e8ec4664..aec07653c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/DeleteTemplateRequest.java @@ -56,12 +56,15 @@ // typedef: indices.delete_template.Request /** - * Delete a legacy index template. + * Delete a legacy index template. IMPORTANT: This documentation is about legacy + * index templates, which are deprecated and will be replaced by the composable + * templates introduced in Elasticsearch 7.8. * * @see API * specification + * @deprecated 7.8.0 */ - +@Deprecated public class DeleteTemplateRequest extends RequestBase { @Nullable private final Time masterTimeout; @@ -122,7 +125,7 @@ public final Time timeout() { /** * Builder for {@link DeleteTemplateRequest}. */ - + @Deprecated public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java index 8bd7ae353..061724fc1 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesAsyncClient.java @@ -938,7 +938,9 @@ public final CompletableFuture deleteIndexTemplate( // ----- Endpoint: indices.delete_template /** - * Delete a legacy index template. + * Delete a legacy index template. IMPORTANT: This documentation is about legacy + * index templates, which are deprecated and will be replaced by the composable + * templates introduced in Elasticsearch 7.8. * * @see Documentation @@ -953,7 +955,9 @@ public CompletableFuture deleteTemplate(DeleteTemplateRe } /** - * Delete a legacy index template. + * Delete a legacy index template. IMPORTANT: This documentation is about legacy + * index templates, which are deprecated and will be replaced by the composable + * templates introduced in Elasticsearch 7.8. * * @param fn * a function that initializes a builder to create the @@ -2101,7 +2105,8 @@ public CompletableFuture getSettings() { // ----- Endpoint: indices.get_template /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -2120,7 +2125,8 @@ public CompletableFuture getTemplate(GetTemplateRequest req } /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -2140,7 +2146,8 @@ public final CompletableFuture getTemplate( } /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -2842,7 +2849,7 @@ public CompletableFuture putSettings() { // ----- Endpoint: indices.put_template /** - * Create or update an index template. Index templates define settings, + * Create or update a legacy index template. Index templates define settings, * mappings, and aliases that can be applied automatically to new indices. * Elasticsearch applies templates to new indices based on an index pattern that * matches the index name. @@ -2886,7 +2893,7 @@ public CompletableFuture putTemplate(PutTemplateRequest req } /** - * Create or update an index template. Index templates define settings, + * Create or update a legacy index template. Index templates define settings, * mappings, and aliases that can be applied automatically to new indices. * Elasticsearch applies templates to new indices based on an index pattern that * matches the index name. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java index f95756c7b..6a239feb3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/ElasticsearchIndicesClient.java @@ -949,7 +949,9 @@ public final DeleteIndexTemplateResponse deleteIndexTemplate( // ----- Endpoint: indices.delete_template /** - * Delete a legacy index template. + * Delete a legacy index template. IMPORTANT: This documentation is about legacy + * index templates, which are deprecated and will be replaced by the composable + * templates introduced in Elasticsearch 7.8. * * @see Documentation @@ -965,7 +967,9 @@ public DeleteTemplateResponse deleteTemplate(DeleteTemplateRequest request) } /** - * Delete a legacy index template. + * Delete a legacy index template. IMPORTANT: This documentation is about legacy + * index templates, which are deprecated and will be replaced by the composable + * templates introduced in Elasticsearch 7.8. * * @param fn * a function that initializes a builder to create the @@ -2132,7 +2136,8 @@ public GetIndicesSettingsResponse getSettings() throws IOException, Elasticsearc // ----- Endpoint: indices.get_template /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -2151,7 +2156,8 @@ public GetTemplateResponse getTemplate(GetTemplateRequest request) throws IOExce } /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -2172,7 +2178,8 @@ public final GetTemplateResponse getTemplate( } /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -2889,7 +2896,7 @@ public PutIndicesSettingsResponse putSettings() throws IOException, Elasticsearc // ----- Endpoint: indices.put_template /** - * Create or update an index template. Index templates define settings, + * Create or update a legacy index template. Index templates define settings, * mappings, and aliases that can be applied automatically to new indices. * Elasticsearch applies templates to new indices based on an index pattern that * matches the index name. @@ -2933,7 +2940,7 @@ public PutTemplateResponse putTemplate(PutTemplateRequest request) throws IOExce } /** - * Create or update an index template. Index templates define settings, + * Create or update a legacy index template. Index templates define settings, * mappings, and aliases that can be applied automatically to new indices. * Elasticsearch applies templates to new indices based on an index pattern that * matches the index name. diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java index 14e709082..5268ad0b2 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/GetTemplateRequest.java @@ -59,7 +59,8 @@ // typedef: indices.get_template.Request /** - * Get index templates. Get information about one or more index templates. + * Get legacy index templates. Get information about one or more index + * templates. *

* IMPORTANT: This documentation is about legacy index templates, which are * deprecated and will be replaced by the composable templates introduced in @@ -67,8 +68,9 @@ * * @see API * specification + * @deprecated 7.8.0 */ - +@Deprecated public class GetTemplateRequest extends RequestBase { @Nullable private final Boolean flatSettings; @@ -145,7 +147,7 @@ public final List name() { /** * Builder for {@link GetTemplateRequest}. */ - + @Deprecated public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java index 0727f64a1..df57dca4e 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/indices/PutTemplateRequest.java @@ -63,7 +63,7 @@ // typedef: indices.put_template.Request /** - * Create or update an index template. Index templates define settings, + * Create or update a legacy index template. Index templates define settings, * mappings, and aliases that can be applied automatically to new indices. * Elasticsearch applies templates to new indices based on an index pattern that * matches the index name. @@ -96,7 +96,9 @@ * * @see API * specification + * @deprecated 7.8.0 */ +@Deprecated @JsonpDeserializable public class PutTemplateRequest extends RequestBase implements JsonpSerializable { private final Map aliases; @@ -312,7 +314,7 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { /** * Builder for {@link PutTemplateRequest}. */ - + @Deprecated public static class Builder extends RequestBase.AbstractBuilder implements ObjectBuilder { diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ChatCompletionUnifiedRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ChatCompletionUnifiedRequest.java index 4b2bb22e2..a1971f525 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ChatCompletionUnifiedRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ChatCompletionUnifiedRequest.java @@ -62,6 +62,28 @@ /** * Perform chat completion inference + *

+ * The chat completion inference API enables real-time responses for chat + * completion tasks by delivering answers incrementally, reducing response times + * during computation. It only works with the chat_completion task + * type for openai and elastic inference services. + *

+ * 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, Azure, Google AI Studio, Google Vertex AI, Anthropic, + * Watsonx.ai, or Hugging Face. 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. + *

+ * NOTE: The chat_completion task type is only available within the + * _stream API and only supports streaming. The Chat completion inference API + * and the Stream inference API differ in their response structure and + * capabilities. The Chat completion inference API provides more comprehensive + * customization options through more fields and function calling support. If + * you use the openai service or the elastic service, + * use the Chat completion inference API. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java index 194bca79d..e96df8193 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceAsyncClient.java @@ -72,6 +72,28 @@ public ElasticsearchInferenceAsyncClient withTransportOptions(@Nullable Transpor /** * Perform chat completion inference + *

+ * The chat completion inference API enables real-time responses for chat + * completion tasks by delivering answers incrementally, reducing response times + * during computation. It only works with the chat_completion task + * type for openai and elastic inference services. + *

+ * 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, Azure, Google AI Studio, Google Vertex AI, Anthropic, + * Watsonx.ai, or Hugging Face. 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. + *

+ * NOTE: The chat_completion task type is only available within the + * _stream API and only supports streaming. The Chat completion inference API + * and the Stream inference API differ in their response structure and + * capabilities. The Chat completion inference API provides more comprehensive + * customization options through more fields and function calling support. If + * you use the openai service or the elastic service, + * use the Chat completion inference API. * * @see Documentation @@ -87,6 +109,28 @@ public CompletableFuture chatCompletionUnified(ChatCompletionUni /** * Perform chat completion inference + *

+ * The chat completion inference API enables real-time responses for chat + * completion tasks by delivering answers incrementally, reducing response times + * during computation. It only works with the chat_completion task + * type for openai and elastic inference services. + *

+ * 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, Azure, Google AI Studio, Google Vertex AI, Anthropic, + * Watsonx.ai, or Hugging Face. 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. + *

+ * NOTE: The chat_completion task type is only available within the + * _stream API and only supports streaming. The Chat completion inference API + * and the Stream inference API differ in their response structure and + * capabilities. The Chat completion inference API provides more comprehensive + * customization options through more fields and function calling support. If + * you use the openai service or the elastic service, + * use the Chat completion inference API. * * @param fn * a function that initializes a builder to create the @@ -291,16 +335,7 @@ public final CompletableFuture inference( // ----- Endpoint: inference.put /** - * Create an inference endpoint. When you create an inference endpoint, the - * associated machine learning model is automatically deployed if it is not - * already running. After creating the endpoint, wait for the model deployment - * to complete before using it. To verify the deployment status, use the get - * trained model statistics API. Look for - * "state": "fully_allocated" in the response - * and ensure that the "allocation_count" matches the - * "target_allocation_count". Avoid creating multiple - * endpoints for the same model unless required, as each endpoint consumes - * significant resources. + * Create an inference endpoint. *

* IMPORTANT: The inference APIs enable you to use certain services, such as * built-in machine learning models (ELSER, E5), models uploaded through Eland, @@ -324,16 +359,7 @@ public CompletableFuture put(PutRequest request) { } /** - * Create an inference endpoint. When you create an inference endpoint, the - * associated machine learning model is automatically deployed if it is not - * already running. After creating the endpoint, wait for the model deployment - * to complete before using it. To verify the deployment status, use the get - * trained model statistics API. Look for - * "state": "fully_allocated" in the response - * and ensure that the "allocation_count" matches the - * "target_allocation_count". Avoid creating multiple - * endpoints for the same model unless required, as each endpoint consumes - * significant resources. + * Create an inference endpoint. *

* IMPORTANT: The inference APIs enable you to use certain services, such as * built-in machine learning models (ELSER, E5), models uploaded through Eland, @@ -363,16 +389,6 @@ public final CompletableFuture put(Function * Create an inference endpoint to perform an inference task with the * alibabacloud-ai-search service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -391,16 +407,6 @@ public CompletableFuture putAlibabacloud(PutAlibabaclou *

* Create an inference endpoint to perform an inference task with the * alibabacloud-ai-search service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -431,17 +437,7 @@ public final CompletableFuture putAlibabacloud( * updated keys. *

* - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @see Documentation * on elastic.co @@ -468,17 +464,7 @@ public CompletableFuture putAmazonbedrock(PutAmazonbed * updated keys. *

* - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @param fn * a function that initializes a builder to create the * {@link PutAmazonbedrockRequest} @@ -499,16 +485,6 @@ public final CompletableFuture putAmazonbedrock( *

* Create an inference endpoint to perform an inference task with the * anthropic service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -527,16 +503,6 @@ public CompletableFuture putAnthropic(PutAnthropicRequest *

* Create an inference endpoint to perform an inference task with the * anthropic service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -558,16 +524,6 @@ public final CompletableFuture putAnthropic( *

* Create an inference endpoint to perform an inference task with the * azureaistudio service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -586,16 +542,6 @@ public CompletableFuture putAzureaistudio(PutAzureaist *

* Create an inference endpoint to perform an inference task with the * azureaistudio service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -632,16 +578,6 @@ public final CompletableFuture putAzureaistudio( * be found in the Azure * models documentation. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -675,16 +611,6 @@ public CompletableFuture putAzureopenai(PutAzureopenaiRe * be found in the Azure * models documentation. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -706,16 +632,6 @@ public final CompletableFuture putAzureopenai( *

* Create an inference endpoint to perform an inference task with the * cohere service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -734,16 +650,6 @@ public CompletableFuture putCohere(PutCohereRequest request) *

* Create an inference endpoint to perform an inference task with the * cohere service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -951,16 +857,6 @@ public final CompletableFuture putElser( *

* Create an inference endpoint to perform an inference task with the * googleaistudio service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -979,16 +875,6 @@ public CompletableFuture putGoogleaistudio(PutGooglea *

* Create an inference endpoint to perform an inference task with the * googleaistudio service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1010,16 +896,6 @@ public final CompletableFuture putGoogleaistudio( *

* Create an inference endpoint to perform an inference task with the * googlevertexai service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1038,16 +914,6 @@ public CompletableFuture putGooglevertexai(PutGooglev *

* Create an inference endpoint to perform an inference task with the * googlevertexai service. - *

- * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1087,17 +953,7 @@ public final CompletableFuture putGooglevertexai( *

  • multilingual-e5-base
  • *
  • multilingual-e5-small
  • * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @see Documentation * on elastic.co @@ -1133,17 +989,7 @@ public CompletableFuture putHuggingFace(PutHuggingFaceRe *

  • multilingual-e5-base
  • *
  • multilingual-e5-small
  • * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @param fn * a function that initializes a builder to create the * {@link PutHuggingFaceRequest} @@ -1169,16 +1015,6 @@ public final CompletableFuture putHuggingFace( * https://jina.ai/reranker. To review * the available text_embedding models, refer to the * https://jina.ai/embeddings/. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1202,16 +1038,6 @@ public CompletableFuture putJinaai(PutJinaaiRequest request) * https://jina.ai/reranker. To review * the available text_embedding models, refer to the * https://jina.ai/embeddings/. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1233,16 +1059,6 @@ public final CompletableFuture putJinaai( *

    * Creates an inference endpoint to perform an inference task with the * mistral service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1261,16 +1077,6 @@ public CompletableFuture putMistral(PutMistralRequest reques *

    * Creates an inference endpoint to perform an inference task with the * mistral service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1292,16 +1098,6 @@ public final CompletableFuture putMistral( *

    * Create an inference endpoint to perform an inference task with the * openai service or openai compatible APIs. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1320,16 +1116,6 @@ public CompletableFuture putOpenai(PutOpenaiRequest request) *

    * Create an inference endpoint to perform an inference task with the * openai service or openai compatible APIs. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1399,16 +1185,6 @@ public final CompletableFuture putVoyageai( * Elasticsearch deployment to use the watsonxai inference service. * You can provision one through the IBM catalog, the Cloud Databases CLI * plug-in, the Cloud Databases API, or Terraform. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1430,16 +1206,6 @@ public CompletableFuture putWatsonx(PutWatsonxRequest reques * Elasticsearch deployment to use the watsonxai inference service. * You can provision one through the IBM catalog, the Cloud Databases CLI * plug-in, the Cloud Databases API, or Terraform. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java index fb5601f33..906505bc3 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/ElasticsearchInferenceClient.java @@ -70,6 +70,28 @@ public ElasticsearchInferenceClient withTransportOptions(@Nullable TransportOpti /** * Perform chat completion inference + *

    + * The chat completion inference API enables real-time responses for chat + * completion tasks by delivering answers incrementally, reducing response times + * during computation. It only works with the chat_completion task + * type for openai and elastic inference services. + *

    + * 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, Azure, Google AI Studio, Google Vertex AI, Anthropic, + * Watsonx.ai, or Hugging Face. 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. + *

    + * NOTE: The chat_completion task type is only available within the + * _stream API and only supports streaming. The Chat completion inference API + * and the Stream inference API differ in their response structure and + * capabilities. The Chat completion inference API provides more comprehensive + * customization options through more fields and function calling support. If + * you use the openai service or the elastic service, + * use the Chat completion inference API. * * @see Documentation @@ -86,6 +108,28 @@ public BinaryResponse chatCompletionUnified(ChatCompletionUnifiedRequest request /** * Perform chat completion inference + *

    + * The chat completion inference API enables real-time responses for chat + * completion tasks by delivering answers incrementally, reducing response times + * during computation. It only works with the chat_completion task + * type for openai and elastic inference services. + *

    + * 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, Azure, Google AI Studio, Google Vertex AI, Anthropic, + * Watsonx.ai, or Hugging Face. 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. + *

    + * NOTE: The chat_completion task type is only available within the + * _stream API and only supports streaming. The Chat completion inference API + * and the Stream inference API differ in their response structure and + * capabilities. The Chat completion inference API provides more comprehensive + * customization options through more fields and function calling support. If + * you use the openai service or the elastic service, + * use the Chat completion inference API. * * @param fn * a function that initializes a builder to create the @@ -292,16 +336,7 @@ public final InferenceResponse inference(Function"state": "fully_allocated" in the response - * and ensure that the "allocation_count" matches the - * "target_allocation_count". Avoid creating multiple - * endpoints for the same model unless required, as each endpoint consumes - * significant resources. + * Create an inference endpoint. *

    * IMPORTANT: The inference APIs enable you to use certain services, such as * built-in machine learning models (ELSER, E5), models uploaded through Eland, @@ -325,16 +360,7 @@ public PutResponse put(PutRequest request) throws IOException, ElasticsearchExce } /** - * Create an inference endpoint. When you create an inference endpoint, the - * associated machine learning model is automatically deployed if it is not - * already running. After creating the endpoint, wait for the model deployment - * to complete before using it. To verify the deployment status, use the get - * trained model statistics API. Look for - * "state": "fully_allocated" in the response - * and ensure that the "allocation_count" matches the - * "target_allocation_count". Avoid creating multiple - * endpoints for the same model unless required, as each endpoint consumes - * significant resources. + * Create an inference endpoint. *

    * IMPORTANT: The inference APIs enable you to use certain services, such as * built-in machine learning models (ELSER, E5), models uploaded through Eland, @@ -365,16 +391,6 @@ public final PutResponse put(Function * Create an inference endpoint to perform an inference task with the * alibabacloud-ai-search service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -394,16 +410,6 @@ public PutAlibabacloudResponse putAlibabacloud(PutAlibabacloudRequest request) *

    * Create an inference endpoint to perform an inference task with the * alibabacloud-ai-search service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -435,17 +441,7 @@ public final PutAlibabacloudResponse putAlibabacloud( * updated keys. *

    * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @see Documentation * on elastic.co @@ -473,17 +469,7 @@ public PutAmazonbedrockResponse putAmazonbedrock(PutAmazonbedrockRequest request * updated keys. *

    * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @param fn * a function that initializes a builder to create the * {@link PutAmazonbedrockRequest} @@ -505,16 +491,6 @@ public final PutAmazonbedrockResponse putAmazonbedrock( *

    * Create an inference endpoint to perform an inference task with the * anthropic service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -533,16 +509,6 @@ public PutAnthropicResponse putAnthropic(PutAnthropicRequest request) throws IOE *

    * Create an inference endpoint to perform an inference task with the * anthropic service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -565,16 +531,6 @@ public final PutAnthropicResponse putAnthropic( *

    * Create an inference endpoint to perform an inference task with the * azureaistudio service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -594,16 +550,6 @@ public PutAzureaistudioResponse putAzureaistudio(PutAzureaistudioRequest request *

    * Create an inference endpoint to perform an inference task with the * azureaistudio service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -641,16 +587,6 @@ public final PutAzureaistudioResponse putAzureaistudio( * be found in the Azure * models documentation. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -685,16 +621,6 @@ public PutAzureopenaiResponse putAzureopenai(PutAzureopenaiRequest request) * be found in the Azure * models documentation. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -717,16 +643,6 @@ public final PutAzureopenaiResponse putAzureopenai( *

    * Create an inference endpoint to perform an inference task with the * cohere service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -745,16 +661,6 @@ public PutCohereResponse putCohere(PutCohereRequest request) throws IOException, *

    * Create an inference endpoint to perform an inference task with the * cohere service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -964,16 +870,6 @@ public final PutElserResponse putElser(Function * Create an inference endpoint to perform an inference task with the * googleaistudio service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -993,16 +889,6 @@ public PutGoogleaistudioResponse putGoogleaistudio(PutGoogleaistudioRequest requ *

    * Create an inference endpoint to perform an inference task with the * googleaistudio service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1025,16 +911,6 @@ public final PutGoogleaistudioResponse putGoogleaistudio( *

    * Create an inference endpoint to perform an inference task with the * googlevertexai service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1054,16 +930,6 @@ public PutGooglevertexaiResponse putGooglevertexai(PutGooglevertexaiRequest requ *

    * Create an inference endpoint to perform an inference task with the * googlevertexai service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1104,17 +970,7 @@ public final PutGooglevertexaiResponse putGooglevertexai( *

  • multilingual-e5-base
  • *
  • multilingual-e5-small
  • * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @see Documentation * on elastic.co @@ -1151,17 +1007,7 @@ public PutHuggingFaceResponse putHuggingFace(PutHuggingFaceRequest request) *

  • multilingual-e5-base
  • *
  • multilingual-e5-small
  • * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @param fn * a function that initializes a builder to create the * {@link PutHuggingFaceRequest} @@ -1188,16 +1034,6 @@ public final PutHuggingFaceResponse putHuggingFace( * https://jina.ai/reranker. To review * the available text_embedding models, refer to the * https://jina.ai/embeddings/. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1221,16 +1057,6 @@ public PutJinaaiResponse putJinaai(PutJinaaiRequest request) throws IOException, * https://jina.ai/reranker. To review * the available text_embedding models, refer to the * https://jina.ai/embeddings/. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1252,16 +1078,6 @@ public final PutJinaaiResponse putJinaai(Function * Creates an inference endpoint to perform an inference task with the * mistral service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1280,16 +1096,6 @@ public PutMistralResponse putMistral(PutMistralRequest request) throws IOExcepti *

    * Creates an inference endpoint to perform an inference task with the * mistral service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1311,16 +1117,6 @@ public final PutMistralResponse putMistral(Function * Create an inference endpoint to perform an inference task with the * openai service or openai compatible APIs. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1339,16 +1135,6 @@ public PutOpenaiResponse putOpenai(PutOpenaiRequest request) throws IOException, *

    * Create an inference endpoint to perform an inference task with the * openai service or openai compatible APIs. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the @@ -1419,16 +1205,6 @@ public final PutVoyageaiResponse putVoyageai( * Elasticsearch deployment to use the watsonxai inference service. * You can provision one through the IBM catalog, the Cloud Databases CLI * plug-in, the Cloud Databases API, or Terraform. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see Documentation @@ -1450,16 +1226,6 @@ public PutWatsonxResponse putWatsonx(PutWatsonxRequest request) throws IOExcepti * Elasticsearch deployment to use the watsonxai inference service. * You can provision one through the IBM catalog, the Cloud Databases CLI * plug-in, the Cloud Databases API, or Terraform. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @param fn * a function that initializes a builder to create the diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceEndpointInfoJinaAi.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceEndpointInfoJinaAi.java new file mode 100644 index 000000000..da46627ab --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/InferenceEndpointInfoJinaAi.java @@ -0,0 +1,141 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; +import co.elastic.clients.json.JsonpMapper; +import co.elastic.clients.json.ObjectBuilderDeserializer; +import co.elastic.clients.json.ObjectDeserializer; +import co.elastic.clients.util.ApiTypeHelper; +import co.elastic.clients.util.ObjectBuilder; +import co.elastic.clients.util.WithJsonObjectBuilderBase; +import jakarta.json.stream.JsonGenerator; +import java.lang.String; +import java.util.Objects; +import javax.annotation.Nullable; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +// typedef: inference._types.InferenceEndpointInfoJinaAi + +/** + * + * @see API + * specification + */ + +public abstract class InferenceEndpointInfoJinaAi extends InferenceEndpoint { + private final String inferenceId; + + private final TaskTypeJinaAi taskType; + + // --------------------------------------------------------------------------------------------- + + protected InferenceEndpointInfoJinaAi(AbstractBuilder builder) { + super(builder); + + this.inferenceId = ApiTypeHelper.requireNonNull(builder.inferenceId, this, "inferenceId"); + this.taskType = ApiTypeHelper.requireNonNull(builder.taskType, this, "taskType"); + + } + + /** + * Required - The inference Id + *

    + * API name: {@code inference_id} + */ + public final String inferenceId() { + return this.inferenceId; + } + + /** + * Required - The task type + *

    + * API name: {@code task_type} + */ + public final TaskTypeJinaAi taskType() { + return this.taskType; + } + + protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) { + + super.serializeInternal(generator, mapper); + generator.writeKey("inference_id"); + generator.write(this.inferenceId); + + generator.writeKey("task_type"); + this.taskType.serialize(generator, mapper); + + } + + public abstract static class AbstractBuilder> + extends + InferenceEndpoint.AbstractBuilder { + private String inferenceId; + + private TaskTypeJinaAi taskType; + + /** + * Required - The inference Id + *

    + * API name: {@code inference_id} + */ + public final BuilderT inferenceId(String value) { + this.inferenceId = value; + return self(); + } + + /** + * Required - The task type + *

    + * API name: {@code task_type} + */ + public final BuilderT taskType(TaskTypeJinaAi value) { + this.taskType = value; + return self(); + } + + } + + // --------------------------------------------------------------------------------------------- + protected static > void setupInferenceEndpointInfoJinaAiDeserializer( + ObjectDeserializer op) { + InferenceEndpoint.setupInferenceEndpointDeserializer(op); + op.add(AbstractBuilder::inferenceId, JsonpDeserializer.stringDeserializer(), "inference_id"); + op.add(AbstractBuilder::taskType, TaskTypeJinaAi._DESERIALIZER, "task_type"); + + } + +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAlibabacloudRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAlibabacloudRequest.java index c0954788d..55378b971 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAlibabacloudRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAlibabacloudRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * alibabacloud-ai-search service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAmazonbedrockRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAmazonbedrockRequest.java index 55b01e4bf..7afaf21bf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAmazonbedrockRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAmazonbedrockRequest.java @@ -71,17 +71,7 @@ * updated keys. *

    * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java index 2d1507c5e..afb447140 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAnthropicRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * anthropic service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureaistudioRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureaistudioRequest.java index 3a0d1ef54..87415cc8c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureaistudioRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureaistudioRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * azureaistudio service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureopenaiRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureopenaiRequest.java index 9b14d99ec..37aa2292c 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureopenaiRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutAzureopenaiRequest.java @@ -77,16 +77,6 @@ * be found in the Azure * models documentation. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutCohereRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutCohereRequest.java index 26de9cff1..3da2f26f5 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutCohereRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutCohereRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * cohere service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGoogleaistudioRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGoogleaistudioRequest.java index fb2949825..32b9db6cf 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGoogleaistudioRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGoogleaistudioRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * googleaistudio service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGooglevertexaiRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGooglevertexaiRequest.java index c491288d4..5f9082e54 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGooglevertexaiRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutGooglevertexaiRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * googlevertexai service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutHuggingFaceRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutHuggingFaceRequest.java index 3b081c97f..1d494fa22 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutHuggingFaceRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutHuggingFaceRequest.java @@ -80,17 +80,7 @@ *

  • multilingual-e5-base
  • *
  • multilingual-e5-small
  • * - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. - * + * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiRequest.java index ab9b47ccb..924d75223 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiRequest.java @@ -67,16 +67,6 @@ * https://jina.ai/reranker. To review * the available text_embedding models, refer to the * https://jina.ai/embeddings/. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiResponse.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiResponse.java index 6d40a39ab..44aacfdbd 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiResponse.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutJinaaiResponse.java @@ -51,7 +51,7 @@ * specification */ @JsonpDeserializable -public class PutJinaaiResponse extends InferenceEndpointInfo { +public class PutJinaaiResponse extends InferenceEndpointInfoJinaAi { // --------------------------------------------------------------------------------------------- private PutJinaaiResponse(Builder builder) { @@ -69,7 +69,7 @@ public static PutJinaaiResponse of(Function + public static class Builder extends InferenceEndpointInfoJinaAi.AbstractBuilder implements ObjectBuilder { @Override @@ -99,7 +99,7 @@ public PutJinaaiResponse build() { .lazy(Builder::new, PutJinaaiResponse::setupPutJinaaiResponseDeserializer); protected static void setupPutJinaaiResponseDeserializer(ObjectDeserializer op) { - InferenceEndpointInfo.setupInferenceEndpointInfoDeserializer(op); + InferenceEndpointInfoJinaAi.setupInferenceEndpointInfoJinaAiDeserializer(op); } diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutMistralRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutMistralRequest.java index cde473677..cfc6451ee 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutMistralRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutMistralRequest.java @@ -62,16 +62,6 @@ *

    * Creates an inference endpoint to perform an inference task with the * mistral service. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutOpenaiRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutOpenaiRequest.java index 2b10fe33f..bbc89dd1a 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutOpenaiRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutOpenaiRequest.java @@ -62,16 +62,6 @@ *

    * Create an inference endpoint to perform an inference task with the * openai service or openai compatible APIs. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java index 6f734f226..1336a1320 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutRequest.java @@ -59,16 +59,7 @@ // typedef: inference.put.Request /** - * Create an inference endpoint. When you create an inference endpoint, the - * associated machine learning model is automatically deployed if it is not - * already running. After creating the endpoint, wait for the model deployment - * to complete before using it. To verify the deployment status, use the get - * trained model statistics API. Look for - * "state": "fully_allocated" in the response - * and ensure that the "allocation_count" matches the - * "target_allocation_count". Avoid creating multiple - * endpoints for the same model unless required, as each endpoint consumes - * significant resources. + * Create an inference endpoint. *

    * IMPORTANT: The inference APIs enable you to use certain services, such as * built-in machine learning models (ELSER, E5), models uploaded through Eland, diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutWatsonxRequest.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutWatsonxRequest.java index 2529929f7..dad5c0e86 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutWatsonxRequest.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/PutWatsonxRequest.java @@ -65,16 +65,6 @@ * Elasticsearch deployment to use the watsonxai inference service. * You can provision one through the IBM catalog, the Cloud Databases CLI * plug-in, the Cloud Databases API, or Terraform. - *

    - * When you create an inference endpoint, the associated machine learning model - * is automatically deployed if it is not already running. After creating the - * endpoint, wait for the model deployment to complete before using it. To - * verify the deployment status, use the get trained model statistics API. Look - * for "state": "fully_allocated" in the - * response and ensure that the "allocation_count" - * matches the "target_allocation_count". Avoid creating - * multiple endpoints for the same model unless required, as each endpoint - * consumes significant resources. * * @see API * specification diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestChatCompletion.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestChatCompletion.java index ed267fc8e..99628e8c0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestChatCompletion.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/RequestChatCompletion.java @@ -104,7 +104,12 @@ public static RequestChatCompletion of(Functionuser). The + * other message roles (assistant, system, or + * tool) should generally only be copied from the response to a + * previous completion request, such that the messages array is built up + * throughout a conversation. *

    * API name: {@code messages} */ @@ -289,7 +294,12 @@ public static class Builder extends WithJsonObjectBuilderBase private Float topP; /** - * Required - A list of objects representing the conversation. + * Required - A list of objects representing the conversation. Requests should + * generally only add new messages from the user (role user). The + * other message roles (assistant, system, or + * tool) should generally only be copied from the response to a + * previous completion request, such that the messages array is built up + * throughout a conversation. *

    * API name: {@code messages} *

    @@ -301,7 +311,12 @@ public final Builder messages(List list) { } /** - * Required - A list of objects representing the conversation. + * Required - A list of objects representing the conversation. Requests should + * generally only add new messages from the user (role user). The + * other message roles (assistant, system, or + * tool) should generally only be copied from the response to a + * previous completion request, such that the messages array is built up + * throughout a conversation. *

    * API name: {@code messages} *

    @@ -313,7 +328,12 @@ public final Builder messages(Message value, Message... values) { } /** - * Required - A list of objects representing the conversation. + * Required - A list of objects representing the conversation. Requests should + * generally only add new messages from the user (role user). The + * other message roles (assistant, system, or + * tool) should generally only be copied from the response to a + * previous completion request, such that the messages array is built up + * throughout a conversation. *

    * API name: {@code messages} *

    diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeJinaAi.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeJinaAi.java new file mode 100644 index 000000000..21aa5602f --- /dev/null +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/inference/TaskTypeJinaAi.java @@ -0,0 +1,66 @@ +/* + * 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. + */ + +package co.elastic.clients.elasticsearch.inference; + +import co.elastic.clients.json.JsonEnum; +import co.elastic.clients.json.JsonpDeserializable; +import co.elastic.clients.json.JsonpDeserializer; + +//---------------------------------------------------------------- +// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST. +//---------------------------------------------------------------- +// +// This code is generated from the Elasticsearch API specification +// at https://github.com/elastic/elasticsearch-specification +// +// Manual updates to this file will be lost when the code is +// re-generated. +// +// If you find a property that is missing or wrongly typed, please +// open an issue or a PR on the API specification repository. +// +//---------------------------------------------------------------- + +/** + * + * @see API + * specification + */ +@JsonpDeserializable +public enum TaskTypeJinaAi implements JsonEnum { + TextEmbedding("text_embedding"), + + Rerank("rerank"), + + ; + + private final String jsonValue; + + TaskTypeJinaAi(String jsonValue) { + this.jsonValue = jsonValue; + } + + public String jsonValue() { + return this.jsonValue; + } + + public static final JsonEnum.Deserializer _DESERIALIZER = new JsonEnum.Deserializer<>( + TaskTypeJinaAi.values()); +} diff --git a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotShardFailure.java b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotShardFailure.java index 31817895f..e409acfb0 100644 --- a/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotShardFailure.java +++ b/java-client/src/main/java/co/elastic/clients/elasticsearch/snapshot/SnapshotShardFailure.java @@ -30,6 +30,7 @@ import co.elastic.clients.util.ObjectBuilder; import co.elastic.clients.util.WithJsonObjectBuilderBase; import jakarta.json.stream.JsonGenerator; +import java.lang.Integer; import java.lang.String; import java.util.Objects; import java.util.function.Function; @@ -67,7 +68,7 @@ public class SnapshotShardFailure implements JsonpSerializable { private final String reason; - private final String shardId; + private final int shardId; private final String indexUuid; @@ -80,7 +81,7 @@ private SnapshotShardFailure(Builder builder) { this.index = ApiTypeHelper.requireNonNull(builder.index, this, "index"); this.nodeId = builder.nodeId; this.reason = ApiTypeHelper.requireNonNull(builder.reason, this, "reason"); - this.shardId = ApiTypeHelper.requireNonNull(builder.shardId, this, "shardId"); + this.shardId = ApiTypeHelper.requireNonNull(builder.shardId, this, "shardId", 0); this.indexUuid = ApiTypeHelper.requireNonNull(builder.indexUuid, this, "indexUuid"); this.status = ApiTypeHelper.requireNonNull(builder.status, this, "status"); @@ -115,7 +116,7 @@ public final String reason() { /** * Required - API name: {@code shard_id} */ - public final String shardId() { + public final int shardId() { return this.shardId; } @@ -187,7 +188,7 @@ public static class Builder extends WithJsonObjectBuilderBase private String reason; - private String shardId; + private Integer shardId; private String indexUuid; @@ -220,7 +221,7 @@ public final Builder reason(String value) { /** * Required - API name: {@code shard_id} */ - public final Builder shardId(String value) { + public final Builder shardId(int value) { this.shardId = value; return this; } @@ -272,7 +273,7 @@ protected static void setupSnapshotShardFailureDeserializer(ObjectDeserializer