Next.jsTools
Tools
Certain language models have the ability to use external tools to perform tasks, like using a calculator to solve a math problem or using a browser to search for information. The most common way to share tool information with language models is to share a function definition, along with its description, for it to execute and generate a response based on the output.
In this section, you will learn how to use the tools
parameter to allow language models to call these functions in your Next.js application.