How to limit the size of the Array transmitted by the plugin

Hi,

I have a plugin, which allows ChatGPT to POST an Array of elements; openapi.yaml:

requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nodes:
                  type: array
                  items:
                    $ref: "#/components/schemas/LinkedNodeCreate"
                  maxItems: 5
              required:
                - nodes
        required: true

… as you see i am trying to restrict the number of elements to be post’ed, because ChatGPT gets into hickups, when calling the Plugin with a large amount of elements. But it seems that ChatGPT ignores the maxItems: 5 restriction.

Any Ideas?

  Thomas

A hacky way that jumps to mind is to just replace the array with 5 string elements item1, iutem2 etc and tell the model to use those in the description rathher than an array, there is no room for things to be missed then…build the array outside of the calll, not sure how practical that would end up being