You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/03/14 10:34:42 UTC

(camel) branch main updated: Regen (#13483)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 5ffd496ea90 Regen (#13483)
5ffd496ea90 is described below

commit 5ffd496ea9059b99ad3aa3686fe970157228d08e
Author: Luca Burgazzoli <lb...@users.noreply.github.com>
AuthorDate: Thu Mar 14 11:34:36 2024 +0100

    Regen (#13483)
---
 .../component/ComponentsBuilderFactory.java        |  26 +++
 .../dsl/LangchainChatComponentBuilderFactory.java  | 183 +++++++++++++++++++++
 ...LangchainEmbeddingsComponentBuilderFactory.java | 162 ++++++++++++++++++
 .../src/generated/resources/metadata.json          |  46 ++++++
 .../builder/endpoint/StaticEndpointBuilders.java   |   4 +-
 .../LangchainEmbeddingsEndpointBuilderFactory.java |   8 +-
 6 files changed, 423 insertions(+), 6 deletions(-)

diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index a34bf7e3d79..8ac627aacfb 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -2766,6 +2766,32 @@ public interface ComponentsBuilderFactory {
     static org.apache.camel.builder.component.dsl.KuduComponentBuilderFactory.KuduComponentBuilder kudu() {
         return org.apache.camel.builder.component.dsl.KuduComponentBuilderFactory.kudu();
     }
+    /**
+     * langchain 4j chat (camel-langchain-chat)
+     * Langchain4j Chat component
+     * 
+     * Category: ai
+     * Since: 4.5
+     * Maven coordinates: org.apache.camel:camel-langchain-chat
+     * 
+     * @return the dsl builder
+     */
+    static org.apache.camel.builder.component.dsl.LangchainChatComponentBuilderFactory.LangchainChatComponentBuilder langchainChat() {
+        return org.apache.camel.builder.component.dsl.LangchainChatComponentBuilderFactory.langchainChat();
+    }
+    /**
+     * Langchain4j Embeddings (camel-langchain-embeddings)
+     * Langchain4j Embeddings
+     * 
+     * Category: ai
+     * Since: 4.5
+     * Maven coordinates: org.apache.camel:camel-langchain-embeddings
+     * 
+     * @return the dsl builder
+     */
+    static org.apache.camel.builder.component.dsl.LangchainEmbeddingsComponentBuilderFactory.LangchainEmbeddingsComponentBuilder langchainEmbeddings() {
+        return org.apache.camel.builder.component.dsl.LangchainEmbeddingsComponentBuilderFactory.langchainEmbeddings();
+    }
     /**
      * Language (camel-language)
      * Execute scripts in any of the languages supported by Camel.
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LangchainChatComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LangchainChatComponentBuilderFactory.java
new file mode 100644
index 00000000000..3a0c23775d3
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LangchainChatComponentBuilderFactory.java
@@ -0,0 +1,183 @@
+/*
+ * 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.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.chat.LangchainChatComponent;
+
+/**
+ * Langchain4j Chat component
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface LangchainChatComponentBuilderFactory {
+
+    /**
+     * langchain 4j chat (camel-langchain-chat)
+     * Langchain4j Chat component
+     * 
+     * Category: ai
+     * Since: 4.5
+     * Maven coordinates: org.apache.camel:camel-langchain-chat
+     * 
+     * @return the dsl builder
+     */
+    static LangchainChatComponentBuilder langchainChat() {
+        return new LangchainChatComponentBuilderImpl();
+    }
+
+    /**
+     * Builder for the langchain 4j chat component.
+     */
+    interface LangchainChatComponentBuilder
+            extends
+                ComponentBuilder<LangchainChatComponent> {
+        /**
+         * Operation in case of Endpoint of type CHAT. value is one the values
+         * of org.apache.camel.component.langchain.LangchainChatOperations.
+         * 
+         * The option is a:
+         * &lt;code&gt;org.apache.camel.component.chat.LangchainChatOperations&lt;/code&gt; type.
+         * 
+         * Default: CHAT_SINGLE_MESSAGE
+         * Group: producer
+         * 
+         * @param chatOperation the value to set
+         * @return the dsl builder
+         */
+        default LangchainChatComponentBuilder chatOperation(
+                org.apache.camel.component.chat.LangchainChatOperations chatOperation) {
+            doSetProperty("chatOperation", chatOperation);
+            return this;
+        }
+        /**
+         * The configuration.
+         * 
+         * The option is a:
+         * &lt;code&gt;org.apache.camel.component.chat.LangchainChatConfiguration&lt;/code&gt; type.
+         * 
+         * Group: producer
+         * 
+         * @param configuration the value to set
+         * @return the dsl builder
+         */
+        default LangchainChatComponentBuilder configuration(
+                org.apache.camel.component.chat.LangchainChatConfiguration configuration) {
+            doSetProperty("configuration", configuration);
+            return this;
+        }
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing time
+         * of the processing.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param lazyStartProducer the value to set
+         * @return the dsl builder
+         */
+        default LangchainChatComponentBuilder lazyStartProducer(
+                boolean lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+        /**
+         * Whether autowiring is enabled. This is used for automatic autowiring
+         * options (the option must be marked as autowired) by looking up in the
+         * registry to find if there is a single instance of matching type,
+         * which then gets configured on the component. This can be used for
+         * automatic configuring JDBC data sources, JMS connection factories,
+         * AWS Clients, etc.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: true
+         * Group: advanced
+         * 
+         * @param autowiredEnabled the value to set
+         * @return the dsl builder
+         */
+        default LangchainChatComponentBuilder autowiredEnabled(
+                boolean autowiredEnabled) {
+            doSetProperty("autowiredEnabled", autowiredEnabled);
+            return this;
+        }
+        /**
+         * Chat Language Model of type
+         * dev.langchain4j.model.chat.ChatLanguageModel.
+         * 
+         * The option is a:
+         * &lt;code&gt;dev.langchain4j.model.chat.ChatLanguageModel&lt;/code&gt;
+         * type.
+         * 
+         * Group: advanced
+         * 
+         * @param chatModel the value to set
+         * @return the dsl builder
+         */
+        default LangchainChatComponentBuilder chatModel(
+                dev.langchain4j.model.chat.ChatLanguageModel chatModel) {
+            doSetProperty("chatModel", chatModel);
+            return this;
+        }
+    }
+
+    class LangchainChatComponentBuilderImpl
+            extends
+                AbstractComponentBuilder<LangchainChatComponent>
+            implements
+                LangchainChatComponentBuilder {
+        @Override
+        protected LangchainChatComponent buildConcreteComponent() {
+            return new LangchainChatComponent();
+        }
+        private org.apache.camel.component.chat.LangchainChatConfiguration getOrCreateConfiguration(
+                org.apache.camel.component.chat.LangchainChatComponent component) {
+            if (component.getConfiguration() == null) {
+                component.setConfiguration(new org.apache.camel.component.chat.LangchainChatConfiguration());
+            }
+            return component.getConfiguration();
+        }
+        @Override
+        protected boolean setPropertyOnComponent(
+                Component component,
+                String name,
+                Object value) {
+            switch (name) {
+            case "chatOperation": getOrCreateConfiguration((LangchainChatComponent) component).setChatOperation((org.apache.camel.component.chat.LangchainChatOperations) value); return true;
+            case "configuration": ((LangchainChatComponent) component).setConfiguration((org.apache.camel.component.chat.LangchainChatConfiguration) value); return true;
+            case "lazyStartProducer": ((LangchainChatComponent) component).setLazyStartProducer((boolean) value); return true;
+            case "autowiredEnabled": ((LangchainChatComponent) component).setAutowiredEnabled((boolean) value); return true;
+            case "chatModel": getOrCreateConfiguration((LangchainChatComponent) component).setChatModel((dev.langchain4j.model.chat.ChatLanguageModel) value); return true;
+            default: return false;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LangchainEmbeddingsComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LangchainEmbeddingsComponentBuilderFactory.java
new file mode 100644
index 00000000000..9ac552400b8
--- /dev/null
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/LangchainEmbeddingsComponentBuilderFactory.java
@@ -0,0 +1,162 @@
+/*
+ * 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.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsComponent;
+
+/**
+ * Langchain4j Embeddings
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface LangchainEmbeddingsComponentBuilderFactory {
+
+    /**
+     * Langchain4j Embeddings (camel-langchain-embeddings)
+     * Langchain4j Embeddings
+     * 
+     * Category: ai
+     * Since: 4.5
+     * Maven coordinates: org.apache.camel:camel-langchain-embeddings
+     * 
+     * @return the dsl builder
+     */
+    static LangchainEmbeddingsComponentBuilder langchainEmbeddings() {
+        return new LangchainEmbeddingsComponentBuilderImpl();
+    }
+
+    /**
+     * Builder for the Langchain4j Embeddings component.
+     */
+    interface LangchainEmbeddingsComponentBuilder
+            extends
+                ComponentBuilder<LangchainEmbeddingsComponent> {
+        /**
+         * The configuration.
+         * 
+         * The option is a:
+         * &lt;code&gt;org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsConfiguration&lt;/code&gt; type.
+         * 
+         * Group: producer
+         * 
+         * @param configuration the value to set
+         * @return the dsl builder
+         */
+        default LangchainEmbeddingsComponentBuilder configuration(
+                org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsConfiguration configuration) {
+            doSetProperty("configuration", configuration);
+            return this;
+        }
+        /**
+         * The EmbeddingModel engine to use.
+         * 
+         * The option is a:
+         * &lt;code&gt;dev.langchain4j.model.embedding.EmbeddingModel&lt;/code&gt; type.
+         * 
+         * Group: producer
+         * 
+         * @param embeddingModel the value to set
+         * @return the dsl builder
+         */
+        default LangchainEmbeddingsComponentBuilder embeddingModel(
+                dev.langchain4j.model.embedding.EmbeddingModel embeddingModel) {
+            doSetProperty("embeddingModel", embeddingModel);
+            return this;
+        }
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing time
+         * of the processing.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param lazyStartProducer the value to set
+         * @return the dsl builder
+         */
+        default LangchainEmbeddingsComponentBuilder lazyStartProducer(
+                boolean lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+        /**
+         * Whether autowiring is enabled. This is used for automatic autowiring
+         * options (the option must be marked as autowired) by looking up in the
+         * registry to find if there is a single instance of matching type,
+         * which then gets configured on the component. This can be used for
+         * automatic configuring JDBC data sources, JMS connection factories,
+         * AWS Clients, etc.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: true
+         * Group: advanced
+         * 
+         * @param autowiredEnabled the value to set
+         * @return the dsl builder
+         */
+        default LangchainEmbeddingsComponentBuilder autowiredEnabled(
+                boolean autowiredEnabled) {
+            doSetProperty("autowiredEnabled", autowiredEnabled);
+            return this;
+        }
+    }
+
+    class LangchainEmbeddingsComponentBuilderImpl
+            extends
+                AbstractComponentBuilder<LangchainEmbeddingsComponent>
+            implements
+                LangchainEmbeddingsComponentBuilder {
+        @Override
+        protected LangchainEmbeddingsComponent buildConcreteComponent() {
+            return new LangchainEmbeddingsComponent();
+        }
+        private org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsConfiguration getOrCreateConfiguration(
+                org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsComponent component) {
+            if (component.getConfiguration() == null) {
+                component.setConfiguration(new org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsConfiguration());
+            }
+            return component.getConfiguration();
+        }
+        @Override
+        protected boolean setPropertyOnComponent(
+                Component component,
+                String name,
+                Object value) {
+            switch (name) {
+            case "configuration": ((LangchainEmbeddingsComponent) component).setConfiguration((org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsConfiguration) value); return true;
+            case "embeddingModel": getOrCreateConfiguration((LangchainEmbeddingsComponent) component).setEmbeddingModel((dev.langchain4j.model.embedding.EmbeddingModel) value); return true;
+            case "lazyStartProducer": ((LangchainEmbeddingsComponent) component).setLazyStartProducer((boolean) value); return true;
+            case "autowiredEnabled": ((LangchainEmbeddingsComponent) component).setAutowiredEnabled((boolean) value); return true;
+            default: return false;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index e8c6c6f2b96..ac11caed7ad 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -4753,6 +4753,52 @@
     "lenientProperties": false,
     "remote": true
   },
+  "LangchainChatComponentBuilderFactory": {
+    "kind": "component",
+    "name": "langchain-chat",
+    "title": "langchain 4j chat",
+    "description": "Langchain4j Chat component",
+    "deprecated": false,
+    "firstVersion": "4.5.0",
+    "label": "ai",
+    "javaType": "org.apache.camel.component.chat.LangchainChatComponent",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-langchain-chat",
+    "version": "4.5.0-SNAPSHOT",
+    "scheme": "langchain-chat",
+    "extendsScheme": "",
+    "syntax": "langchain-chat:chatId",
+    "async": false,
+    "api": false,
+    "consumerOnly": false,
+    "producerOnly": true,
+    "lenientProperties": false,
+    "remote": true
+  },
+  "LangchainEmbeddingsComponentBuilderFactory": {
+    "kind": "component",
+    "name": "langchain-embeddings",
+    "title": "Langchain4j Embeddings",
+    "description": "Langchain4j Embeddings",
+    "deprecated": false,
+    "firstVersion": "4.5.0",
+    "label": "ai",
+    "javaType": "org.apache.camel.component.langchain.embeddings.LangchainEmbeddingsComponent",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-langchain-embeddings",
+    "version": "4.5.0-SNAPSHOT",
+    "scheme": "langchain-embeddings",
+    "extendsScheme": "",
+    "syntax": "langchain-embeddings:embeddingId",
+    "async": false,
+    "api": false,
+    "consumerOnly": false,
+    "producerOnly": true,
+    "lenientProperties": false,
+    "remote": true
+  },
   "LanguageComponentBuilderFactory": {
     "kind": "component",
     "name": "language",
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index efe29a29793..9f7e0bc25a5 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -9831,7 +9831,7 @@ public class StaticEndpointBuilders {
     }
     /**
      * Langchain4j Embeddings (camel-langchain-embeddings)
-     * Perform operations on the Qdrant Vector Database.
+     * Langchain4j Embeddings
      * 
      * Category: ai
      * Since: 4.5
@@ -9851,7 +9851,7 @@ public class StaticEndpointBuilders {
     }
     /**
      * Langchain4j Embeddings (camel-langchain-embeddings)
-     * Perform operations on the Qdrant Vector Database.
+     * Langchain4j Embeddings
      * 
      * Category: ai
      * Since: 4.5
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangchainEmbeddingsEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangchainEmbeddingsEndpointBuilderFactory.java
index 1ac10e080e8..217ecbaf597 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangchainEmbeddingsEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LangchainEmbeddingsEndpointBuilderFactory.java
@@ -26,7 +26,7 @@ import org.apache.camel.builder.EndpointProducerBuilder;
 import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
 
 /**
- * Perform operations on the Qdrant Vector Database.
+ * Langchain4j Embeddings
  * 
  * Generated by camel build tools - do NOT edit this file!
  */
@@ -142,7 +142,7 @@ public interface LangchainEmbeddingsEndpointBuilderFactory {
     public interface LangchainEmbeddingsBuilders {
         /**
          * Langchain4j Embeddings (camel-langchain-embeddings)
-         * Perform operations on the Qdrant Vector Database.
+         * Langchain4j Embeddings
          * 
          * Category: ai
          * Since: 4.5
@@ -155,7 +155,7 @@ public interface LangchainEmbeddingsEndpointBuilderFactory {
         }
         /**
          * Langchain4j Embeddings (camel-langchain-embeddings)
-         * Perform operations on the Qdrant Vector Database.
+         * Langchain4j Embeddings
          * 
          * Category: ai
          * Since: 4.5
@@ -175,7 +175,7 @@ public interface LangchainEmbeddingsEndpointBuilderFactory {
         }
         /**
          * Langchain4j Embeddings (camel-langchain-embeddings)
-         * Perform operations on the Qdrant Vector Database.
+         * Langchain4j Embeddings
          * 
          * Category: ai
          * Since: 4.5