Here’s an idea of what’s going on internally:
The language the AI emits can’t be emulated as AI input, as you can’t wedge yourself into that part of the ChatML token container. “Exploit” would be just calling a function, which the AI already does. The AI essentially emits a to=function.function_name
, a message that is addressed to a “recipient”, which recognizes and accepts the AI output (json typical unless you make your own uncharted rules) and gives you the function_call AI language you receive by API.