story
OpenAI is already on it. The latest gen of GPT-3 and -4 are finetuned to respond to "do this thing" commands with JSON structured to:
- provide the name of a given function call
- provide arguments to that function call
it's "early stage", which in this case probably means "good enough to be useful within a month or two", given the rate at which these things have been developing.
Anecdotally, I've been playing with giving the models instructions like:
"When asked to perform a task that you need a tool to accomplish, you will call the tool according to its documentation by this format:
TOOL_NAME(*args)
Below you will find the documentation for your tools."
...and I've gotten it working pretty damn well (not even with the JSON-finetuned models, mind you). All you really need is python-style docstrings and a minimal parser and you're off to the races. I recommend anyone interested play with it a bit.