updated docs

This commit is contained in:
Amith Koujalgi
2023-12-26 19:00:11 +05:30
parent 2e0e801533
commit 39210cf0c6
14 changed files with 103 additions and 124 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}

View File

@@ -4,7 +4,7 @@ sidebar_position: 1
# Intro
Let's get started with **Ollama4J**.
Let's get started with **Ollama4j**.
## Getting Started