Build AI agents with Friendli Serverless Endpoints using tool calling for dynamic, real-time interactions with LLMs.
web:search
tool.
This time, let’s try it by writing python code.
user
role message.web:search
tool to the tools option.math:calculator
(tool for calculating arithmetic operations)math:statistics
(tool for analyzing statistic data)math:calendar
(tool for handling date-related data)web:search
(tool for retrieving data through the web search)web:url
(tool for extracting data from a given website)code:python-interpreter
(tool for writing and executing python code)file:text
(tool for extracting text data from a given file)user
role message.get_temperature
) goes into the tools option. The function’s parameters are described in JSON schema.arguments
field, which are values extracted from the user’s input that can be used as parameters of the custom function.tool_calls
response as an assistant
role message.get_weather
function as a tool
message to the Chat API again.