Skip to content

Commit b590f13

Browse files
authored
Simplified tools parameters schema (#72)
Signed-off-by: Ira <IRAR@il.ibm.com>
1 parent f4b1e90 commit b590f13

File tree

1 file changed

+7
-65
lines changed

1 file changed

+7
-65
lines changed

pkg/llm-d-inference-sim/tools_utils.go

Lines changed: 7 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -257,67 +257,6 @@ const schema = `{
257257
"null"
258258
]
259259
},
260-
"properties": {
261-
"type": "object",
262-
"additionalProperties": {
263-
"$ref": "#/$defs/property_definition"
264-
}
265-
},
266-
"items": {
267-
"anyOf": [
268-
{
269-
"$ref": "#/$defs/property_definition"
270-
},
271-
{
272-
"type": "array",
273-
"items": {
274-
"$ref": "#/$defs/property_definition"
275-
}
276-
}
277-
]
278-
},
279-
"required": {
280-
"type": "array",
281-
"items": {
282-
"type": "string"
283-
}
284-
},
285-
"additionalProperties": {
286-
"type": "boolean"
287-
}
288-
},
289-
"required": [
290-
"type"
291-
],
292-
"additionalProperties": false,
293-
"if": {
294-
"properties": {
295-
"type": {
296-
"const": "object"
297-
}
298-
}
299-
},
300-
"then": {
301-
"required": [
302-
"properties"
303-
]
304-
}
305-
},
306-
"property_definition": {
307-
"type": "object",
308-
"properties": {
309-
"type": {
310-
"type": "string",
311-
"enum": [
312-
"string",
313-
"number",
314-
"integer",
315-
"boolean",
316-
"array",
317-
"object",
318-
"null"
319-
]
320-
},
321260
"description": {
322261
"type": "string"
323262
},
@@ -335,18 +274,18 @@ const schema = `{
335274
"properties": {
336275
"type": "object",
337276
"additionalProperties": {
338-
"$ref": "#/$defs/property_definition"
277+
"$ref": "#/$defs/param_definition"
339278
}
340279
},
341280
"items": {
342281
"anyOf": [
343282
{
344-
"$ref": "#/$defs/property_definition"
283+
"$ref": "#/$defs/param_definition"
345284
},
346285
{
347286
"type": "array",
348287
"items": {
349-
"$ref": "#/$defs/property_definition"
288+
"$ref": "#/$defs/param_definition"
350289
}
351290
}
352291
]
@@ -357,7 +296,10 @@ const schema = `{
357296
"type": "string"
358297
}
359298
},
360-
"minItems": {
299+
"additionalProperties": {
300+
"type": "boolean"
301+
},
302+
"minItems": {
361303
"type": "integer",
362304
"minimum": 0
363305
},

0 commit comments

Comments
 (0)