From e67162df1c20602039893b0b26a7ccf83852805d Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Mon, 25 Aug 2025 13:13:47 +0000 Subject: [PATCH] feat: update generated APIs --- .../inference/src/v1/marshalling.gen.ts | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/packages_generated/inference/src/v1/marshalling.gen.ts b/packages_generated/inference/src/v1/marshalling.gen.ts index 8f46442ee..9fb63c57a 100644 --- a/packages_generated/inference/src/v1/marshalling.gen.ts +++ b/packages_generated/inference/src/v1/marshalling.gen.ts @@ -77,50 +77,6 @@ export const unmarshalEndpoint = (data: unknown): Endpoint => { } as Endpoint } -const unmarshalModelSupportedQuantization = ( - data: unknown, -): ModelSupportedQuantization => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`, - ) - } - - return { - allowed: data.allowed, - maxContextSize: data.max_context_size, - quantizationBits: data.quantization_bits, - } as ModelSupportedQuantization -} - -const unmarshalModelSupportedNode = (data: unknown): ModelSupportedNode => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`, - ) - } - - return { - nodeTypeName: data.node_type_name, - quantizations: unmarshalArrayOfObject( - data.quantizations, - unmarshalModelSupportedQuantization, - ), - } as ModelSupportedNode -} - -export const unmarshalModelSupportInfo = (data: unknown): ModelSupportInfo => { - if (!isJSONObject(data)) { - throw new TypeError( - `Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`, - ) - } - - return { - nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode), - } as ModelSupportInfo -} - const unmarshalDeploymentQuantization = ( data: unknown, ): DeploymentQuantization => { @@ -165,6 +121,50 @@ export const unmarshalDeployment = (data: unknown): Deployment => { } as Deployment } +const unmarshalModelSupportedQuantization = ( + data: unknown, +): ModelSupportedQuantization => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`, + ) + } + + return { + allowed: data.allowed, + maxContextSize: data.max_context_size, + quantizationBits: data.quantization_bits, + } as ModelSupportedQuantization +} + +const unmarshalModelSupportedNode = (data: unknown): ModelSupportedNode => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`, + ) + } + + return { + nodeTypeName: data.node_type_name, + quantizations: unmarshalArrayOfObject( + data.quantizations, + unmarshalModelSupportedQuantization, + ), + } as ModelSupportedNode +} + +const unmarshalModelSupportInfo = (data: unknown): ModelSupportInfo => { + if (!isJSONObject(data)) { + throw new TypeError( + `Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`, + ) + } + + return { + nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode), + } as ModelSupportInfo +} + export const unmarshalModel = (data: unknown): Model => { if (!isJSONObject(data)) { throw new TypeError(