Skip to content

Commit 9bcca8d

Browse files
authored
Merge branch 'main' into renovate/scaleway-eslint-config-react-5.x
2 parents 9c4947e + d7d47a0 commit 9bcca8d

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

packages_generated/inference/src/v1/marshalling.gen.ts

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -77,50 +77,6 @@ export const unmarshalEndpoint = (data: unknown): Endpoint => {
7777
} as Endpoint
7878
}
7979

80-
const unmarshalModelSupportedQuantization = (
81-
data: unknown,
82-
): ModelSupportedQuantization => {
83-
if (!isJSONObject(data)) {
84-
throw new TypeError(
85-
`Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`,
86-
)
87-
}
88-
89-
return {
90-
allowed: data.allowed,
91-
maxContextSize: data.max_context_size,
92-
quantizationBits: data.quantization_bits,
93-
} as ModelSupportedQuantization
94-
}
95-
96-
const unmarshalModelSupportedNode = (data: unknown): ModelSupportedNode => {
97-
if (!isJSONObject(data)) {
98-
throw new TypeError(
99-
`Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`,
100-
)
101-
}
102-
103-
return {
104-
nodeTypeName: data.node_type_name,
105-
quantizations: unmarshalArrayOfObject(
106-
data.quantizations,
107-
unmarshalModelSupportedQuantization,
108-
),
109-
} as ModelSupportedNode
110-
}
111-
112-
export const unmarshalModelSupportInfo = (data: unknown): ModelSupportInfo => {
113-
if (!isJSONObject(data)) {
114-
throw new TypeError(
115-
`Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`,
116-
)
117-
}
118-
119-
return {
120-
nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode),
121-
} as ModelSupportInfo
122-
}
123-
12480
const unmarshalDeploymentQuantization = (
12581
data: unknown,
12682
): DeploymentQuantization => {
@@ -165,6 +121,50 @@ export const unmarshalDeployment = (data: unknown): Deployment => {
165121
} as Deployment
166122
}
167123

124+
const unmarshalModelSupportedQuantization = (
125+
data: unknown,
126+
): ModelSupportedQuantization => {
127+
if (!isJSONObject(data)) {
128+
throw new TypeError(
129+
`Unmarshalling the type 'ModelSupportedQuantization' failed as data isn't a dictionary.`,
130+
)
131+
}
132+
133+
return {
134+
allowed: data.allowed,
135+
maxContextSize: data.max_context_size,
136+
quantizationBits: data.quantization_bits,
137+
} as ModelSupportedQuantization
138+
}
139+
140+
const unmarshalModelSupportedNode = (data: unknown): ModelSupportedNode => {
141+
if (!isJSONObject(data)) {
142+
throw new TypeError(
143+
`Unmarshalling the type 'ModelSupportedNode' failed as data isn't a dictionary.`,
144+
)
145+
}
146+
147+
return {
148+
nodeTypeName: data.node_type_name,
149+
quantizations: unmarshalArrayOfObject(
150+
data.quantizations,
151+
unmarshalModelSupportedQuantization,
152+
),
153+
} as ModelSupportedNode
154+
}
155+
156+
const unmarshalModelSupportInfo = (data: unknown): ModelSupportInfo => {
157+
if (!isJSONObject(data)) {
158+
throw new TypeError(
159+
`Unmarshalling the type 'ModelSupportInfo' failed as data isn't a dictionary.`,
160+
)
161+
}
162+
163+
return {
164+
nodes: unmarshalArrayOfObject(data.nodes, unmarshalModelSupportedNode),
165+
} as ModelSupportInfo
166+
}
167+
168168
export const unmarshalModel = (data: unknown): Model => {
169169
if (!isJSONObject(data)) {
170170
throw new TypeError(

0 commit comments

Comments
 (0)