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

487 B

sidebar_position
sidebar_position
5

Delete Model

This API lets you create a delete a model from the Ollama server.

public class Main {

    public static void main(String[] args) {
        String host = "http://localhost:11434/";
        OllamaAPI ollamaAPI = new OllamaAPI(host);
        ollamaAPI.setVerbose(false);
        ollamaAPI.deleteModel("mycustommodel", true);
    }
}

Once deleted, you can verify it using list models API.