diff --git a/src/main/java/com/github/jlangch/venice/impl/modules/Modules.java b/src/main/java/com/github/jlangch/venice/impl/modules/Modules.java index eff0e4991..f4a250241 100644 --- a/src/main/java/com/github/jlangch/venice/impl/modules/Modules.java +++ b/src/main/java/com/github/jlangch/venice/impl/modules/Modules.java @@ -51,6 +51,7 @@ public static boolean isValidModule(final VncKeyword module) { "excel-install", "ivy-install", "jansi-install", + "langchain-install", "pdf-install", "qrbill-install", "tomcat-install", @@ -89,6 +90,7 @@ public static boolean isValidModule(final VncKeyword module) { "java", "jsonl", "kira", + "langchain", "math", "matrix", "maven", diff --git a/src/main/resources/com/github/jlangch/venice/bouncycastle-install.venice b/src/main/resources/com/github/jlangch/venice/bouncycastle-install.venice index 73a8557f2..0ea1ad378 100644 --- a/src/main/resources/com/github/jlangch/venice/bouncycastle-install.venice +++ b/src/main/resources/com/github/jlangch/venice/bouncycastle-install.venice @@ -34,6 +34,7 @@ (load-module :installer) + ;; https://www.bouncycastle.org/latest_releases.html#LATEST (defn libraries [] [ "org.bouncycastle:bcprov-jdk18on:1.77" @@ -43,6 +44,7 @@ "org.bouncycastle:bctls-jdk18on:1.77" "org.bouncycastle:bcpg-jdk18on:1.77" ] ) + (defn ^{ :arglists '("(install options*)") :doc @@ -64,5 +66,5 @@ install [ & options] - (apply installer/install-libs (libraries) options)) + (apply installer/install (libraries) options)) diff --git a/src/main/resources/com/github/jlangch/venice/chatgpt-install.venice b/src/main/resources/com/github/jlangch/venice/chatgpt-install.venice index e20ce43ed..92603e711 100644 --- a/src/main/resources/com/github/jlangch/venice/chatgpt-install.venice +++ b/src/main/resources/com/github/jlangch/venice/chatgpt-install.venice @@ -41,30 +41,7 @@ (defn libraries [] [ "com.theokanning.openai-gpt3-java:api:0.18.2" "com.theokanning.openai-gpt3-java:client:0.18.2" - "com.theokanning.openai-gpt3-java:service:0.18.2" - - "com.knuddels:jtokkit:0.6.1" - - "com.squareup.retrofit2:adapter-rxjava2:2.9.0" - "com.squareup.retrofit2:retrofit:2.9.0" - "com.squareup.retrofit2:converter-jackson:2.9.0" - "com.squareup.okhttp3:okhttp:3.14.9" - "com.squareup.okio:okio:1.17.2" - - "com.kjetland:mbknor-jackson-jsonschema_2.12:1.0.39" - - "com.fasterxml.jackson.core:jackson-annotations:2.14.2" - "com.fasterxml.jackson.core:jackson-databind:2.14.2" - "com.fasterxml.jackson.core:jackson-core:2.14.2" - - "io.reactivex.rxjava2:rxjava:2.0.0" - - "javax.validation:validation-api:2.0.1.Final" - - "org.reactivestreams:reactive-streams:1.0.3" - "org.scala-lang:scala-library:2.12.18" ;; we might not need this lib - "org.slf4j:slf4j-api:2.0.10" - ]) + "com.theokanning.openai-gpt3-java:service:0.18.2" ]) (defn @@ -88,4 +65,4 @@ install [ & options] - (apply installer/install-libs (libraries) options)) + (apply installer/install (libraries) options)) diff --git a/src/main/resources/com/github/jlangch/venice/excel-install.venice b/src/main/resources/com/github/jlangch/venice/excel-install.venice index 27dcbbe1a..7d1311517 100644 --- a/src/main/resources/com/github/jlangch/venice/excel-install.venice +++ b/src/main/resources/com/github/jlangch/venice/excel-install.venice @@ -34,29 +34,17 @@ (load-module :installer) -(defn libraries [] +(defn libraries-5.x [] [ "org.apache.poi:poi:5.2.3" "org.apache.poi:poi-ooxml:5.2.3" "org.apache.poi:poi-ooxml-full:5.2.3" - "org.apache.commons:commons-collections4:4.4" - "org.apache.commons:commons-compress:1.21" - "org.apache.commons:commons-math3:3.6.1" - "org.apache.xmlbeans:xmlbeans:5.1.1" - "commons-codec:commons-codec:1.15" - "commons-io:commons-io:2.11.0" - "org.apache.logging.log4j:log4j-api:2.19.0" - "org.apache.logging.log4j:log4j-core:2.19.0" ] ) + "org.apache.logging.log4j:log4j-api:2.20.0" + "org.apache.logging.log4j:log4j-core:2.20.0" ] ) (defn libraries-4.x [] [ "org.apache.poi:poi:4.1.2" - "org.apache.poi:ooxml:4.1.2" - "org.apache.poi:ooxml-schemas:4.1.2" - "org.apache.commons:commons-collections4:4.4" - "org.apache.commons:commons-compress:1.20" - "org.apache.commons:commons-math3:3.6.1" - "org.apache.xmlbeans:xmlbeans:3.1.0" - "commons-codec:commons-codec:1.15" - "commons-io:commons-io:2.11.0" ] ) + "org.apache.poi:poi-ooxml:4.1.2" + "org.apache.poi:poi-ooxml-schemas:4.1.2" ] ) (defn @@ -80,7 +68,7 @@ install [ & options] - (apply installer/install-libs (libraries) options)) + (apply installer/install (libraries-5.x) options)) (defn @@ -106,4 +94,4 @@ install-4.x [ & options] - (apply installer/install-libs (libraries-4.x) options)) + (apply installer/install (libraries-4.x) options)) diff --git a/src/main/resources/com/github/jlangch/venice/langchain-install.venice b/src/main/resources/com/github/jlangch/venice/langchain-install.venice new file mode 100644 index 000000000..b8633dc9d --- /dev/null +++ b/src/main/resources/com/github/jlangch/venice/langchain-install.venice @@ -0,0 +1,66 @@ +;;;; __ __ _ +;;;; \ \ / /__ _ __ (_) ___ ___ +;;;; \ \/ / _ \ '_ \| |/ __/ _ \ +;;;; \ / __/ | | | | (_| __/ +;;;; \/ \___|_| |_|_|\___\___| +;;;; +;;;; +;;;; Copyright 2017-2024 Venice +;;;; +;;;; Licensed under the Apache License, Version 2.0 (the "License"); +;;;; you may not use this file except in compliance with the License. +;;;; You may obtain a copy of the License at +;;;; +;;;; http://www.apache.org/licenses/LICENSE-2.0 +;;;; +;;;; Unless required by applicable law or agreed to in writing, software +;;;; distributed under the License is distributed on an "AS IS" BASIS, +;;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +;;;; See the License for the specific language governing permissions and +;;;; limitations under the License. + + +;;;; Install LangChain4J 3rd party libraries: +;;;; +;;;; (load-module :langchain-install) +;;;; (langchain-install/install :dir (repl/libs-dir) :silent false) +;;;; +;;;; Note: This not a package manager. The module provides functions to +;;;; download Java libraries to a directory. + + +(ns langchain-install) + +(load-module :installer) + + +(defn libraries [] + [ "dev.langchain4j:langchain4j:0.28.0" + "dev.langchain4j:langchain4j-open-ai:0.28.0" + "dev.langchain4j:langchain4j-hugging-face:0.28.0" + "dev.langchain4j:langchain4j-qdrant:0.28.0"] ) + + +(defn + ^{ :arglists '("(install options*)") + :doc + """ + Install the Java 3rd party libraries for the BouncyCastle module. + + Options: + + | :dir path | download dir, defaults to "." | + | :silent {true,false} | if silent is true does not show a progress \ + bar, defaults to true | + """ + :examples '( + """ + (do + (load-module :langchain-install) + (langchain-install/install :dir (repl/libs-dir) :silent false)) + """) } + + install [ & options] + + (apply installer/install (libraries) options)) + diff --git a/src/main/resources/com/github/jlangch/venice/pdf-install.venice b/src/main/resources/com/github/jlangch/venice/pdf-install.venice index a2a18bd6e..8ae192769 100644 --- a/src/main/resources/com/github/jlangch/venice/pdf-install.venice +++ b/src/main/resources/com/github/jlangch/venice/pdf-install.venice @@ -45,6 +45,7 @@ "org.apache.pdfbox:fontbox:3.0.1" "org.slf4j:slf4j-api:2.0.10"]) + (defn ^{ :arglists '("(install options*)") :doc @@ -70,4 +71,5 @@ (load-module :xchart-install) (apply xchart-install/install options) + ;; no dependency reolving, just install the listed libs (apply installer/install-libs (libraries) options)) diff --git a/src/main/resources/com/github/jlangch/venice/qrbill-install.venice b/src/main/resources/com/github/jlangch/venice/qrbill-install.venice index 12987c4c6..daedc633b 100644 --- a/src/main/resources/com/github/jlangch/venice/qrbill-install.venice +++ b/src/main/resources/com/github/jlangch/venice/qrbill-install.venice @@ -72,4 +72,5 @@ (load-module :bouncycastle-install) (apply bouncycastle-install/install options) + ;; no dependency reolving, just install the listed libs (apply installer/install-libs (libraries) options)) diff --git a/src/main/resources/com/github/jlangch/venice/tomcat-install.venice b/src/main/resources/com/github/jlangch/venice/tomcat-install.venice index 9c336cae0..ec1263a4e 100644 --- a/src/main/resources/com/github/jlangch/venice/tomcat-install.venice +++ b/src/main/resources/com/github/jlangch/venice/tomcat-install.venice @@ -38,7 +38,7 @@ (if (= 8 (java-major-version)) [ "org.apache.tomcat.embed:tomcat-embed-core:10.0.27" "jakarta.annotation:jakarta.annotation-api:2.1.1" ] - [ "org.apache.tomcat.embed:tomcat-embed-core:10.1.17" + [ "org.apache.tomcat.embed:tomcat-embed-core:10.1.19" "jakarta.annotation:jakarta.annotation-api:2.1.1" ])) @@ -65,4 +65,4 @@ install [ & options] - (apply installer/install-libs (libraries) options)) + (apply installer/install (libraries) options)) diff --git a/src/main/resources/com/github/jlangch/venice/xchart-install.venice b/src/main/resources/com/github/jlangch/venice/xchart-install.venice index faa9548da..6488a9b87 100644 --- a/src/main/resources/com/github/jlangch/venice/xchart-install.venice +++ b/src/main/resources/com/github/jlangch/venice/xchart-install.venice @@ -58,4 +58,5 @@ install [ & options] + ;; no dependency reolving, just install the xchart lib (apply installer/install-libs (libraries) options))