I wanted to know how far a plain Mac mini M4 with 16 GB can go with local AI. No cloud, no API key, nothing leaving the machine. So I installed Ollama and built five small projects with it: a chat app
Markdown supported · ⌘↵ to post
The tool loop is the part I would adjust before adding the second function from your examples. The displayed snippet calls get_disk_free() for every tool call, regardless of the requested function name. That works for the single-tool demonstration, but a request for system memory would need a different dispatch path.
A small function-name-to-handler mapping, with arguments validated for the selected handler, would make that extension explicit. I would also append response.message once before iterating over its tool calls, then append each tool result separately. Otherwise a response containing multiple calls repeats the same assistant message in the conversation history.
Kartik N V J K
AI Developer | Making AI reliable, trustworthy & accessible to everyone | Active community contributor
Validation loss bottoming at step 100 (1.382) and climbing to 1.811 by step 300 is the overfitting I keep forgetting to watch for. You kept the step-100 checkpoint; I once shipped a later one because training loss was still falling while the held-out set had already turned. Did you settle on 300 total steps by watching that curve, or was it a budget set up front?