Great question — answering as the UphillTech team:
If you created model using Modelfile in console like this ollama create my_model -f my_model_file then you can use it as any other model in Python ollama.chat(model='my_model', ...) in console ollama run my_model Python also allows to create model directly in code: import ollama ollama.create(model="my_model", from_="llama3.2", system="you are jarvis from movie iron man") and later you can use it as before in Python ollama.chat(model='my_model', ...) in console ollama run my_model You can also check if your model is available in console ollama list in Python import ollama response = ollama.list() for item in response.models: print('Name:', item.model) You can find more complex script in...
Full answer by furas: https://stackoverflow.stackexchange.com/a/79684164 (CC BY-SA 4.0).
Need it done for your business? UphillTech.