How to log tool calls and function calling interactions with Keywords AI
tool_calls
: Array of function calls made by the assistant
id
: Unique identifier for the tool calltype
: Always “function” for function callsfunction.name
: Name of the called functionfunction.arguments
: JSON string of function argumentstool_choice
: Specifies which tool the model should use
type
: “function” for function callingfunction.name
: Name of the preferred functiontools
: Array of available functions
type
: “function” for function definitionsfunction.name
: Function namefunction.description
: What the function doesfunction.parameters
: JSON schema for function parameterstools
array