I was under the impression that, in addition to providing the JSON definitions of tools (functions) that you also had to define their trigger and/or reference them in the developer (system) prompt.
While re-factoring here, and removing references to these functions in the developer prompt, the model is still intelligently calling these without their instruction in the initial prompt.
Is simply adding a function/tool to the request enough to let the model know that it has the option to call these?
If it is a function tool that you are developing, it actually performs better if the entirety of what the function is, does, is useful for, and will return is in the function itself.
The tool definition is supplied into an additional part of the first system message for you. The AI receives a different specification format than the JSON you send to the API, which it was trained on employing.
You have lots of room, (1024 characters?), to write a multi-line function description along with descriptions of individual properties.
This also makes it easier on you to switch on and off dynamic functions and not have any confusing artifacts (except for chat history having past tool use).
The “trigger” is the AI finding the tool to be useful enough for input fulfillment to invoke a function call and send to the tool recipient instead of simply producing a user response. get_stock_ticker() might be called for a “should I be getting out of my call position of NVDA?”
This also makes it easier on you to switch on and off dynamic functions and not have any confusing artifacts (except for chat history having past tool use).