Summary
-
function#parameters declare type as “array” does not supported.
-
function#properties declare type as “string”, “number” and define pattern,length,range,etc does not supported.
Numeric types — Understanding JSON Schema 2020-12 documentation
string — Understanding JSON Schema 2020-12 documentation -
function#properties declare type as “string” with “enum”, but function_call response return unknown value.
# input:
"race": {
"type":"string",
"enum": ["orc","human","gremlin"]
}
# outout: dragon
Example
{
"name": "generate_monster",
"description": "generate monster with attributes.",
"parameters": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$"
},
"attack": {
"type": "number",
"minimum": 20,
"exclusiveMaximum": 100,
"description": "The temperature unit to use. Infer this from the monster attack."
},
"hp": {
"type": "number",
"minimum": 2000,
"description": "The monster hp"
},
"race": {
"type": "string",
"enum": [
"human",
"orc",
"gremlin",
"dragon"
],
"description": "The temperature unit to use. Infer this from the monster race."
}
},
"required": [
"name",
"attack",
"hp",
"race"
]
}
}