Skip to content

Commit

Permalink
excluding logging dependencies brought in by llm ollama client
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Oct 24, 2024
1 parent 320a6b3 commit 9213c6b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
16 changes: 15 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,20 @@
<artifactId>ollama4j</artifactId>
<version>1.0.79</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- LLM end -->

Expand Down Expand Up @@ -2113,4 +2127,4 @@
<system>github</system>
<url>https://github.com/MyRobotLab/myrobotlab/issues</url>
</issueManagement>
</project>
</project>
19 changes: 11 additions & 8 deletions src/main/java/org/myrobotlab/service/LLM.java
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,17 @@ public static void main(String[] args) {

Response response = null;
LLM llm = (LLM) Runtime.start("llm", "LLM");

WebGui webgui = (WebGui) Runtime.create("webgui", "WebGui");
webgui.autoStartBrowser(false);
webgui.startService();

boolean done = true;
if (done) {
return;
}


LLM imagellm = (LLM) Runtime.start("imagellm", "LLM");

llm.config.url = "http://192.168.0.24:11434/v1/chat/completions";
Expand All @@ -566,14 +577,6 @@ public static void main(String[] args) {
System.out.println(response.msg);
}

WebGui webgui = (WebGui) Runtime.create("webgui", "WebGui");
webgui.autoStartBrowser(false);
webgui.startService();

boolean done = true;
if (done) {
return;
}

OpenCV cv = (OpenCV) Runtime.start("cv", "OpenCV");
cv.capture();
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/myrobotlab/service/meta/LLMMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public LLMMeta() {

addDependency("io.github.ollama4j", "ollama4j", "1.0.79");

exclude("org.slf4j", "slf4j-api");
exclude("log4j", "log4j");
exclude("org.slf4j", "slf4j-log4j12");


// add it to one or many categories
addCategory("AI");

Expand Down

0 comments on commit 9213c6b

Please sign in to comment.