From b14d22edf41f025c89cadcbcf85eb4b9990518c9 Mon Sep 17 00:00:00 2001 From: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com> Date: Thu, 11 Apr 2024 10:33:11 -0400 Subject: [PATCH] [ML] Adding timeout field (#2501) * Adding timeout field * fixing formatting --- output/schema/schema.json | 18 ++++++++++++++++-- output/typescript/types.ts | 1 + .../inference/inference/InferenceRequest.ts | 8 ++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index e724331592..912a770972 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -133181,8 +133181,22 @@ } } ], - "query": [], - "specLocation": "inference/inference/InferenceRequest.ts#L25-L58" + "query": [ + { + "description": "Specifies the amount of time to wait for the inference request to complete.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + } + ], + "specLocation": "inference/inference/InferenceRequest.ts#L26-L66" }, { "body": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 43a9cfc11d..b5cb30c7cf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11986,6 +11986,7 @@ export interface InferenceGetModelResponse { export interface InferenceInferenceRequest extends RequestBase { task_type?: InferenceTaskType inference_id: Id + timeout?: Duration body?: { query?: string input: string | string[] diff --git a/specification/inference/inference/InferenceRequest.ts b/specification/inference/inference/InferenceRequest.ts index ee7dfe1f2d..5aedcfe1bf 100644 --- a/specification/inference/inference/InferenceRequest.ts +++ b/specification/inference/inference/InferenceRequest.ts @@ -17,6 +17,7 @@ * under the License. */ +import { Duration } from '@_types/Time' import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' import { TaskType } from '@inference/_types/TaskType' @@ -39,6 +40,13 @@ export interface Request extends RequestBase { */ inference_id: Id } + query_parameters: { + /** + * Specifies the amount of time to wait for the inference request to complete. + * @server_default 30s + */ + timeout?: Duration + } body: { /** * Query input, required for rerank task.