How to make function calling return array as long as I want?

Only the description will be seen. Other JSON-type qualities, such as "minItems", string formats, etc, are not passed to the AI.

Additionally, descriptions of inner array items are not passed.

Even “required”, seen in examples, doesn’t seem to have an AI language interpretation.

Consider the AI not likely to easily construct and fill new elements of an array, but only to fulfill the structure of parameters, as described.

Lets enhance:

{
    "name": "give_word_synonyms",
    "description": "Supplies formatted synonyms to the user for any synonym request",
    "parameters": {
        "type": "object",
        "properties": {
            "synonym_csv": {
                "type": "string",
                "description": "AI must discover exactly ten (10) synonyms, comma-separated"}, 
            "synonym_usage_csv": {
                "type": "number",
                "description": "AI must rank each of 10 selected from 0=rare to 10=common, comma-separated"},
            "synonym_style_csv": {
                "type": "string",
                "description": "AI must classify each of 10 selected from [formal, informal, slang] , comma-separated"
            },
        },
        "required": ["synonym_csv","synonym_usage_csv","synonym_style_csv"]
    }
}
1 Like