Added definitions for some things

2026-07-27 20:23:09 +02:00
parent 27826c9d80
commit 6ae85b4b6c
+20 -12
@@ -1,6 +1,14 @@
# How to use NeuroDock # How to use NeuroDock
NeuroDock is a multi-modular Ollama wrapper. many of the modules in the repo are so called CTP's so we will ignore them, these are the important once ## Pre-words
So this page contains some project terms. here are some definitions:
- `CTP`: Compile Time Plugin, this refers to a tool that is provided within the source code of the project
- `RPCP` Reuntime Pre-Compiled Plugin, this is compied prior to running and is loaded from jar files
## Usage
NeuroDock is a multi-modular Ollama wrapper. Many of the modules in the repo are so called CTP's so we will ignore them, these are the important once
- Core - Core
- API - API
@@ -9,24 +17,24 @@ NeuroDock is a multi-modular Ollama wrapper. many of the modules in the repo are
These can be described as These can be described as
## Core ### Core
The core system/module of NeuroDock, it's the actual wrapper around Ollama's REST API and is what this usage guide will focus on The core system/module of NeuroDock, it's the actual wrapper around Ollama's REST API and is what this usage guide will focus on
## API ### API
This provides a RESTful API to connect to a NeuroDock host to add tools via a REST definition and webhook callbacks. This has a sepereat wiki page but is out of date, [API docs](https://git.server.4zellen.se/neurodock/NeuroDock/wiki/API-Docs) This provides a RESTful API to connect to a NeuroDock host to add tools via a REST definition and webhook callbacks. This has a sepereat wiki page but is out of date, [API docs](https://git.server.4zellen.se/neurodock/NeuroDock/wiki/API-Docs)
## Plugin-API ### Plugin-API
This is the provider of RPCP plugin system, or more correctly the end usage as Core contains the actual loader. This is the provider of RPCP plugin system, or more correctly the end usage as Core contains the actual loader.
This can be used to define a plugin that is expected to be more modular, as in it can be loaded at runtime and is not pre-compiled into the application This can be used to define a plugin that is expected to be more modular, as in it can be loaded at runtime and is not pre-compiled into the application
## Display ### Display
This is a example, as well as a sort of Proof of Concept on how to implement NeuroDock This is a example, as well as a sort of Proof of Concept on how to implement NeuroDock
# How to Implement ## How to Implement
## Add maven dependency ### Add maven dependency
### Maven #### Maven
```pom.xml ```pom.xml
<repositories> <repositories>
<repository> <repository>
@@ -42,7 +50,7 @@ This is a example, as well as a sort of Proof of Concept on how to implement Neu
</dependency> </dependency>
``` ```
### Gradle (Groovy) #### Gradle (Groovy)
```build.gradle ```build.gradle
repositories { repositories {
maven { maven {
@@ -56,7 +64,7 @@ dependencies {
} }
``` ```
## Implementation ### Implementation
Core contains multiple importent parts but you mainly need to care about 3 of them for a simple implementation Core contains multiple importent parts but you mainly need to care about 3 of them for a simple implementation
@@ -105,7 +113,7 @@ Now you are ready to actually use the wrapper. How you get the user input, or ge
Now depending on your creation of the `OllamaObject` instance you can do this in different ways Now depending on your creation of the `OllamaObject` instance you can do this in different ways
### Streaming #### Streaming
```java ```java
core.getOllamaObject().addMessage(new OllamaMessage( core.getOllamaObject().addMessage(new OllamaMessage(
OllamaMessageRole.USER, // This represents _who_ is "speaking", enum values are USER, SYSTEM, TOOL, ASSISTENCE. for normal messages you shuld ONLY use USER. OllamaMessageRole.USER, // This represents _who_ is "speaking", enum values are USER, SYSTEM, TOOL, ASSISTENCE. for normal messages you shuld ONLY use USER.
@@ -116,7 +124,7 @@ core.qurryOllama(/* Your implementation of a Consumer<JSONObject> to handle the
}).join(); // The qurryOllama returns a CompletableFuture, we use .join() to hold this thread until it has resolved. }).join(); // The qurryOllama returns a CompletableFuture, we use .join() to hold this thread until it has resolved.
``` ```
## Tool Implementation ### Tool Implementation
This will explain how to register a CTP tool This will explain how to register a CTP tool