Amith Koujalgi 9070597c17 updated docs
2023-12-26 17:43:18 +05:30

492 B

sidebar_position
sidebar_position
4

Create Model

This API lets you create a custom model on the Ollama server.

public class CreateModel {

    public static void main(String[] args) {

        String host = "http://localhost:11434/";

        OllamaAPI ollamaAPI = new OllamaAPI(host);

        ollamaAPI.createModel("mycustommodel", "/path/to/modelfile/on/ollama-server");
    }
}

Once created, you can see it when you use list models API.