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

commit 86b1280efc993c8ba5c21a1a23ce141ecb543946
Author: James Netherton <[email protected]>
AuthorDate: Mon Sep 16 10:22:00 2024 +0100

    Add langchain4j-web-search JVM only extension
---
 catalog/pom.xml                                    |  13 +++
 .../examples/components/langchain4j-web-search.yml |  13 +++
 docs/modules/ROOT/nav.adoc                         |   1 +
 .../extensions/langchain4j-web-search.adoc         |  64 +++++++++++++
 .../langchain4j-web-search/deployment/pom.xml      |  63 +++++++++++++
 .../deployment/Langchain4jWebSearchProcessor.java  |  46 ++++++++++
 extensions-jvm/langchain4j-web-search/pom.xml      |  39 ++++++++
 .../langchain4j-web-search/runtime/pom.xml         | 100 +++++++++++++++++++++
 .../main/resources/META-INF/quarkus-extension.yaml |  33 +++++++
 extensions-jvm/pom.xml                             |   1 +
 .../langchain4j-web-search/pom.xml                 |  84 +++++++++++++++++
 .../search/it/Langchain4jWebSearchResource.java    |  50 +++++++++++
 .../web/search/it/Langchain4jWebSearchTest.java    |  34 +++++++
 integration-tests-jvm/pom.xml                      |   1 +
 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 ++++
 18 files changed, 602 insertions(+)

diff --git a/catalog/pom.xml b/catalog/pom.xml
index 5fdecb6c2d..667585a643 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -2502,6 +2502,19 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-langchain4j-web-search</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-language</artifactId>
diff --git a/docs/modules/ROOT/examples/components/langchain4j-web-search.yml 
b/docs/modules/ROOT/examples/components/langchain4j-web-search.yml
new file mode 100644
index 0000000000..ded1b15f41
--- /dev/null
+++ b/docs/modules/ROOT/examples/components/langchain4j-web-search.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-langchain4j-web-search
+cqArtifactIdBase: langchain4j-web-search
+cqNativeSupported: false
+cqStatus: Preview
+cqDeprecated: false
+cqJvmSince: 3.15.0
+cqNativeSince: n/a
+cqCamelPartName: langchain4j-web-search
+cqCamelPartTitle: LangChain4j Web Search
+cqCamelPartDescription: LangChain4j Web Search Engine
+cqExtensionPageTitle: LangChain4j Web Search
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 062df5213b..2ddaf0d988 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -203,6 +203,7 @@
 *** xref:reference/extensions/langchain4j-embeddings.adoc[LangChain4j 
Embeddings]
 *** xref:reference/extensions/langchain4j-tokenizer.adoc[LangChain4j Tokenizer]
 *** xref:reference/extensions/langchain4j-tools.adoc[LangChain4j Tools]
+*** xref:reference/extensions/langchain4j-web-search.adoc[LangChain4j Web 
Search]
 *** xref:reference/extensions/language.adoc[Language]
 *** xref:reference/extensions/leveldb.adoc[LevelDB]
 *** xref:reference/extensions/log.adoc[Log]
