Ah, I see. The model returns the name of an appropriate tool, then the client takes arbitrary action, and appends the `tool` message to the chat context, and finally a second call to the model minges these together.
Part of me was hoping for some magic plugin space where I could drop named functions, but I couldn't imagine how.
This sample code shows how a sample implementation of a tool like `get_current_weather` might look like in Python:
https://github.com/ollama/ollama-python/blob/main/examples/t...