Added javadoc, and fixed spelling errors.

This commit is contained in:
2025-03-14 14:32:38 +01:00
parent e7e8b445bf
commit 907f2e42e5
30 changed files with 1177 additions and 194 deletions
@@ -11,8 +11,16 @@ import java.util.*;
import static me.zacharias.chat.core.Core.writeLog;
/**
* The main class of the Display.<br>
* This is the main class for running as a Terminal application.<br>
* Somewhat meant to be used as a Debug tool for testing your API.
*/
public class Display {
/**
* The Core instance.
*/
Core core = new Core(new PrintMessageHandler() {
@Override
public void printMessage(String message) {
@@ -24,25 +32,29 @@ public class Display {
return true;
}
});
/**
* Creates a new instance of Display.<br>
* This Creates the OllamaObject and adds the tools to it. as well as handles the display of the messages. and the input from the user.
*/
public Display()
{
core.setOllamaObject(OllamaObject.builder()
.setModel("llama3-AI")
.keep_alive(10)
.stream(false)
//.stream(false)
.build());
core.addTool(new TimeTool(), "Internal");
core.addTool(new PythonRunner(core), "Internal");
core.addTool(new TimeTool(), Core.Source.EXTERNAL);
core.addTool(new PythonRunner(core), Core.Source.INTERNAL);
writeLog("Creating base OllamaObject with model: "+core.getOllamaObject().getModel());
System.out.println("Installed tools");
writeLog("Tools installed in this instance");
for(Pair<OllamaFuntionTool, String> funtion : core.getFuntionTools())
for(Pair<OllamaFunctionTool, String> funtion : core.getFuntionTools())
{
StringBuilder args = new StringBuilder();
OllamaPerameter perameter = funtion.getKey().parameters();