diff --git 
a/docs/modules/ROOT/pages/reference/extensions/langchain4j-web-search.adoc 
b/docs/modules/ROOT/pages/reference/extensions/langchain4j-web-search.adoc
new file mode 100644
index 0000000000..3a60a57321
--- /dev/null
+++ b/docs/modules/ROOT/pages/reference/extensions/langchain4j-web-search.adoc
@@ -0,0 +1,64 @@
+// Do not edit directly!
+// This file was generated by 
camel-quarkus-maven-plugin:update-extension-doc-page
+[id="extensions-langchain4j-web-search"]
+= LangChain4j Web Search
+:linkattrs:
+:cq-artifact-id: camel-quarkus-langchain4j-web-search
+:cq-native-supported: false
+:cq-status: Preview
+:cq-status-deprecation: Preview
+:cq-description: LangChain4j Web Search Engine
+:cq-deprecated: false
+:cq-jvm-since: 3.15.0
+:cq-native-since: n/a
+
+ifeval::[{doc-show-badges} == true]
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##3.15.0## 
[.badge-key]##Native##[.badge-unsupported]##unsupported##
+endif::[]
+
+LangChain4j Web Search Engine
+
+[id="extensions-langchain4j-web-search-whats-inside"]
+== What's inside
+
+* 
xref:{cq-camel-components}::langchain4j-web-search-component.adoc[LangChain4j 
Web Search component], URI syntax: `langchain4j-web-search:searchId`
+
+Please refer to the above link for usage and configuration details.
+
+[id="extensions-langchain4j-web-search-maven-coordinates"]
+== Maven coordinates
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-langchain4j-web-search</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::[]
+
+[id="extensions-langchain4j-web-search-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.
diff --git a/extensions-jvm/langchain4j-web-search/deployment/pom.xml 
b/extensions-jvm/langchain4j-web-search/deployment/pom.xml
new file mode 100644
index 0000000000..3dbcd36e4d
--- /dev/null
+++ b/extensions-jvm/langchain4j-web-search/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-langchain4j-web-search-parent</artifactId>
+        <version>3.15.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-langchain4j-web-search-deployment</artifactId>
+    <name>Camel Quarkus :: LangChain4j Web Search :: 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-langchain4j-web-search</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/langchain4j-web-search/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/web/search/deployment/Langchain4jWebSearchProcessor.java
 
b/extensions-jvm/langchain4j-web-search/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/web/search/deployment/Langchain4jWebSearchProcessor.java
new file mode 100644
index 0000000000..cc6ee1c918
--- /dev/null
+++ 
b/extensions-jvm/langchain4j-web-search/deployment/src/main/java/org/apache/camel/quarkus/component/langchain4j/web/search/deployment/Langchain4jWebSearchProcessor.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.langchain4j.web.search.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 Langchain4jWebSearchProcessor {
+
+    private static final Logger LOG = 
Logger.getLogger(Langchain4jWebSearchProcessor.class);
+    private static final String FEATURE = "camel-langchain4j-web-search";
+
+    @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/langchain4j-web-search/pom.xml 
b/extensions-jvm/langchain4j-web-search/pom.xml
new file mode 100644
index 0000000000..99772bcf7d
--- /dev/null
+++ b/extensions-jvm/langchain4j-web-search/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.15.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-langchain4j-web-search-parent</artifactId>
+    <name>Camel Quarkus :: LangChain4j Web Search</name>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>deployment</module>
+        <module>runtime</module>
+    </modules>
+</project>
diff --git a/extensions-jvm/langchain4j-web-search/runtime/pom.xml 
b/extensions-jvm/langchain4j-web-search/runtime/pom.xml
new file mode 100644
index 0000000000..9af8b69e3f
--- /dev/null
+++ b/extensions-jvm/langchain4j-web-search/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-langchain4j-web-search-parent</artifactId>
+        <version>3.15.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <artifactId>camel-quarkus-langchain4j-web-search</artifactId>
+    <name>Camel Quarkus :: LangChain4j Web Search :: Runtime</name>
+    <description>LangChain4j Web Search Engine</description>
+
+    <properties>
+        <camel.quarkus.jvmSince>3.15.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-langchain4j-web-search</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/langchain4j-web-search/runtime/src/main/resources/META-INF/quarkus-extension.yaml
 
b/extensions-jvm/langchain4j-web-search/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..0cb5301911
--- /dev/null
+++ 
b/extensions-jvm/langchain4j-web-search/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 Web Search"
+description: "LangChain4j Web Search Engine"
+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/langchain4j-web-search.html";
+  categories:
+  - "integration"
+  status:
+  - "preview"
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 15419b46e1..a962857d08 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -79,6 +79,7 @@
         <module>langchain4j-embeddings</module>
         <module>langchain4j-tokenizer</module>
         <module>langchain4j-tools</module>
+        <module>langchain4j-web-search</module>
         <module>ldif</module>
         <module>lucene</module>
         <module>mail-microsoft-oauth</module>
diff --git a/integration-tests-jvm/langchain4j-web-search/pom.xml 
b/integration-tests-jvm/langchain4j-web-search/pom.xml
new file mode 100644
index 0000000000..143689446d
--- /dev/null
+++ b/integration-tests-jvm/langchain4j-web-search/pom.xml
@@ -0,0 +1,84 @@
+<?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.15.0-SNAPSHOT</version>
+        <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+    </parent>
+
+    
<artifactId>camel-quarkus-integration-test-langchain4j-web-search</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: LangChain4j Web Search</name>
+    <description>Integration tests for Camel Quarkus LangChain4j Web Search 
extension</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-langchain4j-web-search</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</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>
+    </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-langchain4j-web-search-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/langchain4j-web-search/src/main/java/org/apache/camel/quarkus/component/langchain4j/web/search/it/Langchain4jWebSearchResource.java
 
b/integration-tests-jvm/langchain4j-web-search/src/main/java/org/apache/camel/quarkus/component/langchain4j/web/search/it/Langchain4jWebSearchResource.java
new file mode 100644
index 0000000000..13dde1e4f9
--- /dev/null
+++ 
b/integration-tests-jvm/langchain4j-web-search/src/main/java/org/apache/camel/quarkus/component/langchain4j/web/search/it/Langchain4jWebSearchResource.java
@@ -0,0 +1,50 @@
+/*
+ * 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.langchain4j.web.search.it;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import org.apache.camel.CamelContext;
+import org.jboss.logging.Logger;
+
+@Path("/langchain4j-web-search")
+@ApplicationScoped
+public class Langchain4jWebSearchResource {
+
+    private static final Logger LOG = 
Logger.getLogger(Langchain4jWebSearchResource.class);
+
+    private static final String COMPONENT_LANGCHAIN4J_WEB_SEARCH = 
"langchain4j-web-search";
+    @Inject
+    CamelContext context;
+
+    @Path("/load/component/langchain4j-web-search")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response loadComponentLangchain4jWebSearch() throws Exception {
+        /* This is an autogenerated test */
+        if (context.getComponent(COMPONENT_LANGCHAIN4J_WEB_SEARCH) != null) {
+            return Response.ok().build();
+        }
+        LOG.warnf("Could not load [%s] from the Camel context", 
COMPONENT_LANGCHAIN4J_WEB_SEARCH);
+        return Response.status(500, COMPONENT_LANGCHAIN4J_WEB_SEARCH + " could 
not be loaded from the Camel context").build();
+    }
+}
diff --git 
a/integration-tests-jvm/langchain4j-web-search/src/test/java/org/apache/camel/quarkus/component/langchain4j/web/search/it/Langchain4jWebSearchTest.java
 
b/integration-tests-jvm/langchain4j-web-search/src/test/java/org/apache/camel/quarkus/component/langchain4j/web/search/it/Langchain4jWebSearchTest.java
new file mode 100644
index 0000000000..fa7746534d
--- /dev/null
+++ 
b/integration-tests-jvm/langchain4j-web-search/src/test/java/org/apache/camel/quarkus/component/langchain4j/web/search/it/Langchain4jWebSearchTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.langchain4j.web.search.it;
+
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.junit.jupiter.api.Test;
+
+@QuarkusTest
+class Langchain4jWebSearchTest {
+
+    @Test
+    public void loadComponentLangchain4jWebSearch() {
+        /* A simple autogenerated test */
+        
RestAssured.get("/langchain4j-web-search/load/component/langchain4j-web-search")
+                .then()
+                .statusCode(200);
+    }
+
+}
diff --git a/integration-tests-jvm/pom.xml b/integration-tests-jvm/pom.xml
index 3770b3e303..708d374700 100644
--- a/integration-tests-jvm/pom.xml
+++ b/integration-tests-jvm/pom.xml
@@ -78,6 +78,7 @@
         <module>langchain4j-embeddings</module>
         <module>langchain4j-tokenizer</module>
         <module>langchain4j-tools</module>
+        <module>langchain4j-web-search</module>
         <module>ldif</module>
         <module>lucene</module>
         <module>mail-microsoft-oauth</module>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 9d4cd093e0..80562bb2d4 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -1846,6 +1846,11 @@
                 <artifactId>camel-langchain4j-tools</artifactId>
                 <version>${camel.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.camel</groupId>
+                <artifactId>camel-langchain4j-web-search</artifactId>
+                <version>${camel.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.camel</groupId>
                 <artifactId>camel-language</artifactId>
@@ -4827,6 +4832,16 @@
                 
<artifactId>camel-quarkus-langchain4j-tools-deployment</artifactId>
                 <version>${camel-quarkus.version}</version>
             </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                <artifactId>camel-quarkus-langchain4j-web-search</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.camel.quarkus</groupId>
+                
<artifactId>camel-quarkus-langchain4j-web-search-deployment</artifactId>
+                <version>${camel-quarkus.version}</version>
+            </dependency>
             <dependency>
                 <groupId>org.apache.camel.quarkus</groupId>
                 <artifactId>camel-quarkus-language</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml 
b/poms/bom/src/main/generated/flattened-full-pom.xml
index 72bbbe1ba0..59505150cb 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -1783,6 +1783,11 @@
         <artifactId>camel-langchain4j-tools</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
         <version>4.8.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-langchain4j-web-search</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+        <version>4.8.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-language</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -4752,6 +4757,16 @@
         
<artifactId>camel-quarkus-langchain4j-tools-deployment</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
         <version>3.15.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-langchain4j-web-search</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+        <version>3.15.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-langchain4j-web-search-deployment</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+        <version>3.15.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-language</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 8d8b172643..3ee193bbb8 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -1783,6 +1783,11 @@
         <artifactId>camel-langchain4j-tools</artifactId>
         <version>4.8.0</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-langchain4j-web-search</artifactId>
+        <version>4.8.0</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-language</artifactId>
@@ -4752,6 +4757,16 @@
         <artifactId>camel-quarkus-langchain4j-tools-deployment</artifactId>
         <version>3.15.0-SNAPSHOT</version>
       </dependency>
+      <dependency>
+        <groupId>org.apache.camel.quarkus</groupId>
+        <artifactId>camel-quarkus-langchain4j-web-search</artifactId>
+        <version>3.15.0-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel.quarkus</groupId>
+        
<artifactId>camel-quarkus-langchain4j-web-search-deployment</artifactId>
+        <version>3.15.0-SNAPSHOT</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.camel.quarkus</groupId>
         <artifactId>camel-quarkus-language</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 59614909dc..9a7f91662f 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -1783,6 +1783,11 @@
         <artifactId>camel-langchain4j-tools</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
         <version>4.8.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-langchain4j-web-search</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+        <version>4.8.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-language</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
@@ -4752,6 +4757,16 @@
         
<artifactId>camel-quarkus-langchain4j-tools-deployment</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
         <version>3.15.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-langchain4j-web-search</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+        <version>3.15.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-langchain4j-web-search-deployment</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+        <version>3.15.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-language</artifactId><!-- 
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->


Reply via email to