There is only one way to return the results of a tool call (functions):
- append the assistant response that was emitted as a message
- append the tool return text as a message.
Both of these require matching IDs, because there may be multiple functions emitted at once, and require the assistant + tool pair to both be placed in the proper form. You can follow the link below for a full demo, where here I quote just sending back the value (extending the python messages of the API call)
Answering about things that only have one method is easier than things that have options.
The tool specification should mainly be through the names of the properties, the description text of the properties, and the name and description of the function itself.
You would talk to the AI about the function itself: what the purpose is, what it interfaces with, and what it will return. That alone should be enough for the AI to determine its usefulness, and by removing the tool, you remove any hint of it existing as instructions if you want it disabled.
OpenAI’s function could be better. It implies there is a package to inquire about. Of course, you have the option to only place a tool such as that after you know your customer.