forked from Chat_things/NeuroDock
Added -h --help to launcher arguments
Added a detailed README renamed the module `luancher` to `launcher`
This commit is contained in:
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@@ -12,7 +12,7 @@
|
|||||||
<option value="$PROJECT_DIR$/API" />
|
<option value="$PROJECT_DIR$/API" />
|
||||||
<option value="$PROJECT_DIR$/Core" />
|
<option value="$PROJECT_DIR$/Core" />
|
||||||
<option value="$PROJECT_DIR$/Display" />
|
<option value="$PROJECT_DIR$/Display" />
|
||||||
<option value="$PROJECT_DIR$/luancher" />
|
<option value="$PROJECT_DIR$/launcher" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
|
|||||||
34
README.md
Normal file
34
README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Chat thing
|
||||||
|
(better name pending probably)
|
||||||
|
|
||||||
|
## What is it?
|
||||||
|
Well it's basically a font end for Ollama like [Open-WebUI](https://openwebui.com/), but meant to run a local model and open up a somewhat easy to use API system for tools.
|
||||||
|
|
||||||
|
## Use cases?
|
||||||
|
While the primary goal is providing a somewhat more modular frontend for Ollama, you can also use this system to integrate AI into your own application, For example AI could act as a player in a game or interact with external system with the use of tools via the API
|
||||||
|
|
||||||
|
simple examples are in the Display module where i gave it the ability to access python through docker and get the current date and time both with the [OllamaFunctionTool](https://server.4zellen.se:3000/Zacharias/chat_thing/src/branch/master/Core/src/main/java/me/zacharias/chat/ollama/OllamaFuntionTool.java) thru my Ollama framework
|
||||||
|
|
||||||
|
## API
|
||||||
|
The documentation for the API is available at the gitea wiki under [API docs](https://server.4zellen.se:3000/Zacharias/chat_thing/wiki/API-Docs)
|
||||||
|
|
||||||
|
## How to run?
|
||||||
|
To run you need to build the `launcher` module<br>
|
||||||
|
`$ ./gradlew :launcher:shadowJar`<br>
|
||||||
|
This will put the `launcher-1.0-all.jar`(or similar, based on the version) in `./launcher/build/libs`, this can now be copied anywhere and can be ran with<br>
|
||||||
|
`$ java -jar launcher-1.0-all.jar`<br>
|
||||||
|
you can use the `-h` argument to get a help message.
|
||||||
|
```
|
||||||
|
Launch options for AI_chat
|
||||||
|
-h --help Provides this help message
|
||||||
|
-s --server Starts the application as API server
|
||||||
|
-p --port Provides the port number that the API server shuld use, defaults to 39075
|
||||||
|
-o --output Redirects the API Server output to another file
|
||||||
|
--api Provides API docs
|
||||||
|
```
|
||||||
|
|
||||||
|
If you only want to build the `Display` or `API` module you can use the same command but replace `launcher` with the desire module.<br>
|
||||||
|
- API: `$ ./gradlew :API:shadowJar`
|
||||||
|
- Display: `$ ./gradlew :Display:shadowJar`
|
||||||
|
- Core: `$ ./gradlew :Core:shadowJar`
|
||||||
|
- However this one is kinda useless unless you want to directly implement the system into your application
|
||||||
@@ -15,6 +15,7 @@ allprojects {
|
|||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'com.gradleup.shadow'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("org.json:json:20250107")
|
implementation("org.json:json:20250107")
|
||||||
|
|||||||
@@ -8,4 +8,10 @@ version = '1.0-SNAPSHOT'
|
|||||||
dependencies {
|
dependencies {
|
||||||
implementation project(":Display")
|
implementation project(":Display")
|
||||||
implementation project(":API")
|
implementation project(":API")
|
||||||
|
}
|
||||||
|
|
||||||
|
jar{
|
||||||
|
manifest {
|
||||||
|
attributes 'Main-Class': 'me.zacharias.chat.launcher.Launcher'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package me.zacharias.chat.luancher;
|
package me.zacharias.chat.launcher;
|
||||||
|
|
||||||
import me.zacharias.chat.api.APIServer;
|
import me.zacharias.chat.api.APIServer;
|
||||||
import me.zacharias.chat.display.Display;
|
import me.zacharias.chat.display.Display;
|
||||||
@@ -35,7 +35,23 @@ public class Launcher {
|
|||||||
System.out.println("API available at https://server.4zellen.se:3000/Zacharias/chat_thing/wiki/API-Docs");
|
System.out.println("API available at https://server.4zellen.se:3000/Zacharias/chat_thing/wiki/API-Docs");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
default -> System.out.println("Unknown argument: " + arg);
|
case "--help", "-h" -> {
|
||||||
|
System.out.println("""
|
||||||
|
Launch options for AI_chat
|
||||||
|
-h --help Provides this help message
|
||||||
|
-s --server Starts the application as API server
|
||||||
|
-p --port Provides the port number that the API server shuld use, defaults to 39075
|
||||||
|
-o --output Redirects the API Server output to another file
|
||||||
|
--api Provides API docs
|
||||||
|
""");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
default -> {
|
||||||
|
System.out.println("Unknown option: " + arg+"\nUse --help for help");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
rootProject.name = 'AI-test'
|
rootProject.name = 'AI-test'
|
||||||
include 'API', 'Core', 'Display', 'luancher'
|
include 'API', 'Core', 'Display', 'launcher'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user