Is there any way to specify some ranges for the parameters passed to a function defined in tools
?
I have one function that accepts as input arguments start_date
and end_date
and I want to prevent the model from calling the function with an end_date
that is too far in the future. I tried to do that
{
"type": "function",
"function": {
"name": "get_historical_daily_data",
"description": "Get the daily historical data for a location. ",
"parameters": {
"type": "object",
"properties": {
"location": location_object,
"start_date": {
"type": "string",
"description": "The start date to retrieve historical data. Needs to be in the format YYYY-mm-dd. The minimum value for this parameter is 1940-01-01, the maximum value is 6 days before today.",
},
"end_date": {
"type": "string",
"description": "The end date to retrieve historical data. Needs to be in the format YYYY-mm-dd. The minimum value for this parameter is 1940-01-01, the maximum value is 6 days before today",
},
},
"required": ["location", "start_date", "end_date"],
"additionalProperties": False,
},
},
"strict": True,
},
but the model seems to ignore the hints about maximum/minimum allowed values. Is there a better way to do it (besides writing the same in the system prompt maybe?).