From 13b9e8e856896055c001f4c78f87cc9c29d4cef2 Mon Sep 17 00:00:00 2001 From: David Kyle Date: Fri, 10 Nov 2023 09:30:42 +0000 Subject: [PATCH] Results are floats not doubles --- output/schema/schema.json | 112 +--------------------- output/schema/validation-errors.json | 26 +---- output/typescript/types.ts | 4 +- specification/inference/_types/Results.ts | 6 +- 4 files changed, 11 insertions(+), 137 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 86c5193810..57b86d5ab6 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -7515,114 +7515,6 @@ ], "visibility": "public" }, - { - "availability": { - "stack": { - "stability": "experimental", - "visibility": "public" - } - }, - "description": "Delete model in the Inference API", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-inference-api.html", - "name": "inference.delete_model", - "request": null, - "requestBodyRequired": false, - "response": null, - "responseMediaType": [ - "application/json" - ], - "stability": "experimental", - "urls": [ - { - "methods": [ - "DELETE" - ], - "path": "/_inference/{task_type}/{model_id}" - } - ], - "visibility": "public" - }, - { - "availability": { - "stack": { - "stability": "experimental", - "visibility": "public" - } - }, - "description": "Get a model in the Inference API", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-inference-api.html", - "name": "inference.get_model", - "request": null, - "requestBodyRequired": false, - "response": null, - "responseMediaType": [ - "application/json" - ], - "stability": "experimental", - "urls": [ - { - "methods": [ - "GET" - ], - "path": "/_inference/{task_type}/{model_id}" - } - ], - "visibility": "public" - }, - { - "availability": { - "stack": { - "stability": "experimental", - "visibility": "public" - } - }, - "description": "Perform inference on a model", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/post-inference-api.html", - "name": "inference.inference", - "request": null, - "requestBodyRequired": false, - "response": null, - "responseMediaType": [ - "application/json" - ], - "stability": "experimental", - "urls": [ - { - "methods": [ - "POST" - ], - "path": "/_inference/{task_type}/{model_id}" - } - ], - "visibility": "public" - }, - { - "availability": { - "stack": { - "stability": "experimental", - "visibility": "public" - } - }, - "description": "Configure a model for use in the Inference API", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html", - "name": "inference.put_model", - "request": null, - "requestBodyRequired": false, - "response": null, - "responseMediaType": [ - "application/json" - ], - "stability": "experimental", - "urls": [ - { - "methods": [ - "PUT" - ], - "path": "/_inference/{task_type}/{model_id}" - } - ], - "visibility": "public" - }, { "availability": { "serverless": { @@ -127515,7 +127407,7 @@ "value": { "kind": "instance_of", "type": { - "name": "double", + "name": "float", "namespace": "_types" } } @@ -127697,7 +127589,7 @@ "value": { "kind": "instance_of", "type": { - "name": "double", + "name": "float", "namespace": "_types" } } diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index fed637b7ad..af007866fd 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -892,28 +892,10 @@ ] }, "inference.delete_model": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "inference.get_model": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "inference.inference": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "inference.put_model": { - "request": [ - "Missing request & response" - ], - "response": [] + "request": [], + "response": [ + "response definition inference.delete_model:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" + ] }, "ingest.delete_pipeline": { "request": [], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 4c8234d9c9..0380dcf9fa 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11429,7 +11429,7 @@ export interface IndicesValidateQueryResponse { error?: string } -export type InferenceDenseVector = double[] +export type InferenceDenseVector = float[] export type InferenceInferenceResult = InferenceSparseVector | InferenceDenseVector @@ -11451,7 +11451,7 @@ export interface InferenceServiceSettings { [key: string]: never } -export type InferenceSparseVector = Record +export type InferenceSparseVector = Record export interface InferenceTaskSettings { [key: string]: never diff --git a/specification/inference/_types/Results.ts b/specification/inference/_types/Results.ts index cd16ffa01a..2071311913 100644 --- a/specification/inference/_types/Results.ts +++ b/specification/inference/_types/Results.ts @@ -17,7 +17,7 @@ * under the License. */ -import { double } from '@_types/Numeric' +import { float } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' /** @@ -25,13 +25,13 @@ import { Dictionary } from '@spec_utils/Dictionary' * of string to double. */ -export type SparseVector = Dictionary +export type SparseVector = Dictionary /** * Text Embedding results are represented as Dense Vectors * of doubles. */ -export type DenseVector = Array +export type DenseVector = Array /** * Inference result is the union of all the result types