Skip to content

Commit

Permalink
Improve the documentation for better Quarkus LangChain4j version alig…
Browse files Browse the repository at this point in the history
…nment #6288 (#6289)
  • Loading branch information
aldettinger authored Jul 24, 2024
1 parent 72374dc commit ad1aa5c
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/modules/ROOT/pages/reference/extensions/langchain4j-chat.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,26 @@ Or add the coordinates to your existing project:
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]

[id="extensions-langchain4j-chat-quarkus-langchain4j-bom"]
== Ensure Quarkus LangChain4j dependencies version alignment with the Bom

In order to ensure alignment across all Quarkus and LangChain4j related dependencies, it is recommended to import the Quarkus LangChain4j bom as below:
[source,xml]
----
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${insert your version here}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
...
</dependencyManagement>
----

Note that the import order is paramount when using maven `dependencyManagement`.
As such, one might need to import the `quarkus-langchain4j-bom` before other related Camel and Quarkus boms.
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,26 @@ Please refer to the above link for usage and configuration details.
ifeval::[{doc-show-user-guide-link} == true]
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
endif::[]

[id="extensions-langchain4j-embeddings-quarkus-langchain4j-bom"]
== Ensure Quarkus LangChain4j dependencies version alignment with the Bom

In order to ensure alignment across all Quarkus and LangChain4j related dependencies, it is recommended to import the Quarkus LangChain4j bom as below:
[source,xml]
----
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${insert your version here}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
...
</dependencyManagement>
----

Note that the import order is paramount when using maven `dependencyManagement`.
As such, one might need to import the `quarkus-langchain4j-bom` before other related Camel and Quarkus boms.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
ext.getQuarkusAwsClientBaseName(),
ext.getQuarkusAwsClientFqClassName(),
ext.getRuntimePomXmlPath()));
model.put("activatesQuarkusLangChain4jBom", ext.getRuntimeArtifactId().contains("langchain4j"));
model.put("configOptions", listConfigOptions(basePath, multiModuleProjectDirectory.toPath()));
model.put("humanReadableKind", new TemplateMethodModelEx() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,31 @@ You will also need to enable serialization for the exception classes that you in
@RegisterForReflection(targets = { IllegalStateException.class, MyCustomException.class }, serialization = true)
----
[/#if]
[#if activatesQuarkusLangChain4jBom ]

[id="extensions-[=artifactIdBase]-quarkus-langchain4j-bom"]
== Ensure Quarkus LangChain4j dependencies version alignment with the Bom

In order to ensure alignment across all Quarkus and LangChain4j related dependencies, it is recommended to import the Quarkus LangChain4j bom as below:
[source,xml]
----
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.quarkiverse.langchain4j</groupId>
<artifactId>quarkus-langchain4j-bom</artifactId>
<version>${insert your version here}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
...
</dependencyManagement>
----

Note that the import order is paramount when using maven `dependencyManagement`.
As such, one might need to import the `quarkus-langchain4j-bom` before other related Camel and Quarkus boms.
[/#if]
[#if configuration?? || quarkusAwsClient?? || configOptions?size != 0 ]

[id="extensions-[=artifactIdBase]-additional-camel-quarkus-configuration"]
Expand Down

0 comments on commit ad1aa5c

Please sign in to comment.