This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push: new 0f7f3c0306 Add langchain-chat extension 0f7f3c0306 is described below commit 0f7f3c0306a7e5cd574900a04d922b3a40674f10 Author: shravani <spatn...@redhat.com> AuthorDate: Sat May 4 12:14:56 2024 +0530 Add langchain-chat extension * Langchain-chat extension * Adding missing license header * Fixing the format CI failure --- catalog/pom.xml | 13 +++ .../ROOT/examples/components/langchain-chat.yml | 13 +++ docs/modules/ROOT/nav.adoc | 1 + .../pages/reference/extensions/langchain-chat.adoc | 41 +++++++ extensions-jvm/langchain-chat/deployment/pom.xml | 63 ++++++++++ .../chat/deployment/LangchainChatProcessor.java | 46 ++++++++ extensions-jvm/langchain-chat/pom.xml | 39 +++++++ extensions-jvm/langchain-chat/runtime/pom.xml | 100 ++++++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 33 ++++++ extensions-jvm/pom.xml | 1 + integration-tests-jvm/langchain-chat/README.adoc | 20 ++++ integration-tests-jvm/langchain-chat/pom.xml | 127 +++++++++++++++++++++ .../langchain/chat/it/LangchainChatResource.java | 118 +++++++++++++++++++ .../component/langchain/chat/it/OllamaRoute.java | 60 ++++++++++ .../langchain/chat/it/LangchainChatTest.java | 48 ++++++++ .../langchain/chat/it/OllamaTestResource.java | 44 +++++++ .../test/resources/mappings/multipleMessages.json | 24 ++++ .../src/test/resources/mappings/promptMessage.json | 24 ++++ .../src/test/resources/mappings/simpleMessage.json | 24 ++++ integration-tests-jvm/pom.xml | 1 + poms/bom-test/pom.xml | 6 + poms/bom/pom.xml | 15 +++ poms/bom/src/main/generated/flattened-full-pom.xml | 15 +++ .../src/main/generated/flattened-reduced-pom.xml | 15 +++ .../generated/flattened-reduced-verbose-pom.xml | 15 +++ 25 files changed, 906 insertions(+) diff --git a/catalog/pom.xml b/catalog/pom.xml index 737bf30e51..ecb81d2ba6 100644 --- a/catalog/pom.xml +++ b/catalog/pom.xml @@ -2437,6 +2437,19 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-langchain-embeddings</artifactId> diff --git a/docs/modules/ROOT/examples/components/langchain-chat.yml b/docs/modules/ROOT/examples/components/langchain-chat.yml new file mode 100644 index 0000000000..17aae306b1 --- /dev/null +++ b/docs/modules/ROOT/examples/components/langchain-chat.yml @@ -0,0 +1,13 @@ +# Do not edit directly! +# This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page +cqArtifactId: camel-quarkus-langchain-chat +cqArtifactIdBase: langchain-chat +cqNativeSupported: false +cqStatus: Preview +cqDeprecated: false +cqJvmSince: 3.11.0 +cqNativeSince: n/a +cqCamelPartName: langchain-chat +cqCamelPartTitle: langChain4j Chat +cqCamelPartDescription: LangChain4j Chat component +cqExtensionPageTitle: langChain4j Chat diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 0f9072b11d..7731020321 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -330,6 +330,7 @@ *** xref:reference/extensions/grpc.adoc[gRPC] *** xref:reference/extensions/ical.adoc[iCal] *** xref:reference/extensions/joor.adoc[jOOR] +*** xref:reference/extensions/langchain-chat.adoc[langChain4j Chat] *** xref:reference/extensions/univocity-parsers.adoc[uniVocity CSV]// extensions: END ** xref:reference/components.adoc[Components] ** xref:reference/dataformats.adoc[Data formats] diff --git a/docs/modules/ROOT/pages/reference/extensions/langchain-chat.adoc b/docs/modules/ROOT/pages/reference/extensions/langchain-chat.adoc new file mode 100644 index 0000000000..d5db2feedd --- /dev/null +++ b/docs/modules/ROOT/pages/reference/extensions/langchain-chat.adoc @@ -0,0 +1,41 @@ +// Do not edit directly! +// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page +[id="extensions-langchain-chat"] += langChain4j Chat +:linkattrs: +:cq-artifact-id: camel-quarkus-langchain-chat +:cq-native-supported: false +:cq-status: Preview +:cq-status-deprecation: Preview +:cq-description: LangChain4j Chat component +:cq-deprecated: false +:cq-jvm-since: 3.11.0 +:cq-native-since: n/a + +ifeval::[{doc-show-badges} == true] +[.badges] +[.badge-key]##JVM since##[.badge-supported]##3.11.0## [.badge-key]##Native##[.badge-unsupported]##unsupported## +endif::[] + +LangChain4j Chat component + +[id="extensions-langchain-chat-whats-inside"] +== What's inside + +* xref:{cq-camel-components}::langchain4j-chat-component.adoc[langChain4j Chat component], URI syntax: `langchain-chat:chatId` + +Please refer to the above link for usage and configuration details. + +[id="extensions-langchain-chat-maven-coordinates"] +== Maven coordinates + +[source,xml] +---- +<dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat</artifactId> +</dependency> +---- +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::[] diff --git a/extensions-jvm/langchain-chat/deployment/pom.xml b/extensions-jvm/langchain-chat/deployment/pom.xml new file mode 100644 index 0000000000..00faf8db11 --- /dev/null +++ b/extensions-jvm/langchain-chat/deployment/pom.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat-parent</artifactId> + <version>3.11.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-langchain-chat-deployment</artifactId> + <name>Camel Quarkus :: langChain4j Chat :: Deployment</name> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/extensions-jvm/langchain-chat/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/chat/deployment/LangchainChatProcessor.java b/extensions-jvm/langchain-chat/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/chat/deployment/LangchainChatProcessor.java new file mode 100644 index 0000000000..65c97b327a --- /dev/null +++ b/extensions-jvm/langchain-chat/deployment/src/main/java/org/apache/camel/quarkus/component/langchain/chat/deployment/LangchainChatProcessor.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +package org.apache.camel.quarkus.component.langchain.chat.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.annotations.ExecutionTime; +import io.quarkus.deployment.annotations.Record; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild; +import org.apache.camel.quarkus.core.JvmOnlyRecorder; +import org.jboss.logging.Logger; + +class LangchainChatProcessor { + + private static final Logger LOG = Logger.getLogger(LangchainChatProcessor.class); + private static final String FEATURE = "camel-langchain-chat"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + /** + * Remove this once this extension starts supporting the native mode. + */ + @BuildStep(onlyIf = NativeOrNativeSourcesBuild.class) + @Record(value = ExecutionTime.RUNTIME_INIT) + void warnJvmInNative(JvmOnlyRecorder recorder) { + JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time + recorder.warnJvmInNative(FEATURE); // warn at runtime + } +} diff --git a/extensions-jvm/langchain-chat/pom.xml b/extensions-jvm/langchain-chat/pom.xml new file mode 100644 index 0000000000..d776e36b29 --- /dev/null +++ b/extensions-jvm/langchain-chat/pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-extensions-jvm</artifactId> + <version>3.11.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-langchain-chat-parent</artifactId> + <name>Camel Quarkus :: langChain4j Chat</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions-jvm/langchain-chat/runtime/pom.xml b/extensions-jvm/langchain-chat/runtime/pom.xml new file mode 100644 index 0000000000..3fe529e651 --- /dev/null +++ b/extensions-jvm/langchain-chat/runtime/pom.xml @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat-parent</artifactId> + <version>3.11.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-langchain-chat</artifactId> + <name>Camel Quarkus :: langChain4j Chat :: Runtime</name> + <description>LangChain4j Chat component</description> + + <properties> + <camel.quarkus.jvmSince>3.11.0</camel.quarkus.jvmSince> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-langchain-chat</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + + + <profiles> + <profile> + <id>full</id> + <activation> + <property> + <name>!quickly</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-maven-plugin</artifactId> + <executions> + <execution> + <id>update-extension-doc-page</id> + <goals> + <goal>update-extension-doc-page</goal> + </goals> + <phase>process-classes</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> diff --git a/extensions-jvm/langchain-chat/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions-jvm/langchain-chat/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000000..207061a2e1 --- /dev/null +++ b/extensions-jvm/langchain-chat/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,33 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. +# + +# This is a generated file. Do not edit directly! +# To re-generate, run the following command from the top level directory: +# +# mvn -N cq:update-quarkus-metadata +# +--- +name: "Camel langChain4j Chat" +description: "LangChain4j Chat component" +metadata: + icon-url: "https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg" + unlisted: true + guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/langchain-chat.html" + categories: + - "integration" + status: + - "preview" diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml index 98cecadb26..9dd01a72b0 100644 --- a/extensions-jvm/pom.xml +++ b/extensions-jvm/pom.xml @@ -78,6 +78,7 @@ <module>jooq</module> <module>json-patch</module> <module>jsonapi</module> + <module>langchain-chat</module> <module>langchain-embeddings</module> <module>ldif</module> <module>lucene</module> diff --git a/integration-tests-jvm/langchain-chat/README.adoc b/integration-tests-jvm/langchain-chat/README.adoc new file mode 100644 index 0000000000..307a807ef7 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/README.adoc @@ -0,0 +1,20 @@ +== Camel Quarkus Langchain4j Chat Integration Tests + +By default, the Langchain4j-chat integration tests use WireMock to stub Ollama API interactions. + +To run the `camel-quarkus-langchain4j-chat` integration tests against the real API, you need a Ollama instance running with the `orca-mini` model downloaded. + +When Ollama is running, set the following environment variables: + +[source,shell] +---- +export OLLAMA_URL=your-ollama-api-url +---- + +If the WireMock stub recordings need updating, then remove the existing files from `src/test/resources/mappings` and run tests with either: + +System property `-Dwiremock.record=true` + +Or + +Set environment variable `WIREMOCK_RECORD=true` diff --git a/integration-tests-jvm/langchain-chat/pom.xml b/integration-tests-jvm/langchain-chat/pom.xml new file mode 100644 index 0000000000..3bc321b15f --- /dev/null +++ b/integration-tests-jvm/langchain-chat/pom.xml @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-build-parent-it</artifactId> + <version>3.11.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent-it/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-integration-test-langchain-chat</artifactId> + <name>Camel Quarkus :: Integration Tests :: langChain4j Chat</name> + <description>Integration tests for Camel Quarkus langChain4j Chat extension</description> + + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-mock</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-direct</artifactId> + </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-resteasy</artifactId> + </dependency> + <dependency> + <groupId>dev.langchain4j</groupId> + <artifactId>langchain4j-ollama</artifactId> + </dependency> + + <!-- test dependencies --> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-junit5</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.rest-assured</groupId> + <artifactId>rest-assured</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-integration-wiremock-support</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <profiles> + <profile> + <id>virtualDependencies</id> + <activation> + <property> + <name>!noVirtualDependencies</name> + </property> + </activation> + <dependencies> + <!-- The following dependencies guarantee that this module is built after them. You can update them by running `mvn process-resources -Pformat -N` from the source tree root directory --> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-direct-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-mock-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>*</groupId> + <artifactId>*</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </profile> + </profiles> +</project> diff --git a/integration-tests-jvm/langchain-chat/src/main/java/org/apache/camel/quarkus/component/langchain/chat/it/LangchainChatResource.java b/integration-tests-jvm/langchain-chat/src/main/java/org/apache/camel/quarkus/component/langchain/chat/it/LangchainChatResource.java new file mode 100644 index 0000000000..5b84f27c30 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/main/java/org/apache/camel/quarkus/component/langchain/chat/it/LangchainChatResource.java @@ -0,0 +1,118 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +package org.apache.camel.quarkus.component.langchain.chat.it; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import dev.langchain4j.data.message.AiMessage; +import dev.langchain4j.data.message.ChatMessage; +import dev.langchain4j.data.message.SystemMessage; +import dev.langchain4j.data.message.UserMessage; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.core.Response; +import org.apache.camel.CamelContext; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.component.chat.LangChainChat; +import org.apache.camel.component.mock.MockEndpoint; + +@Path("/langchain-chat") +@ApplicationScoped +public class LangchainChatResource { + @Inject + CamelContext context; + + @Inject + ProducerTemplate producerTemplate; + + @Path("/simple-message") + @GET + public Response sendSimpleMessage() throws Exception { + MockEndpoint mockEndpoint = context.getEndpoint("mock:simpleMessageResponse", MockEndpoint.class); + mockEndpoint.expectedMessageCount(1); + mockEndpoint.expectedMessagesMatches(exchange -> { + String body = exchange.getMessage().getBody(String.class); + return body.trim().startsWith("Hello"); + }); + + producerTemplate.sendBody("direct:send-simple-message", "Hello my name is Darth Vader!"); + mockEndpoint.assertIsSatisfied(10000); + + return Response.ok().build(); + } + + @Path("/prompt-message") + @GET + public Response sendMessageWithPrompt() throws Exception { + MockEndpoint mockEndpoint = context.getEndpoint("mock:messagePromptResponse", MockEndpoint.class); + mockEndpoint.expectedMessageCount(1); + mockEndpoint.expectedMessagesMatches(exchange -> { + String body = exchange.getMessage().getBody(String.class); + body = body.trim(); + return body.contains("potato") && + body.contains("tomato") && + body.contains("feta") && + body.contains("olive oil"); + }); + + var promptTemplate = "Create a recipe for a {{dishType}} with the following ingredients: {{ingredients}}"; + + Map<String, Object> variables = new HashMap<>(); + variables.put("dishType", "oven dish"); + variables.put("ingredients", "potato, tomato, feta, olive oil"); + + producerTemplate.sendBodyAndHeader("direct:send-message-prompt", variables, + LangChainChat.Headers.PROMPT_TEMPLATE, promptTemplate); + + mockEndpoint.assertIsSatisfied(10000); + + return Response.ok().build(); + } + + @Path("/multiple-messages") + @GET + public Response sendMultipleMessage() throws Exception { + MockEndpoint mockEndpoint = context.getEndpoint("mock:multipleMessageResponse", MockEndpoint.class); + mockEndpoint.expectedMessageCount(1); + mockEndpoint.expectedMessagesMatches(exchange -> { + String body = exchange.getMessage().getBody(String.class); + return body.trim().contains("I would recommend"); + }); + + List<ChatMessage> messages = new ArrayList<>(); + messages.add(new SystemMessage("You are asked to provide recommendations for a restaurant based on user reviews.")); + messages.add(new UserMessage("Hello, my name is Karen.")); + messages.add(new AiMessage("Hello Karen, how can I help you?")); + messages.add(new UserMessage("I'd like you to recommend a restaurant for me.")); + messages.add(new AiMessage("Sure, what type of cuisine are you interested in?")); + messages.add(new UserMessage("I'd like Moroccan food.")); + messages.add(new AiMessage("Sure, do you have a preference for the location?")); + messages.add(new UserMessage("Paris, Rue Montorgueil.")); + + producerTemplate.sendBody("direct:send-multiple", messages); + + mockEndpoint.assertIsSatisfied(10000); + + return Response.ok().build(); + } + +} diff --git a/integration-tests-jvm/langchain-chat/src/main/java/org/apache/camel/quarkus/component/langchain/chat/it/OllamaRoute.java b/integration-tests-jvm/langchain-chat/src/main/java/org/apache/camel/quarkus/component/langchain/chat/it/OllamaRoute.java new file mode 100644 index 0000000000..8c711230f4 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/main/java/org/apache/camel/quarkus/component/langchain/chat/it/OllamaRoute.java @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +package org.apache.camel.quarkus.component.langchain.chat.it; + +import dev.langchain4j.model.chat.ChatLanguageModel; +import dev.langchain4j.model.ollama.OllamaChatModel; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Named; +import org.apache.camel.builder.RouteBuilder; +import org.eclipse.microprofile.config.inject.ConfigProperty; + +import static java.time.Duration.ofSeconds; + +@ApplicationScoped +public class OllamaRoute extends RouteBuilder { + + private static final String OLLAMA_MODEL = "orca-mini"; + + @ConfigProperty(name = "ollama.base.url") + String ollamaBaseUrl; + + @Named + ChatLanguageModel chatModel() { + return OllamaChatModel.builder() + .baseUrl(ollamaBaseUrl) + .modelName(OLLAMA_MODEL) + .temperature(0.3) + .timeout(ofSeconds(10000)) + .build(); + } + + @Override + public void configure() throws Exception { + from("direct:send-simple-message?timeout=30000") + .to("langchain-chat:test1?chatModel=#chatModel&chatOperation=CHAT_SINGLE_MESSAGE") + .to("mock:simpleMessageResponse"); + + from("direct:send-message-prompt?timeout=30000") + .to("langchain-chat:test2?chatModel=#chatModel&chatOperation=CHAT_SINGLE_MESSAGE_WITH_PROMPT") + .to("mock:messagePromptResponse"); + + from("direct:send-multiple?timeout=30000") + .to("langchain-chat:test2?chatModel=#chatModel&chatOperation=CHAT_MULTIPLE_MESSAGES") + .to("mock:multipleMessageResponse"); + } +} diff --git a/integration-tests-jvm/langchain-chat/src/test/java/org/apache/camel/quarkus/component/langchain/chat/it/LangchainChatTest.java b/integration-tests-jvm/langchain-chat/src/test/java/org/apache/camel/quarkus/component/langchain/chat/it/LangchainChatTest.java new file mode 100644 index 0000000000..c8312e0626 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/test/java/org/apache/camel/quarkus/component/langchain/chat/it/LangchainChatTest.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +package org.apache.camel.quarkus.component.langchain.chat.it; + +import io.quarkus.test.common.QuarkusTestResource; +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import org.junit.jupiter.api.Test; + +@QuarkusTest +@QuarkusTestResource(OllamaTestResource.class) +class LangchainChatTest { + + @Test + void simpleMessage() { + RestAssured.get("/langchain-chat/simple-message") + .then() + .statusCode(200); + } + + @Test + void promptMessage() { + RestAssured.get("/langchain-chat/prompt-message") + .then() + .statusCode(200); + } + + @Test + void multipleMessages() { + RestAssured.get("/langchain-chat/multiple-messages") + .then() + .statusCode(200); + } +} diff --git a/integration-tests-jvm/langchain-chat/src/test/java/org/apache/camel/quarkus/component/langchain/chat/it/OllamaTestResource.java b/integration-tests-jvm/langchain-chat/src/test/java/org/apache/camel/quarkus/component/langchain/chat/it/OllamaTestResource.java new file mode 100644 index 0000000000..30017a095a --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/test/java/org/apache/camel/quarkus/component/langchain/chat/it/OllamaTestResource.java @@ -0,0 +1,44 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +package org.apache.camel.quarkus.component.langchain.chat.it; + +import java.util.Map; + +import org.apache.camel.quarkus.test.wiremock.WireMockTestResourceLifecycleManager; + +public class OllamaTestResource extends WireMockTestResourceLifecycleManager { + private static final String OLLAMA_ENV_URL = "OLLAMA_URL"; + + @Override + public Map<String, String> start() { + Map<String, String> properties = super.start(); + String wiremockUrl = properties.get("wiremock.url"); + String url = wiremockUrl != null ? wiremockUrl : getRecordTargetBaseUrl(); + properties.put("ollama.base.url", url); + return properties; + } + + @Override + protected String getRecordTargetBaseUrl() { + return System.getenv(OLLAMA_ENV_URL); + } + + @Override + protected boolean isMockingEnabled() { + return !envVarsPresent(OLLAMA_ENV_URL); + } +} diff --git a/integration-tests-jvm/langchain-chat/src/test/resources/mappings/multipleMessages.json b/integration-tests-jvm/langchain-chat/src/test/resources/mappings/multipleMessages.json new file mode 100644 index 0000000000..f18bf54a51 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/test/resources/mappings/multipleMessages.json @@ -0,0 +1,24 @@ +{ + "id" : "5720afb6-10d1-4038-8f8f-f08d89180b14", + "name" : "api_chat", + "request" : { + "url" : "/api/chat", + "method" : "POST", + "bodyPatterns" : [ { + "equalToJson" : "{\"model\":\"orca-mini\",\"messages\":[{\"role\":\"SYSTEM\",\"content\":\"You are asked to provide recommendations for a restaurant based on user reviews.\"},{\"role\":\"USER\",\"content\":\"Hello, my name is Karen.\"},{\"role\":\"ASSISTANT\",\"content\":\"Hello Karen, how can I help you?\"},{\"role\":\"USER\",\"content\":\"I\\u0027d like you to recommend a restaurant for me.\"},{\"role\":\"ASSISTANT\",\"content\":\"Sure, what type of cuisine are you interested in? [...] + "ignoreArrayOrder" : true, + "ignoreExtraElements" : true + } ] + }, + "response" : { + "status" : 200, + "body" : "{\"model\":\"orca-mini\",\"created_at\":\"2024-05-02T08:23:51.41574263Z\",\"message\":{\"role\":\"assistant\",\"content\":\" Based on user reviews, I would recommend La Renaissance de la cuisine marocaine. It has received positive ratings for its delicious Moroccan food and friendly service. The restaurant is located at 35 rue Montorgueil, Paris, France. You can check out their menu and reviews on their website or social media pages.\"},\"done\":true,\"total_duration\":6541 [...] + "headers" : { + "Date" : "Thu, 02 May 2024 08:23:51 GMT", + "Content-Type" : "application/json; charset=utf-8" + } + }, + "uuid" : "5720afb6-10d1-4038-8f8f-f08d89180b14", + "persistent" : true, + "insertionIndex" : 3 +} \ No newline at end of file diff --git a/integration-tests-jvm/langchain-chat/src/test/resources/mappings/promptMessage.json b/integration-tests-jvm/langchain-chat/src/test/resources/mappings/promptMessage.json new file mode 100644 index 0000000000..3971db1c21 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/test/resources/mappings/promptMessage.json @@ -0,0 +1,24 @@ +{ + "id" : "6d1d4506-a77f-46c6-81c5-068ab78b372d", + "name" : "api_chat", + "request" : { + "url" : "/api/chat", + "method" : "POST", + "bodyPatterns" : [ { + "equalToJson" : "{\"model\":\"orca-mini\",\"messages\":[{\"role\":\"USER\",\"content\":\"Create a recipe for a oven dish with the following ingredients: potato, tomato, feta, olive oil\"}],\"options\":{\"temperature\":0.3},\"stream\":false}", + "ignoreArrayOrder" : true, + "ignoreExtraElements" : true + } ] + }, + "response" : { + "status" : 200, + "body" : "{\"model\":\"orca-mini\",\"created_at\":\"2024-05-02T08:22:19.097855836Z\",\"message\":{\"role\":\"assistant\",\"content\":\" Sure, here's a simple recipe for an oven dish with potato, tomato, feta and olive oil:\\n\\nIngredients:\\n- 1 medium-sized potato\\n- 1 medium-sized tomato\\n- 1/2 cup crumbled feta cheese\\n- 2 tablespoons olive oil\\n\\nInstructions:\\n1. Preheat the oven to 375°F (190°C).\\n2. Cut the potato into small cubes and place them in a baking dish.\\n3. [...] + "headers" : { + "Date" : "Thu, 02 May 2024 08:22:19 GMT", + "Content-Type" : "application/json; charset=utf-8" + } + }, + "uuid" : "6d1d4506-a77f-46c6-81c5-068ab78b372d", + "persistent" : true, + "insertionIndex" : 2 +} \ No newline at end of file diff --git a/integration-tests-jvm/langchain-chat/src/test/resources/mappings/simpleMessage.json b/integration-tests-jvm/langchain-chat/src/test/resources/mappings/simpleMessage.json new file mode 100644 index 0000000000..c258ed1e72 --- /dev/null +++ b/integration-tests-jvm/langchain-chat/src/test/resources/mappings/simpleMessage.json @@ -0,0 +1,24 @@ +{ + "id" : "27d02f6b-e565-48b5-a64e-2e91590ff224", + "name" : "api_chat", + "request" : { + "url" : "/api/chat", + "method" : "POST", + "bodyPatterns" : [ { + "equalToJson" : "{\"model\":\"orca-mini\",\"messages\":[{\"role\":\"USER\",\"content\":\"Hello my name is Darth Vader!\"}],\"options\":{\"temperature\":0.3},\"stream\":false}", + "ignoreArrayOrder" : true, + "ignoreExtraElements" : true + } ] + }, + "response" : { + "status" : 200, + "body" : "{\"model\":\"orca-mini\",\"created_at\":\"2024-05-02T08:21:13.635823801Z\",\"message\":{\"role\":\"assistant\",\"content\":\" Hello, I'm your friendly AI assistant. How may I assist you today?\"},\"done\":true,\"total_duration\":2371281081,\"load_duration\":577023282,\"prompt_eval_count\":49,\"prompt_eval_duration\":946565000,\"eval_count\":18,\"eval_duration\":847072000}", + "headers" : { + "Date" : "Thu, 02 May 2024 08:21:13 GMT", + "Content-Type" : "application/json; charset=utf-8" + } + }, + "uuid" : "27d02f6b-e565-48b5-a64e-2e91590ff224", + "persistent" : true, + "insertionIndex" : 1 +} \ No newline at end of file diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml index 27ee65dcd8..4897af5890 100644 --- a/integration-tests-jvm/pom.xml +++ b/integration-tests-jvm/pom.xml @@ -77,6 +77,7 @@ <module>jooq</module> <module>json-patch</module> <module>jsonapi</module> + <module>langchain-chat</module> <module>langchain-embeddings</module> <module>ldif</module> <module>lucene</module> diff --git a/poms/bom-test/pom.xml b/poms/bom-test/pom.xml index c72d457716..4d768be228 100644 --- a/poms/bom-test/pom.xml +++ b/poms/bom-test/pom.xml @@ -70,6 +70,12 @@ <scope>import</scope> </dependency> + <dependency> + <groupId>dev.langchain4j</groupId> + <artifactId>langchain4j-ollama</artifactId> + <!-- TODO: Figure out why using a version property seems to make the build fail --> + <version>0.28.0</version> + </dependency> <dependency> <groupId>io.quarkiverse.micrometer.registry</groupId> <artifactId>quarkus-micrometer-registry-jmx</artifactId> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index c721c0fc19..4d756fe0bf 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -1771,6 +1771,11 @@ <artifactId>camel-kudu</artifactId> <version>${camel.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-langchain-chat</artifactId> + <version>${camel.version}</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-langchain-embeddings</artifactId> @@ -4646,6 +4651,16 @@ <artifactId>camel-quarkus-kudu-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-langchain-embeddings</artifactId> diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml b/poms/bom/src/main/generated/flattened-full-pom.xml index 921bc0f1de..117c37bf7a 100644 --- a/poms/bom/src/main/generated/flattened-full-pom.xml +++ b/poms/bom/src/main/generated/flattened-full-pom.xml @@ -1708,6 +1708,11 @@ <artifactId>camel-kudu</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>4.5.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-langchain-chat</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>4.5.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-langchain-embeddings</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -4571,6 +4576,16 @@ <artifactId>camel-quarkus-kudu-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>3.11.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-langchain-chat</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.11.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-langchain-chat-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.11.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-quarkus-langchain-embeddings</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml b/poms/bom/src/main/generated/flattened-reduced-pom.xml index 4830c03132..80aa3e98ce 100644 --- a/poms/bom/src/main/generated/flattened-reduced-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml @@ -1708,6 +1708,11 @@ <artifactId>camel-kudu</artifactId> <version>4.5.0</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-langchain-chat</artifactId> + <version>4.5.0</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-langchain-embeddings</artifactId> @@ -4571,6 +4576,16 @@ <artifactId>camel-quarkus-kudu-deployment</artifactId> <version>3.11.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat</artifactId> + <version>3.11.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-langchain-chat-deployment</artifactId> + <version>3.11.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-langchain-embeddings</artifactId> diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml index 7ba78e995c..4580a13577 100644 --- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml +++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml @@ -1708,6 +1708,11 @@ <artifactId>camel-kudu</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>4.5.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-langchain-chat</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>4.5.0</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-langchain-embeddings</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> @@ -4571,6 +4576,16 @@ <artifactId>camel-quarkus-kudu-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <version>3.11.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-langchain-chat</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.11.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <artifactId>camel-quarkus-langchain-chat-deployment</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + <version>3.11.0-SNAPSHOT</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> + </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} --> <artifactId>camel-quarkus-langchain-embeddings</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->