mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-14 19:37:11 +02:00
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.