From d1409df4fe89d26d849ca3bf97313f707e5a70b3 Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Thu, 28 Aug 2025 10:24:09 -0400 Subject: [PATCH 1/3] Update specification to clarify max chunking settings --- specification/inference/_types/Services.ts | 3 ++- specification/inference/put_elser/PutElserRequest.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/inference/_types/Services.ts b/specification/inference/_types/Services.ts index 4f62699ae5..1af04c1928 100644 --- a/specification/inference/_types/Services.ts +++ b/specification/inference/_types/Services.ts @@ -316,7 +316,8 @@ export class InferenceEndpointInfoWatsonx extends InferenceEndpoint { export class InferenceChunkingSettings { /** * The maximum size of a chunk in words. - * This value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy). + * This value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy). + * This value should not exceed the window size for the associated model. * @server_default 250 */ max_chunk_size?: integer diff --git a/specification/inference/put_elser/PutElserRequest.ts b/specification/inference/put_elser/PutElserRequest.ts index 179bb1e379..cdaf237f90 100644 --- a/specification/inference/put_elser/PutElserRequest.ts +++ b/specification/inference/put_elser/PutElserRequest.ts @@ -78,7 +78,8 @@ export interface Request extends RequestBase { } body: { /** - * The chunking configuration object. + * The chunking configuration object. + * Note that for ELSER endpoints, the max_chunk_size may not exceed `300`. * @ext_doc_id inference-chunking */ chunking_settings?: InferenceChunkingSettings From 1e7e307d3caa5edf09841a4347879475019bd6e7 Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Thu, 28 Aug 2025 11:00:17 -0400 Subject: [PATCH 2/3] Generate output --- output/schema/schema.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 5359ca8310..78be79b5e3 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -82512,7 +82512,7 @@ } }, { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", "name": "max_chunk_size", "required": true, "serverDefault": 250, @@ -170952,7 +170952,7 @@ }, "properties": [ { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", "name": "max_chunk_size", "required": false, "serverDefault": 250, @@ -171033,7 +171033,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L313-L371" + "specLocation": "inference/_types/Services.ts#L313-L372" }, { "kind": "interface", @@ -172770,7 +172770,7 @@ } } ], - "specLocation": "inference/_types/Services.ts#L377-L404" + "specLocation": "inference/_types/Services.ts#L378-L405" }, { "kind": "interface", @@ -172918,7 +172918,7 @@ "name": "ServiceSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L373-L373", + "specLocation": "inference/_types/Services.ts#L374-L374", "type": { "kind": "user_defined_value" } @@ -173002,7 +173002,7 @@ "name": "TaskSettings", "namespace": "inference._types" }, - "specLocation": "inference/_types/Services.ts#L375-L375", + "specLocation": "inference/_types/Services.ts#L376-L376", "type": { "kind": "user_defined_value" } @@ -177139,7 +177139,7 @@ "kind": "properties", "properties": [ { - "description": "The chunking configuration object.", + "description": "The chunking configuration object. \nNote that for ELSER endpoints, the max_chunk_size may not exceed `300`.", "extDocId": "inference-chunking", "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config", "name": "chunking_settings", @@ -177300,7 +177300,7 @@ } } ], - "specLocation": "inference/put_elser/PutElserRequest.ts#L30-L94" + "specLocation": "inference/put_elser/PutElserRequest.ts#L30-L95" }, { "kind": "response", From 3c59845d84124fecf0220819337786843720196b Mon Sep 17 00:00:00 2001 From: Laura Trotta Date: Tue, 2 Sep 2025 15:05:16 +0200 Subject: [PATCH 3/3] format + output --- output/openapi/elasticsearch-openapi.json | 6 +++--- output/openapi/elasticsearch-serverless-openapi.json | 6 +++--- output/schema/schema.json | 2 +- specification/inference/put_elser/PutElserRequest.ts | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 13a02af617..c6b43f9a51 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -22725,7 +22725,7 @@ "externalDocs": { "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" }, - "description": "The chunking configuration object.", + "description": "The chunking configuration object.\nNote that for ELSER endpoints, the max_chunk_size may not exceed `300`.", "allOf": [ { "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" @@ -86409,7 +86409,7 @@ } }, "max_chunk_size": { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", "default": 250.0, "type": "number" }, @@ -100579,7 +100579,7 @@ "type": "object", "properties": { "max_chunk_size": { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", "default": 250.0, "type": "number" }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 1d4e6f8a94..a2ae1336d0 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -13334,7 +13334,7 @@ "externalDocs": { "url": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config" }, - "description": "The chunking configuration object.", + "description": "The chunking configuration object.\nNote that for ELSER endpoints, the max_chunk_size may not exceed `300`.", "allOf": [ { "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings" @@ -58246,7 +58246,7 @@ } }, "max_chunk_size": { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", "default": 250.0, "type": "number" }, @@ -64486,7 +64486,7 @@ "type": "object", "properties": { "max_chunk_size": { - "description": "The maximum size of a chunk in words.\nThis value cannot be higher than `300` or lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).", + "description": "The maximum size of a chunk in words.\nThis value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).\nThis value should not exceed the window size for the associated model.", "default": 250.0, "type": "number" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 78be79b5e3..f500cc9d51 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -177139,7 +177139,7 @@ "kind": "properties", "properties": [ { - "description": "The chunking configuration object. \nNote that for ELSER endpoints, the max_chunk_size may not exceed `300`.", + "description": "The chunking configuration object.\nNote that for ELSER endpoints, the max_chunk_size may not exceed `300`.", "extDocId": "inference-chunking", "extDocUrl": "https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api#infer-chunking-config", "name": "chunking_settings", diff --git a/specification/inference/put_elser/PutElserRequest.ts b/specification/inference/put_elser/PutElserRequest.ts index cdaf237f90..e5a21e2cdd 100644 --- a/specification/inference/put_elser/PutElserRequest.ts +++ b/specification/inference/put_elser/PutElserRequest.ts @@ -78,7 +78,7 @@ export interface Request extends RequestBase { } body: { /** - * The chunking configuration object. + * The chunking configuration object. * Note that for ELSER endpoints, the max_chunk_size may not exceed `300`. * @ext_doc_id inference-chunking */