Great question — answering as the UphillTech team:
You must always have the model available on the Ollama server when calling from API. The Ollama CLI interface would pull it for you, but it won't do the same for the API. You have to pull it first. Since you are using Ollama Python Library, you can use the following to list all the models available on your server and pull the models you want to the server. You always need to pull before you use it for API access. List all models ollama.list() Pull model ollama.pull('llama3.2') Check Ollama API doc for more details.
Full answer by Tim Chiu: https://stackoverflow.stackexchange.com/a/79675328 (CC BY-SA 4.0).
Need it done for your business? UphillTech.