Skip to content

Commit

Permalink
The current implementation of the Ollama dev service is a hot mess. I…
Browse files Browse the repository at this point in the history
…t 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.
  • Loading branch information
edeandrea committed Dec 10, 2024
1 parent 08812b6 commit ba6ccbe
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions integration-tests/simple-ollama/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
<artifactId>quarkus-langchain4j-ollama</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-ollama-devservices</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down

0 comments on commit ba6ccbe

Please sign in to comment.