mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-11-07 12:00:42 +01:00
updated docs
This commit is contained in:
@@ -15,10 +15,14 @@ Parameters:
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String host = "http://localhost:11434/";
|
||||
|
||||
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||
|
||||
List<Double> embeddings = ollamaAPI.generateEmbeddings(OllamaModelType.LLAMA2,
|
||||
"Here is an article about llamas...");
|
||||
|
||||
embeddings.forEach(System.out::println);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,13 @@ 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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,13 @@ This API lets you get the details of a model on the Ollama server.
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String host = "http://localhost:11434/";
|
||||
|
||||
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||
|
||||
ModelDetail modelDetails = ollamaAPI.getModelDetails(OllamaModelType.LLAMA2);
|
||||
|
||||
System.out.println(modelDetails);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ sidebar_position: 1
|
||||
|
||||
# Intro
|
||||
|
||||
Let's get started with **Ollama4J**.
|
||||
Let's get started with **Ollama4j**.
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
||||
Reference in New Issue
Block a user