Is there any way to tell the Functions API and Assistants API not to return the the 'instructions' and 'parameters' of the 'function' back in the result to reduce the response size and save cost?

Hi,

Currently the Functions API and the Assistants API beta both return the ‘instructions’ and the ‘parameters’ of the ‘function’ back in the result. These two objects in the result are technically not needed to be returned back to the caller as they know in advance what request they are sending to Open AI. Are they necessary for the Open AI to return back on each response?

Is there any way to tell the Functions API and Assistants API not to return the redundant ‘instructions’ and ‘parameters’ of the ‘function’ in each response(result) back? This will reduce the network bandwidth usage and the number of tokens in the result and hence saving significant cost?

“instructions”: “Some intruction…”,
“tools”: [
{
“type”: “function”,
“function”: {
“name”: “some_function”,
“description”: “Some description”,
“parameters”: {
// This chunk comes back in the result

Best regards,
Diwakar

The only tokens that are consuming your budget are those that are sent and received from the AI model internally.

More metadata in API methods doesn’t cost you anything and isn’t seen by the AI.

1 Like

Thanks for the clarification. It’s great to know that the redundant ‘instructions’ and ‘parameters’ of the ‘function’ in each response(result) back are not counted for the billable tokens.

Is there any possibility (or scoped for future at least) to tell the Functions API and Assistants API not to return the redundant ‘instructions’ and ‘parameters’ back in the response to reduce network data transfer? Your reply will be much appreciated. Thank you.