From ba6ccbedb33aa18fc97b2213ee9b0b60df74bf0c Mon Sep 17 00:00:00 2001 From: Eric Deandrea Date: Tue, 10 Dec 2024 10:58:50 -0500 Subject: [PATCH] The current implementation of the Ollama dev service is a hot mess. It doesn't work properly. Therefore I have done the following things: 1. Merged the `quarkus-langchain4j-ollama-devservices` artifact into the `quarkus-langchain4j-ollama-deployment` artifact. 2. The dev service is aware of whether or not there is a local Ollama service running on port `11434`. If so, it doesn't do anything. 3. If there isn't a local Ollama service running on port `11434` then it will start an `ollama/ollama:latest` container on a random port. It will also expose a few configuration properties with values of the host & port the container is running on. 4. The container shares the filesystem location with the Ollama client (`user.home/.ollama`), so any models downloaded by the client or the container are shared with each other, and therefore only need to be downloaded once. 5. The pulling of the required models hasn't changed. The main dev service still uses the Ollama rest api to pull the required models. It is simply passed a URL, which could be the local Ollama client, or it could be a url to a container. It doesn't matter at that point. The documentation has also been updated to reflect everything. --- integration-tests/simple-ollama/pom.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/integration-tests/simple-ollama/pom.xml b/integration-tests/simple-ollama/pom.xml index 7f4b051c9..a6e42afb2 100644 --- a/integration-tests/simple-ollama/pom.xml +++ b/integration-tests/simple-ollama/pom.xml @@ -22,11 +22,6 @@ quarkus-langchain4j-ollama ${project.version} - - io.quarkiverse.langchain4j - quarkus-langchain4j-ollama-devservices - ${project.version} - io.quarkus quarkus-junit5