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)web:search
(tool for retrieving data through the web search)code:python-interpreter
(tool for writing and executing python code)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.