Hi,
I have a function, which has array of mixed parameters like showen below.
{
"name": "call_user_func_array",
"description": "This function stands as a potent gateway, enabling dynamic interaction with the live WordPress and PHP environment. It skillfully encapsulates PHP's native `call_user_func_array()` function, allowing for the d
irect invocation of PHP functions with an array of arguments, thereby harnessing PHP\u2019s innate capabilities and reflecting immediate changes within the system's operational sphere.\n\nEvery execution will return a JSON object, always
featuring a `function_result` field, encapsulating the function's return value. This structured return format ensures a standardized, readable output, simplifying subsequent processing and interpretation.\n\nWhen a function execution co
ncludes due to a thrown exception, the return value will be a JSON object. The exception message can be accessed through the 'error' field in this JSON object.",
"parameters": {
"type": "object",
"properties": {
"callback": {
"type": "string",
"description": "Specifies the name of the PHP function to be invoked, symbolizing the specific PHP operation the system aims to execute. Core PHP and WordPress functions are readily available. For other familiar f
unctions, the system checks against loaded PHP extensions and WordPress plugins, which are consistently present in the operational context."
},
"args": {
"type": "array",
"items": {
"type": [
"object",
"array",
"string",
"number",
"boolean",
"null"
]
},
"description": "Represents an array encapsulating the parameters intended for the specified PHP function. Each element within this array directly corresponds to the arguments accepted by the target function. It\u2019s essential to enclose all parameters within an array to maintain a consistent structure and ensure precise argument delivery, even if there\u2019s only a single argument."
}
},
"required": [
"callback"
]
}
}
I am using it without any issue on gpt-4
and gpt-3.5-turbo
, while when I tried it with gpt-4-1106-preview
, it fails with the following message:
Invalid schema for function 'call_user_func_array': In context=('properties', 'args', 'items', 'type', '1'), array schema missing items
It’s kind of strange, beacuse it’s strictly technical functionality that one could expect not to be tied to a models.