Imagine I have two functions: get_city_weather and get_capital_by_country. When a user asks, “What’s the weather like in the UK?” the system sequentially executes two functions: get_capital_by_country followed by get_city_weather. This works well (but not always). However, I’m wondering if there’s a formal method to describe the output parameters of a function, similar to how we define input parameters. This would enhance the reliability of the function call chain.
I was thinking that describing the function’s return parameters would improve the consistency of sequential function calls. For example, in defining an action (such as ChatGPT actions), we can say:
responses:
'200':
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Pets"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"