Advertise a function
Add a schema toresponses.Request.Tools:
Process the call
A returnedOutputMessageUnion.OfFunctionCall carries Name, Arguments as a JSON string, and CallID. Dispatch only recognized functions. Check arguments against your application rules and the caller’s permissions before touching an external system.
Append the model’s output items to the next input using AsInput, then append one matching OfFunctionCallOutput per call. Given call as the returned function call and output as the serialized application result: