forked from Mirror/ollama4j
492 B
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.