Support for minItems and maxItems for FunctionDeclarationSchemaType.ARRAY?
Description of the feature request:
choices: { type: FunctionDeclarationSchemaType.OBJECT, properties: { list: { type: FunctionDeclarationSchemaType.ARRAY, items: { type: FunctionDeclarationSchemaType.STRING, }, minItems: 1, maxItems: 3, }, }, required: ['list'], },
Error logged in Cloud console:
Invalid JSON payload received. Unknown name "maxItems" at 'generation_config.response_schema.properties[1].value.properties[0].value': Cannot find field. [{"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[{"field":"generation_config.response_schema.properties[0].value.properties[0].value","description":"Invalid JSON payload received. Unknown name \"minItems\" at 'generation_config.response_schema.properties[0].value.properties[0].value': Cannot find field."},{"field":"generation_config.response_schema.properties[0].value.properties[0].value","description":"Invalid JSON payload received. Unknown name \"maxItems\" at 'generation_config.response_schema.properties[0].value.properties[0].value': Cannot find field."}]}]
What problem are you trying to solve with this feature?
Allowing setting min and max length of return array is pretty useful for many cases.
Any other information you'd like to share?
No response
We meet the same issues:
- https://github.com/lobehub/lobe-chat/issues/2847
- https://github.com/lobehub/lobe-chat/issues/2537
our dalle plugin has a schema of maxItems and minItems, but Gemini's function calling currently does not support it. so it will cause an error