Hi
the following function works with this prompt “Find the location for the following addresses: 123 Main Street, Anytown, Ontario Canada, 456 Second Street, Anytown, Ontario”
(thanks @dlaytonj2 )
functions=[
{
"name": "get_coordinates",
"description": "Get the latitude and longitude of multiple mailing addresses",
"parameters": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"description": "The mailing addresses to be located",
"items": {
"type": "string"
}
}
},
"required": ["addresses"]
}
}
]
but this function does not
functions =
{
"name": "get_weather",
"description": "Get weather from given locations and datetimes",
"parameters": {
"type": "object",
"properties": {
"locations": {
"type": "array",
"description": "The locations for which to get weather information",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of location, e.g. San Francisco, CA"
},
"datetime": {
"type": "string",
"description": "Date or time, e.g. today, tomorrow, 2023-06-29"
},
}
}
}
},
"required": ['locations']
}
}
I used prompt: “Today What’s the weather like in Boston, and what’s the weather in Houston?”
I get this error : "Error code: 400 - {'error': {'message': "'name' is not of type 'object' - 'functions.0'", 'type': 'invalid_request_error', 'param': None, 'code': None}}
It seems model can’t parse nested objects.
any help would be highly apprecisted. thanks a lot!