From the archive
Ollama adds tool calling to local model requests
Ollama lets supported models request application-defined tools, including through its OpenAI-compatible endpoint.
Ollama added tool calling on July 25, 2024. Supported models could return requests to application-defined functions instead of answering only with text.
A model requests an action
The application supplied descriptions of the tools available to the model. The model returned a tool name and arguments, and the application could pass the tool's result back into the conversation. This connected a local model to actions such as looking up weather or querying an application's data.
Tool support depended on the chosen model. The announcement named Llama 3.1 , Mistral Nemo, Firefunction v2, and Cohere Command R+ .
Compatible API access
Ollama also added tools to its OpenAI-compatible application programming interface (API). The release made local inference usable in more workflows that already expected a tool-calling model. Executing the requested function remained part of the surrounding application.