From 7af8515f1b08f7f8ca8a4a883d3b16201f611243 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:53:46 +0200 Subject: [PATCH] Update rest-api-spec (#2991) Co-authored-by: pquentin <42327+pquentin@users.noreply.github.com> --- output/schema/schema.json | 34 ++++++++++++++ output/schema/validation-errors.json | 6 +++ .../inference.stream_inference.json | 45 +++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 specification/_json_spec/inference.stream_inference.json diff --git a/output/schema/schema.json b/output/schema/schema.json index 307e8dd5b9..8397d31c40 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8446,6 +8446,40 @@ } ] }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Perform streaming inference", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html", + "name": "inference.stream_inference", + "request": null, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "text/event-stream" + ], + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_inference/{inference_id}/_stream" + }, + { + "methods": [ + "POST" + ], + "path": "/_inference/{task_type}/{inference_id}/_stream" + } + ] + }, { "availability": { "serverless": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 081c20aa7b..6b40b6b077 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -868,6 +868,12 @@ ], "response": [] }, + "inference.stream_inference": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "ingest.delete_geoip_database": { "request": [ "Request: query parameter 'master_timeout' does not exist in the json spec", diff --git a/specification/_json_spec/inference.stream_inference.json b/specification/_json_spec/inference.stream_inference.json new file mode 100644 index 0000000000..c8d0501e2e --- /dev/null +++ b/specification/_json_spec/inference.stream_inference.json @@ -0,0 +1,45 @@ +{ + "inference.stream_inference": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-stream-inference-api.html", + "description": "Perform streaming inference" + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["text/event-stream"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_inference/{inference_id}/_stream", + "methods": ["POST"], + "parts": { + "inference_id": { + "type": "string", + "description": "The inference Id" + } + } + }, + { + "path": "/_inference/{task_type}/{inference_id}/_stream", + "methods": ["POST"], + "parts": { + "task_type": { + "type": "string", + "description": "The task type" + }, + "inference_id": { + "type": "string", + "description": "The inference Id" + } + } + } + ] + }, + "body": { + "description": "The inference payload" + } + } +}