Skip to content

Commit

Permalink
Upgrade to Quarkus LangChain4j 0.23.3, use the BOM to manage versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jmartisk committed Jan 10, 2025
1 parent 4bf583c commit aa97215
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 29 deletions.
1 change: 0 additions & 1 deletion docs/docs/step-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ If you open the `pom.xml` file, you will see that the project is a Quarkus appli
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>
```

Expand Down
16 changes: 11 additions & 5 deletions docs/docs/step-06.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,18 @@ In this step, we will use the [bge-small-en-q](https://huggingface.co/neuralmagi
--8<-- "../../step-06/pom.xml:embedding-bge"
```

!!! tip
You could also open another terminal and run
[//] FIXME: Can this still be used now that we import the dependency version from quarkus-langchain4j-bom???

```shell
./mvnw quarkus:add-extension -Dextension=dev.langchain4j:langchain4j-embeddings-bge-small-en-q:0.35.0
```
[//]: # (!!! tip)

[//]: # ( You could also open another terminal and run)

[//]: # ()
[//]: # ( ```shell)

[//]: # ( ./mvnw quarkus:add-extension -Dextension=dev.langchain4j:langchain4j-embeddings-bge-small-en-q:0.35.0)

[//]: # ( ```)

This dependency provides the `bge-small-en-q` embedding model.
It will run locally, on your machine.
Expand Down
10 changes: 8 additions & 2 deletions step-01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,7 +44,6 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
Expand Down
10 changes: 8 additions & 2 deletions step-02/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -30,6 +30,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -38,7 +45,6 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
Expand Down
10 changes: 8 additions & 2 deletions step-03/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,7 +44,6 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
Expand Down
10 changes: 8 additions & 2 deletions step-04/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,7 +44,6 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
Expand Down
11 changes: 8 additions & 3 deletions step-05/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,14 +44,12 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<!-- -8<- [start:easy-rag] -->
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-easy-rag</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>
<!-- -8<- [end:easy-rag] -->

Expand Down
12 changes: 8 additions & 4 deletions step-06/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,21 +44,18 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<!-- -8<- [start:embedding-bge] -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-bge-small-en-q</artifactId>
<version>0.35.0</version>
</dependency>
<!-- -8<- [end:embedding-bge] -->
<!-- -8<- [start:pgvector] -->
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-pgvector</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>
<!-- -8<- [end:pgvector] -->

Expand Down
12 changes: 8 additions & 4 deletions step-07/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,18 +44,15 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-bge-small-en-q</artifactId>
<version>0.35.0</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-pgvector</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<!-- -8<- [start:step-7] -->
Expand Down
12 changes: 8 additions & 4 deletions step-08/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<compiler-plugin.version>3.13.0</compiler-plugin.version>

<quarkus.platform.version>3.17.6</quarkus.platform.version>
<quarkus-langchain4j.version>0.21.0</quarkus-langchain4j.version>
<quarkus-langchain4j.version>0.23.3</quarkus-langchain4j.version>
</properties>

<dependencyManagement>
Expand All @@ -29,6 +29,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${quarkus-langchain4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -37,18 +44,15 @@
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-openai</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings-bge-small-en-q</artifactId>
<version>0.35.0</version>
</dependency>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-pgvector</artifactId>
<version>${quarkus-langchain4j.version}</version>
</dependency>

<dependency>
Expand Down

0 comments on commit aa97215

Please sign in to comment.