You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/08/07 08:57:40 UTC
(camel) branch main updated: CAMEL-20986: implement LangChain4j document splitters as a DSL
This is an automated email from the ASF dual-hosted git repository.
orpiske 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 afb323f9eac CAMEL-20986: implement LangChain4j document splitters as a DSL
afb323f9eac is described below
commit afb323f9eacd4450b7711df28b3eaf14366e6bef
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Jul 16 14:34:45 2024 +0200
CAMEL-20986: implement LangChain4j document splitters as a DSL
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../org/apache/camel/catalog/models.properties | 1 +
.../org/apache/camel/catalog/models/aggregate.json | 2 +-
.../camel/catalog/models/circuitBreaker.json | 2 +-
.../org/apache/camel/catalog/models/doCatch.json | 2 +-
.../org/apache/camel/catalog/models/doFinally.json | 2 +-
.../org/apache/camel/catalog/models/doTry.json | 2 +-
.../org/apache/camel/catalog/models/filter.json | 2 +-
.../camel/catalog/models/idempotentConsumer.json | 2 +-
.../org/apache/camel/catalog/models/intercept.json | 2 +-
.../apache/camel/catalog/models/interceptFrom.json | 2 +-
.../catalog/models/interceptSendToEndpoint.json | 2 +-
.../org/apache/camel/catalog/models/kamelet.json | 2 +-
.../apache/camel/catalog/models/langChain4j.json | 23 +++
.../apache/camel/catalog/models/loadBalance.json | 2 +-
.../org/apache/camel/catalog/models/loop.json | 2 +-
.../org/apache/camel/catalog/models/multicast.json | 2 +-
.../apache/camel/catalog/models/onCompletion.json | 2 +-
.../apache/camel/catalog/models/onException.json | 2 +-
.../apache/camel/catalog/models/onFallback.json | 2 +-
.../org/apache/camel/catalog/models/otherwise.json | 2 +-
.../org/apache/camel/catalog/models/pipeline.json | 2 +-
.../apache/camel/catalog/models/resequence.json | 2 +-
.../org/apache/camel/catalog/models/route.json | 2 +-
.../org/apache/camel/catalog/models/saga.json | 2 +-
.../org/apache/camel/catalog/models/split.json | 2 +-
.../org/apache/camel/catalog/models/step.json | 2 +-
.../org/apache/camel/catalog/models/when.json | 2 +-
.../catalog/models/whenSkipSendToEndpoint.json | 2 +-
.../apache/camel/catalog/schemas/camel-spring.xsd | 83 ++++++++
.../camel-ai/camel-langchain4j-tokenizer/pom.xml | 96 +++++++++
.../services/org/apache/camel/other.properties | 7 +
.../apache/camel/tokenizer/langchain4j-character | 2 +
.../org/apache/camel/tokenizer/langchain4j-line | 2 +
.../apache/camel/tokenizer/langchain4j-paragraph | 2 +
.../apache/camel/tokenizer/langchain4j-sentence | 2 +
.../org/apache/camel/tokenizer/langchain4j-word | 2 +
.../generated/resources/langchain4j-tokenizer.json | 15 ++
.../main/docs/langchain4j-tokenizer-component.adoc | 119 +++++++++++
.../tokenizer/AbstractLangChain4JTokenizer.java | 63 ++++++
.../tokenizer/LangChain4JCharacterTokenizer.java | 40 ++++
.../tokenizer/LangChain4JLineTokenizer.java | 40 ++++
.../tokenizer/LangChain4JParagraphTokenizer.java | 40 ++++
.../tokenizer/LangChain4JSentenceTokenizer.java | 40 ++++
.../tokenizer/LangChain4JWordTokenizer.java | 40 ++++
.../tokenizer/config/LangChain4JConfiguration.java | 53 +++++
.../config/LangChain4JQwenConfiguration.java | 39 ++++
.../langchain4j/tokenizer/util/SplitterTypes.java | 30 +++
.../langchain4j/tokenizer/util/SplitterUtil.java | 117 +++++++++++
.../langchain4j/tokenizer/util/TokenizerTypes.java | 28 +++
.../tokenizer/LangChain4JLineTokenizerTest.java | 55 ++++++
.../LangChain4JParagraphTokenizerConfigTest.java | 63 ++++++
.../LangChain4JParagraphTokenizerTest.java | 55 ++++++
.../LangChain4JSentenceTokenizerTest.java | 55 ++++++
.../tokenizer/LangChain4JTokenizerTestSupport.java | 36 ++++
.../tokenizer/LangChain4JWordTokenizerTest.java | 55 ++++++
.../src/test/resources/log4j2.properties | 33 ++++
.../src/test/resources/road-not-taken.txt | 23 +++
components/camel-ai/pom.xml | 1 +
.../apache/camel/spi/annotations/Tokenizer.java | 33 ++++
.../main/java/org/apache/camel/spi/Tokenizer.java | 90 +++++++++
.../META-INF/org/apache/camel/model/aggregate.json | 2 +-
.../org/apache/camel/model/circuitBreaker.json | 2 +-
.../META-INF/org/apache/camel/model/doCatch.json | 2 +-
.../META-INF/org/apache/camel/model/doFinally.json | 2 +-
.../META-INF/org/apache/camel/model/doTry.json | 2 +-
.../META-INF/org/apache/camel/model/filter.json | 2 +-
.../org/apache/camel/model/idempotentConsumer.json | 2 +-
.../META-INF/org/apache/camel/model/intercept.json | 2 +-
.../org/apache/camel/model/interceptFrom.json | 2 +-
.../camel/model/interceptSendToEndpoint.json | 2 +-
.../META-INF/org/apache/camel/model/kamelet.json | 2 +-
.../org/apache/camel/model/loadBalance.json | 2 +-
.../META-INF/org/apache/camel/model/loop.json | 2 +-
.../META-INF/org/apache/camel/model/multicast.json | 2 +-
.../org/apache/camel/model/onCompletion.json | 2 +-
.../org/apache/camel/model/onException.json | 2 +-
.../org/apache/camel/model/onFallback.json | 2 +-
.../META-INF/org/apache/camel/model/otherwise.json | 2 +-
.../META-INF/org/apache/camel/model/pipeline.json | 2 +-
.../org/apache/camel/model/resequence.json | 2 +-
.../META-INF/org/apache/camel/model/route.json | 2 +-
.../META-INF/org/apache/camel/model/saga.json | 2 +-
.../META-INF/org/apache/camel/model/split.json | 2 +-
.../META-INF/org/apache/camel/model/step.json | 2 +-
.../apache/camel/model/tokenizer/langChain4j.json | 23 +++
.../META-INF/org/apache/camel/model/when.json | 2 +-
.../apache/camel/model/whenSkipSendToEndpoint.json | 2 +-
.../services/org/apache/camel/model.properties | 1 +
.../org/apache/camel/model/tokenizer/jaxb.index | 2 +
.../org/apache/camel/builder/RouteBuilder.java | 21 ++
.../org/apache/camel/builder/TokenizerBuilder.java | 33 ++++
.../camel/builder/TokenizerBuilderFactory.java | 61 ++++++
.../apache/camel/model/ProcessorDefinition.java | 12 ++
.../apache/camel/model/TokenizerDefinition.java | 79 ++++++++
.../tokenizer/LangChain4jTokenizerDefinition.java | 217 +++++++++++++++++++++
.../apache/camel/model/tokenizer/package-info.java | 24 +++
.../apache/camel/processor/TokenizerProcessor.java | 108 ++++++++++
.../org/apache/camel/reifier/ProcessorReifier.java | 4 +
.../tokenizer/LangChain4JTokenizerReifier.java | 48 +++++
.../camel/reifier/tokenizer/TokenizerReifier.java | 63 ++++++
.../java/org/apache/camel/xml/in/ModelParser.java | 10 +
.../java/org/apache/camel/xml/out/ModelWriter.java | 14 ++
.../org/apache/camel/yaml/out/ModelWriter.java | 14 ++
docs/components/modules/ROOT/nav.adoc | 1 +
.../pages/langchain4j-tokenizer-component.adoc | 1 +
.../examples/json/langchain4j-tokenizer.json | 1 +
.../dsl/yaml/deserializers/ModelDeserializers.java | 79 ++++++++
.../deserializers/ModelDeserializersResolver.java | 3 +
.../generated/resources/schema/camelYamlDsl.json | 46 +++++
parent/pom.xml | 5 +
.../apache/camel/spi/annotations/Tokenizer.java | 33 ++++
113 files changed, 2348 insertions(+), 52 deletions(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index d4be05ec273..270a0dd62c9 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1327,6 +1327,11 @@
<artifactId>camel-langchain4j-embeddings</artifactId>
<version>4.8.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-langchain4j-tokenizer</artifactId>
+ <version>4.8.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-langchain4j-web-search</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml
index af7bc3a0e46..88b28d5bc89 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -1122,6 +1122,11 @@
<artifactId>camel-langchain4j-embeddings</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-langchain4j-tokenizer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-langchain4j-web-search</artifactId>
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
index 01bf90d409c..f89883d1b2b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
@@ -83,6 +83,7 @@ jsonpath
jtaTransactionErrorHandler
kamelet
kubernetesServiceDiscovery
+langChain4j
language
loadBalance
loadBalancerConfiguration
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json
index db9a9eb74ac..b2a77cfeeae 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json
@@ -42,7 +42,7 @@
"discardOnAggregationFailure": { "index": 27, "kind": "attribute", "displayName": "Discard On Aggregation Failure", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Discards the aggregated message when aggregation failed (an exception was thrown from AggregationStrategy . This means the partly aggregated message is dropped an [...]
"forceCompletionOnStop": { "index": 28, "kind": "attribute", "displayName": "Force Completion On Stop", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Indicates to complete all current aggregated exchanges when the context is stopped" },
"completeAllOnStop": { "index": 29, "kind": "attribute", "displayName": "Complete All On Stop", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Indicates to wait to complete all current and partial (pending) aggregated exchanges when the context is stopped. This also means that we will wait for all pending exchanges which ar [...]
- "outputs": { "index": 30, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 30, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelAggregatedSize": { "index": 0, "kind": "exchangeProperty", "displayName": "Aggregated Size", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Number of exchanges that was grouped together." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json
index 193c654c2fe..1e0ead30245 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/circuitBreaker.json
@@ -19,7 +19,7 @@
"resilience4jConfiguration": { "index": 4, "kind": "element", "displayName": "Resilience4j Configuration", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.Resilience4jConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use Resilience4j with the given configuration." },
"faultToleranceConfiguration": { "index": 5, "kind": "element", "displayName": "Fault Tolerance Configuration", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.FaultToleranceConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use MicroProfile Fault Tolerance with the given configuration." },
"onFallback": { "index": 6, "kind": "element", "displayName": "On Fallback", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.OnFallbackDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The fallback route path to execute that does not go over the network. This should be a static or cached result that can immediately be returned upon failure. If the fallback requires network connection then use onFallbackV [...]
- "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelResponseSuccessfulExecution": { "index": 0, "kind": "exchangeProperty", "displayName": "Response Successful Execution", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Whether the exchange was processed successfully by the circuit breaker" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doCatch.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doCatch.json
index cea0355a240..416789fae4f 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doCatch.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doCatch.json
@@ -17,7 +17,7 @@
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"exception": { "index": 3, "kind": "element", "displayName": "Exception", "group": "common", "required": false, "type": "array", "javaType": "java.util.List<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "description": "The exception(s) to catch." },
"onWhen": { "index": 4, "kind": "element", "displayName": "On When", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.WhenDefinition", "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets an additional predicate that should be true before the onCatch is triggered. To be used for fine grained controlling whether a thrown exception should be intercepted by this exception type or not." },
- "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelExceptionCaught": { "index": 0, "kind": "exchangeProperty", "displayName": "Exception Caught", "label": "producer", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "autowired": false, "secret": false, "description": "Stores the caught exception due to a processing error of the current Exchange" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doFinally.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doFinally.json
index 094fc172d4c..d4eb18e48b9 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doFinally.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doFinally.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelExceptionCaught": { "index": 0, "kind": "exchangeProperty", "displayName": "Exception Caught", "label": "producer", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "autowired": false, "secret": false, "description": "Stores the caught exception due to a processing error of the current Exchange" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doTry.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doTry.json
index ecbee854488..db7fd3a740e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doTry.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/doTry.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json
index afbd7939bbe..6c23b04c450 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json
@@ -17,6 +17,6 @@
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
"statusPropertyName": { "index": 4, "kind": "attribute", "displayName": "Status Property Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of exchange property to use for storing the status of the filtering. Setting this allows to know if the filter predicate evaluated as true or false." },
- "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json
index 628e37f83f9..d7a1392bc1c 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json
@@ -21,7 +21,7 @@
"completionEager": { "index": 6, "kind": "attribute", "displayName": "Completion Eager", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether to complete the idempotent consumer eager or when the exchange is done. If this option is true to complete eager, then the idempotent consumer will trigger its completion when [...]
"skipDuplicate": { "index": 7, "kind": "attribute", "displayName": "Skip Duplicate", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Sets whether to skip duplicates or not. The default behavior is to skip duplicates. A duplicate message would have the Exchange property org.apache.camel.Exchange#DUPLICATE_MESSAGE set to a Bool [...]
"removeOnFailure": { "index": 8, "kind": "attribute", "displayName": "Remove On Failure", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Sets whether to remove or keep the key on failure. The default behavior is to remove the key on failure." },
- "outputs": { "index": 9, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 9, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
},
"exchangeProperties": {
"CamelDuplicateMessage": { "index": 0, "kind": "exchangeProperty", "displayName": "Duplicate Message", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Whether this exchange is a duplicate detected by the Idempotent Consumer EIP" }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/intercept.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/intercept.json
index 5d834fa069b..c6c0f0e5c34 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/intercept.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/intercept.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptFrom.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptFrom.json
index d8ebe06bc28..300a4cc4ea7 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptFrom.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptFrom.json
@@ -16,7 +16,7 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"uri": { "index": 3, "kind": "attribute", "displayName": "Uri", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Intercept incoming messages from the uri or uri pattern. If this option is not configured, then all incoming messages is intercepted." },
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelInterceptedEndpoint": { "index": 0, "kind": "exchangeProperty", "displayName": "Intercepted Endpoint", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The endpoint URI that was intercepted" }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptSendToEndpoint.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptSendToEndpoint.json
index bea456d1bed..f41c1f5195a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptSendToEndpoint.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/interceptSendToEndpoint.json
@@ -18,7 +18,7 @@
"uri": { "index": 3, "kind": "attribute", "displayName": "Uri", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Intercept sending to the uri or uri pattern." },
"skipSendToOriginalEndpoint": { "index": 4, "kind": "attribute", "displayName": "Skip Send To Original Endpoint", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set to true then the message is not sent to the original endpoint. By default (false) the message is both intercepted and then sent to the original endpoint." },
"afterUri": { "index": 5, "kind": "attribute", "displayName": "After Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "After sending to the endpoint then send the message to this uri which allows to process its result." },
- "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelInterceptedEndpoint": { "index": 0, "kind": "exchangeProperty", "displayName": "Intercepted Endpoint", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The endpoint URI that was intercepted" }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/kamelet.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/kamelet.json
index 3bfecf88e17..b27ac1a3f67 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/kamelet.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/kamelet.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"name": { "index": 3, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of the Kamelet (templateId\/routeId) to call. Options for the kamelet can be specified using uri syntax, eg mynamecount=4&type=gold." },
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/langChain4j.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/langChain4j.json
new file mode 100644
index 00000000000..78eea7f2432
--- /dev/null
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/langChain4j.json
@@ -0,0 +1,23 @@
+{
+ "model": {
+ "kind": "model",
+ "name": "langChain4j",
+ "title": "LangChain4J Tokenizer",
+ "description": "Represents a tokenizer that uses LangChain4j for tokenization",
+ "deprecated": false,
+ "firstVersion": "4.8.0",
+ "label": "tokenizer,transformation,ai",
+ "javaType": "org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition",
+ "abstract": false,
+ "input": true,
+ "output": false
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
+ "description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
+ "disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
+ "maxTokens": { "index": 3, "kind": "attribute", "displayName": "Max Tokens", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1024", "description": "Sets the maximum number of tokens on each segment" },
+ "maxOverlap": { "index": 4, "kind": "attribute", "displayName": "Max Overlap", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Sets the maximum number of tokens that can overlap in each segment" },
+ "tokenizerType": { "index": 5, "kind": "attribute", "displayName": "Tokenizer Type", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.tokenizer.TokenizerType", "enum": [ "OPEN_AI", "AZURE", "QWEN" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "OPEN_AI", "description": "Sets the tokenizer type" }
+ }
+}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loadBalance.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loadBalance.json
index ce2da300d4e..349712ef72f 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loadBalance.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loadBalance.json
@@ -16,7 +16,7 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"loadBalancerType": { "index": 3, "kind": "element", "displayName": "Load Balancer Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.LoadBalancerDefinition", "oneOf": [ "customLoadBalancer", "failoverLoadBalancer", "randomLoadBalancer", "roundRobinLoadBalancer", "stickyLoadBalancer", "topicLoadBalancer", "weightedLoadBalancer" ], "deprecated": false, "autowired": false, "secret": false, "description": "The load balancer to be used" },
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
"inheritErrorHandler": { "index": 5, "kind": "attribute", "displayName": "Inherit Error Handler", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether or not to inherit the configured error handler. The default value is true. You can use this to disable using the inherited error handler for a given DSL such as a load balancer where you wan [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json
index 5b66a61bf79..bd176b24e9f 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json
@@ -19,7 +19,7 @@
"copy": { "index": 4, "kind": "attribute", "displayName": "Copy", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the copy attribute is true, a copy of the input Exchange is used for each iteration. That means each iteration will start from a copy of the same message. By default loop will loop the same exchange all over, [...]
"doWhile": { "index": 5, "kind": "attribute", "displayName": "Do While", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enables the while loop that loops until the predicate evaluates to false or null." },
"breakOnShutdown": { "index": 6, "kind": "attribute", "displayName": "Break On Shutdown", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the breakOnShutdown attribute is true, then the loop will not iterate until it reaches the end when Camel is shut down." },
- "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
},
"exchangeProperties": {
"CamelLoopIndex": { "index": 0, "kind": "exchangeProperty", "displayName": "Loop Index", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Index of the current iteration (0 based)." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/multicast.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/multicast.json
index fd0dc0c21b3..2d42f7f8ab8 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/multicast.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/multicast.json
@@ -27,7 +27,7 @@
"executorService": { "index": 12, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatic implied, and you do not have to enable that option as well." },
"onPrepare": { "index": 13, "kind": "attribute", "displayName": "On Prepare", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.Processor", "deprecated": false, "autowired": false, "secret": false, "description": "Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send, or any custom logic needed before the exchange is send." },
"shareUnitOfWork": { "index": 14, "kind": "attribute", "displayName": "Share Unit Of Work", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Multicast will by default not share unit of work between the parent exchange and each multicasted [...]
- "outputs": { "index": 15, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 15, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelMulticastIndex": { "index": 0, "kind": "exchangeProperty", "displayName": "Multicast Index", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "An index counter that increases for each Exchange being multicasted. The counter starts from 0." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onCompletion.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onCompletion.json
index a0ad21ad60c..1d363618bf4 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onCompletion.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onCompletion.json
@@ -22,7 +22,7 @@
"executorService": { "index": 7, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatic implied, and you do not have to enable that option as well." },
"useOriginalMessage": { "index": 8, "kind": "attribute", "displayName": "Use Original Message", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input message body when an org.apache.camel.Exchange for this on completion. The original input message is defensively copied, and the copied message body is co [...]
"onWhen": { "index": 9, "kind": "element", "displayName": "On When", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.WhenDefinition", "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets an additional predicate that should be true before the onCompletion is triggered. To be used for fine grained controlling whether a completion callback should be invoked or not" },
- "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelOnCompletion": { "index": 0, "kind": "exchangeProperty", "displayName": "On Completion", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Flag to mark that this exchange is currently being executed as onCompletion" }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json
index 474e7ea5d6b..0540bf618c7 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json
@@ -26,7 +26,7 @@
"onExceptionOccurredRef": { "index": 11, "kind": "attribute", "displayName": "On Exception Occurred Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that should be processed just after an exception occurred. Can be used to perform custom logging about the occurred exception at the exact time it happened. Importan [...]
"useOriginalMessage": { "index": 12, "kind": "attribute", "displayName": "Use Original Message", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message (original body and headers) when an org.apache.camel.Exchange is moved to the dead letter queue. Notice: this only applies when [...]
"useOriginalBody": { "index": 13, "kind": "attribute", "displayName": "Use Original Body", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message body (original body only) when an org.apache.camel.Exchange is moved to the dead letter queue. Notice: this only applies when all rede [...]
- "outputs": { "index": 14, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 14, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelExceptionCaught": { "index": 0, "kind": "exchangeProperty", "displayName": "Exception Caught", "label": "producer", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "autowired": false, "secret": false, "description": "Stores the caught exception due to a processing error of the current Exchange" },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onFallback.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onFallback.json
index cb020976b79..7e8b787f47e 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onFallback.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onFallback.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"fallbackViaNetwork": { "index": 3, "kind": "attribute", "displayName": "Fallback Via Network", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the fallback goes over the network. If the fallback will go over the network it is another possible point of failure. It is important to execute the fallback command on a sep [...]
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/otherwise.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/otherwise.json
index 5b449845c43..df8cbba9ab3 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/otherwise.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/otherwise.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pipeline.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pipeline.json
index 013d1b0b8e6..34f9fbb2fe1 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pipeline.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pipeline.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json
index c35d0921036..1ff14d43ab1 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json
@@ -17,6 +17,6 @@
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
"resequencerConfig": { "index": 4, "kind": "element", "displayName": "Resequencer Config", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.config.ResequencerConfig", "oneOf": [ "batchConfig", "streamConfig" ], "deprecated": false, "autowired": false, "secret": false, "description": "To configure the resequencer in using either batch or stream configuration. Will by default use batch configuration." },
- "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json
index d0a6cfe535b..5b354ead49d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json
@@ -33,6 +33,6 @@
"inputType": { "index": 18, "kind": "element", "displayName": "Input Type", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.InputTypeDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Declare the expected data type of the input message. If the actual message type is different at runtime, camel look for a required org.apache.camel.spi.Transformer and apply if exists. The type name co [...]
"outputType": { "index": 19, "kind": "element", "displayName": "Output Type", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.OutputTypeDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Declare the expected data type of the output message. If the actual message type is different at runtime, camel look for a required org.apache.camel.spi.Transformer and apply if exists. The type nam [...]
"input": { "index": 20, "kind": "element", "displayName": "Input", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.FromDefinition", "oneOf": [ "from" ], "deprecated": false, "autowired": false, "secret": false, "description": "Input to the route." },
- "outputs": { "index": 21, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint [...]
+ "outputs": { "index": 21, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/saga.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/saga.json
index e11814fbbaa..3dca896b9af 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/saga.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/saga.json
@@ -22,6 +22,6 @@
"compensation": { "index": 7, "kind": "element", "displayName": "Compensation", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.SagaActionUriDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The compensation endpoint URI that must be called to compensate all changes done in the route. The route corresponding to the compensation URI must perform compensation and complete without error. If errors occur dur [...]
"completion": { "index": 8, "kind": "element", "displayName": "Completion", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.SagaActionUriDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The completion endpoint URI that will be called when the Saga is completed successfully. The route corresponding to the completion URI must perform completion tasks and terminate without error. If errors occur during com [...]
"option": { "index": 9, "kind": "element", "displayName": "Option", "group": "advanced", "label": "advanced", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.PropertyExpressionDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Allows to save properties of the current exchange in order to re-use them in a compensation\/completion callback route. Options are usually helpful e.g. to store and retrieve identifier [...]
- "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json
index d3c031ece25..05e37bfcf41 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json
@@ -29,7 +29,7 @@
"executorService": { "index": 14, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatically implied, and you do not have to enable that option as well." },
"onPrepare": { "index": 15, "kind": "attribute", "displayName": "On Prepare", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.Processor", "deprecated": false, "autowired": false, "secret": false, "description": "Uses the Processor when preparing the org.apache.camel.Exchange to be sent. This can be used to deep-clone messages that should be sent, or any custom logic needed before the exchange is sent." },
"shareUnitOfWork": { "index": 16, "kind": "attribute", "displayName": "Share Unit Of Work", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Splitter will by default not share unit of work between the parent exchange and each split exchan [...]
- "outputs": { "index": 17, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercep [...]
+ "outputs": { "index": 17, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercep [...]
},
"exchangeProperties": {
"CamelSplitIndex": { "index": 0, "kind": "exchangeProperty", "displayName": "Split Index", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "A split counter that increases for each Exchange being split. The counter starts from 0." },
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/step.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/step.json
index 00d3b27db0b..59f5b8a92e3 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/step.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/step.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelStepId": { "index": 0, "kind": "exchangeProperty", "displayName": "Step Id", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of the Step EIP" }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json
index 65811f1e3ee..ef003985109 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/whenSkipSendToEndpoint.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/whenSkipSendToEndpoint.json
index 5783a281070..1de8dc65a51 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/whenSkipSendToEndpoint.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/whenSkipSendToEndpoint.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index a870e8b3dc7..c5cac9d9a5f 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -853,6 +853,15 @@ Key store facility for cryptographic keys and certificates
<xs:documentation xml:lang="en">
<![CDATA[
Deprecated: null
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="langChain4j" type="tns:langChain4JTokenizerDefinition">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Represents a tokenizer that uses LangChain4j for tokenization
]]>
</xs:documentation>
</xs:annotation>
@@ -3622,6 +3631,7 @@ will fallback to use the fixed value if the Expression result was null or 0.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="parallelProcessing" type="xs:string">
@@ -4263,6 +4273,7 @@ controlling whether a thrown exception should be intercepted by this exception t
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -4373,6 +4384,7 @@ controlling whether a thrown exception should be intercepted by this exception t
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -4474,6 +4486,7 @@ during startup to keep at runtime only the branch that matched. Default value: f
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -4558,6 +4571,7 @@ during startup to keep at runtime only the branch that matched. Default value: f
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="configuration" type="xs:string">
@@ -5031,6 +5045,7 @@ References to a custom thread pool to use when bulkhead is enabled.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="fallbackViaNetwork" type="xs:string">
@@ -6200,6 +6215,7 @@ Sets the logging level to use for logging transactional rollback. This option is
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="statusPropertyName" type="xs:string">
@@ -6291,6 +6307,7 @@ predicate evaluated as true or false.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -6453,6 +6470,7 @@ Global option value.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="idempotentRepository" type="xs:string" use="required">
@@ -6614,6 +6632,7 @@ Whether if validation is required for this input type. Default value: false
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -6712,6 +6731,7 @@ intercepted.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="uri" type="xs:string" use="required">
@@ -6821,6 +6841,7 @@ After sending to the endpoint then send the message to this uri which allows to
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
@@ -6921,6 +6942,7 @@ mynamecount=4&type=gold.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -7240,6 +7262,7 @@ To refer to a custom logger instance to lookup from the registry.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="copy" type="xs:string">
@@ -10648,6 +10671,7 @@ maximum decompressed size. Default value: 1073741824
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="aggregationStrategy" type="xs:string">
@@ -10872,6 +10896,7 @@ controlling whether a completion callback should be invoked or not.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="mode" type="xs:string">
@@ -11071,6 +11096,7 @@ its considered handled as well.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="redeliveryPolicyRef" type="xs:string">
@@ -11330,6 +11356,7 @@ one of the available events. Implementations should not assume the predicate to
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -11411,6 +11438,7 @@ one of the available events. Implementations should not assume the predicate to
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="ref" type="xs:string" use="required">
@@ -12044,6 +12072,7 @@ Name of variable to remove.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -12394,6 +12423,7 @@ Reference to the routes in the xml dsl.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="autoStartup" type="xs:string">
@@ -12832,6 +12862,7 @@ actions. Option values will be transformed into input headers of the compensatio
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="sagaService" type="xs:string">
@@ -13290,6 +13321,7 @@ Sets the comparator to use for sorting.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="delimiter" type="xs:string">
@@ -13521,6 +13553,7 @@ individual unit of work. Default value: false
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -14061,6 +14094,13 @@ Whether to auto startup components when toD is starting up. Default value: true
</xs:extension>
</xs:complexContent>
</xs:complexType>
+ <xs:complexType abstract="true" name="tokenizerDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:noOutputDefinition">
+ <xs:sequence/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
<xs:complexType name="transactedDefinition">
<xs:complexContent>
<xs:extension base="tns:output">
@@ -14137,6 +14177,7 @@ Whether to auto startup components when toD is starting up. Default value: true
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="ref" type="xs:string">
@@ -14280,6 +14321,7 @@ To type used as a target data type in the transformation.
<xs:element ref="tns:validate"/>
<xs:element ref="tns:wireTap"/>
<xs:element ref="tns:serviceCall"/>
+ <xs:element ref="tns:langChain4j"/>
</xs:choice>
</xs:sequence>
</xs:extension>
@@ -17237,6 +17279,40 @@ Sets the component name that this definition will apply to.
</xs:extension>
</xs:complexContent>
</xs:complexType>
+ <xs:complexType name="langChain4JTokenizerDefinition">
+ <xs:complexContent>
+ <xs:extension base="tns:tokenizerDefinition">
+ <xs:sequence/>
+ <xs:attribute name="maxTokens" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the maximum number of tokens on each segment. Default value: 1024
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="maxOverlap" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the maximum number of tokens that can overlap in each segment. Default value: 0
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="tokenizerType" type="xs:string" use="required">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Sets the tokenizer type. Default value: OPEN_AI
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
<xs:complexType name="customTransformer">
<xs:complexContent>
<xs:extension base="tns:transformer">
@@ -18292,6 +18368,13 @@ An optional certificate alias to use. This is useful when the keystore has multi
<xs:enumeration value="NODE"/>
</xs:restriction>
</xs:simpleType>
+ <xs:simpleType name="tokenizerType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="OPEN_AI"/>
+ <xs:enumeration value="AZURE"/>
+ <xs:enumeration value="QWEN"/>
+ </xs:restriction>
+ </xs:simpleType>
<xs:simpleType name="springErrorHandlerType">
<xs:restriction base="xs:string">
<xs:enumeration value="DefaultErrorHandler"/>
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/pom.xml b/components/camel-ai/camel-langchain4j-tokenizer/pom.xml
new file mode 100644
index 00000000000..c263f75c4f2
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/pom.xml
@@ -0,0 +1,96 @@
+<?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</groupId>
+ <artifactId>camel-ai-parent</artifactId>
+ <version>4.8.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-langchain4j-tokenizer</artifactId>
+ <packaging>jar</packaging>
+ <name>Camel :: AI :: LangChain4j :: Tokenizer</name>
+ <description>LangChain4j Tokenizer</description>
+
+ <properties>
+ <firstVersion>4.8.0</firstVersion>
+ <label>ai</label>
+ <title>LangChain4j Tokenizer</title>
+ <supportLevel>Experimental</supportLevel>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j</artifactId>
+ <version>${langchain4j-version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j-open-ai</artifactId>
+ <version>${langchain4j-version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j-azure-open-ai</artifactId>
+ <version>${langchain4j-version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j-dashscope</artifactId>
+ <version>${langchain4j-version}</version>
+ <scope>provided</scope>
+ <exclusions>
+ <!-- messes up with the log -->
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- test -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/other.properties
new file mode 100644
index 00000000000..9bb34fe1400
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/other.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+name=langchain4j-tokenizer
+groupId=org.apache.camel
+artifactId=camel-langchain4j-tokenizer
+version=4.8.0-SNAPSHOT
+projectName=Camel :: AI :: LangChain4j :: Tokenizer
+projectDescription=LangChain4j Tokenizer
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-character b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-character
new file mode 100644
index 00000000000..15630abf733
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-character
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.langchain4j.tokenizer.LangChain4JCharacterTokenizer
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-line b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-line
new file mode 100644
index 00000000000..c18d55ed4d5
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-line
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.langchain4j.tokenizer.LangChain4JLineTokenizer
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-paragraph b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-paragraph
new file mode 100644
index 00000000000..6e84009e3db
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-paragraph
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.langchain4j.tokenizer.LangChain4JParagraphTokenizer
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-sentence b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-sentence
new file mode 100644
index 00000000000..208a044f72f
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-sentence
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.langchain4j.tokenizer.LangChain4JSentenceTokenizer
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-word b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-word
new file mode 100644
index 00000000000..d4589a17afe
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/META-INF/services/org/apache/camel/tokenizer/langchain4j-word
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.langchain4j.tokenizer.LangChain4JWordTokenizer
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/langchain4j-tokenizer.json b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/langchain4j-tokenizer.json
new file mode 100644
index 00000000000..d7a9eba6cfd
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/langchain4j-tokenizer.json
@@ -0,0 +1,15 @@
+{
+ "other": {
+ "kind": "other",
+ "name": "langchain4j-tokenizer",
+ "title": "LangChain4j Tokenizer",
+ "description": "LangChain4j Tokenizer",
+ "deprecated": false,
+ "firstVersion": "4.8.0",
+ "label": "ai",
+ "supportLevel": "Experimental",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-langchain4j-tokenizer",
+ "version": "4.8.0-SNAPSHOT"
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/docs/langchain4j-tokenizer-component.adoc b/components/camel-ai/camel-langchain4j-tokenizer/src/main/docs/langchain4j-tokenizer-component.adoc
new file mode 100644
index 00000000000..9962d14aec7
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/docs/langchain4j-tokenizer-component.adoc
@@ -0,0 +1,119 @@
+= LangChain4j Tokenizer Component
+:doctitle: LangChain4j Tokenizer
+:shortname: langchain4j-tokenizer
+:artifactid: camel-langchain4j-tokenizer
+:description: LangChain4j Tokenizer
+:since: 4.8
+:supportlevel: Experimental
+:tabs-sync-option:
+//Manually maintained attributes
+:group: AI
+:camel-spring-boot-name: langchain4j-tokenizer
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The LangChain4j tokenizer component provides support to tokenize (chunk) larger blocks of texts into text segments
+that can be used when interacting with LLMs. Tokenization is particularly helpful when used with
+https://en.wikipedia.org/wiki/Vector_database[vector databases] to provide better and more contextual search results
+for https://en.wikipedia.org/wiki/Retrieval-augmented_generation[retrieval-augmented generation (RAG)].
+
+This component uses the https://docs.langchain4j.dev/tutorials/rag/#document-splitter[LangChain4j document splitter]
+to handle chunking.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-langchain4j-tokenizer</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+----
+
+== Chunking DSL
+
+The tokenization process is done in route, using a DSL that handles the parameters of the tokenization:
+
+[tabs]
+====
+Java::
++
+[source,java]
+-------------------------------------------------------
+from("direct:start")
+ .tokenize(tokenizer()
+ .byParagraph()
+ .maxTokens(1024)
+ .maxOverlap(10)
+ .using(LangChain4jTokenizerDefinition.TokenizerType.OPEN_AI)
+ .end())
+ .split().body()
+ .to("mock:result");
+-------------------------------------------------------
+
+====
+
+The tokenization creates a composite message (i.e.: an array of Strings). This composite message, then can be split
+using the xref:eips:split-eip.adoc[Split EIP] so that each text segment is separately to an endpoint. Alternatively, the
+contents of the composite message may be passed through a processor so that invalid data is filtered.
+
+== Supported Splitters
+
+The following type of splitters is supported:
+
+* By paragraph: using the DSL `tokenizer().byParagraph()`
+* By sentence: using the DSL `tokenizer().bySentence()`
+* By word: using the DSL `tokenizer().byWord()`
+* By line: using the DSL `tokenizer().byLine()`
+* By character: using the DSL `tokenizer().byCharacter()`
+
+== Supported Tokenizers
+
+The following tokenizers are supported:
+
+* OpenAI: using `LangChain4jTokenizerDefinition.TokenizerType.OPEN_AI`
+* Azure: using `LangChain4jTokenizerDefinition.TokenizerType.AZURE`
+* Qwen: using `LangChain4jTokenizerDefinition.TokenizerType.QWEN`
+
+The application must provide the specific implementation of the tokenizer from LangChain4j. At this moment, they are:
+
+[tabs]
+====
+Open AI::
++
+[source,xml]
+-------------------------------------------------------
+<dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j-open-ai</artifactId>
+ <version>${langchain4j-version}</version>
+</dependency>
+-------------------------------------------------------
+
+Azure::
++
+[source,xml]
+-------------------------------------------------------
+<dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j-azure-open-ai</artifactId>
+ <version>${langchain4j-version}</version>
+</dependency>
+-------------------------------------------------------
+
+Qwen::
++
+[source,xml]
+-------------------------------------------------------
+<dependency>
+ <groupId>dev.langchain4j</groupId>
+ <artifactId>langchain4j-dashscope</artifactId>
+ <version>${langchain4j-version}</version>
+</dependency>
+-------------------------------------------------------
+====
\ No newline at end of file
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/AbstractLangChain4JTokenizer.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/AbstractLangChain4JTokenizer.java
new file mode 100644
index 00000000000..6cadffa749b
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/AbstractLangChain4JTokenizer.java
@@ -0,0 +1,63 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import dev.langchain4j.data.document.DocumentSplitter;
+import org.apache.camel.Exchange;
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.util.SplitterUtil;
+import org.apache.camel.spi.Tokenizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Base tokenizer class for LangChain4j
+ */
+abstract class AbstractLangChain4JTokenizer<T extends LangChain4JConfiguration> implements Tokenizer {
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractLangChain4JTokenizer.class);
+ private DocumentSplitter splitter;
+
+ protected void configure(String name, T configuration) {
+ splitter = SplitterUtil.byName(name, configuration);
+ }
+
+ private void debugLog(String[] split) {
+ for (int i = 0; i < split.length; i++) {
+ LOG.debug("Split {} part: {}", i, split[i]);
+ }
+ }
+
+ @Override
+ public final String[] tokenize(Exchange exchange) {
+ final String body = exchange.getIn().getBody(String.class);
+
+ LOG.debug("Starting LangChain4j tokenizer for message: {}", body);
+
+ final String[] split = SplitterUtil.split(splitter, body);
+
+ if (LOG.isDebugEnabled()) {
+ debugLog(split);
+ }
+
+ return split;
+ }
+
+ protected static String toName(String name) {
+ return "langchain4j-" + name;
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JCharacterTokenizer.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JCharacterTokenizer.java
new file mode 100644
index 00000000000..0e57cef0030
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JCharacterTokenizer.java
@@ -0,0 +1,40 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.util.SplitterTypes;
+
+@org.apache.camel.spi.annotations.Tokenizer("langchain4j-character")
+public class LangChain4JCharacterTokenizer extends AbstractLangChain4JTokenizer<LangChain4JConfiguration> {
+
+ @Override
+ public Configuration newConfiguration() {
+ return new LangChain4JConfiguration();
+ }
+
+ @Override
+ public void configure(Configuration configuration) {
+ configure(SplitterTypes.CHARACTER, (LangChain4JConfiguration) configuration);
+ }
+
+ @Override
+ public String name() {
+ return toName(SplitterTypes.CHARACTER);
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JLineTokenizer.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JLineTokenizer.java
new file mode 100644
index 00000000000..d7b1d18b709
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JLineTokenizer.java
@@ -0,0 +1,40 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.util.SplitterTypes;
+
+@org.apache.camel.spi.annotations.Tokenizer("langchain4j-line")
+public class LangChain4JLineTokenizer extends AbstractLangChain4JTokenizer<LangChain4JConfiguration> {
+
+ @Override
+ public Configuration newConfiguration() {
+ return new LangChain4JConfiguration();
+ }
+
+ @Override
+ public void configure(Configuration configuration) {
+ configure(SplitterTypes.LINE, (LangChain4JConfiguration) configuration);
+ }
+
+ @Override
+ public String name() {
+ return toName(SplitterTypes.LINE);
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizer.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizer.java
new file mode 100644
index 00000000000..4c0a4ef8b1e
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizer.java
@@ -0,0 +1,40 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.util.SplitterTypes;
+
+@org.apache.camel.spi.annotations.Tokenizer("langchain4j-paragraph")
+public class LangChain4JParagraphTokenizer extends AbstractLangChain4JTokenizer<LangChain4JConfiguration> {
+
+ @Override
+ public Configuration newConfiguration() {
+ return new LangChain4JConfiguration();
+ }
+
+ @Override
+ public void configure(Configuration configuration) {
+ configure(SplitterTypes.PARAGRAPH, (LangChain4JConfiguration) configuration);
+ }
+
+ @Override
+ public String name() {
+ return toName(SplitterTypes.PARAGRAPH);
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JSentenceTokenizer.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JSentenceTokenizer.java
new file mode 100644
index 00000000000..fb94dfcc939
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JSentenceTokenizer.java
@@ -0,0 +1,40 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.util.SplitterTypes;
+
+@org.apache.camel.spi.annotations.Tokenizer("langchain4j-sentence")
+public class LangChain4JSentenceTokenizer extends AbstractLangChain4JTokenizer<LangChain4JConfiguration> {
+
+ @Override
+ public Configuration newConfiguration() {
+ return new LangChain4JConfiguration();
+ }
+
+ @Override
+ public void configure(Configuration configuration) {
+ configure(SplitterTypes.SENTENCE, (LangChain4JConfiguration) configuration);
+ }
+
+ @Override
+ public String name() {
+ return toName(SplitterTypes.SENTENCE);
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JWordTokenizer.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JWordTokenizer.java
new file mode 100644
index 00000000000..4b2bf2ca7b3
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JWordTokenizer.java
@@ -0,0 +1,40 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.util.SplitterTypes;
+
+@org.apache.camel.spi.annotations.Tokenizer("langchain4j-word")
+public class LangChain4JWordTokenizer extends AbstractLangChain4JTokenizer<LangChain4JConfiguration> {
+
+ @Override
+ public Configuration newConfiguration() {
+ return new LangChain4JConfiguration();
+ }
+
+ @Override
+ public void configure(Configuration configuration) {
+ configure(SplitterTypes.WORD, (LangChain4JConfiguration) configuration);
+ }
+
+ @Override
+ public String name() {
+ return toName(SplitterTypes.WORD);
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/config/LangChain4JConfiguration.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/config/LangChain4JConfiguration.java
new file mode 100644
index 00000000000..69570ee4bf1
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/config/LangChain4JConfiguration.java
@@ -0,0 +1,53 @@
+/*
+ * 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.component.langchain4j.tokenizer.config;
+
+import org.apache.camel.spi.Tokenizer;
+
+public class LangChain4JConfiguration implements Tokenizer.Configuration {
+ private int maxTokens;
+ private int maxOverlap;
+ private String type;
+
+ public int getMaxTokens() {
+ return maxTokens;
+ }
+
+ @Override
+ public void setMaxTokens(int maxTokens) {
+ this.maxTokens = maxTokens;
+ }
+
+ public int getMaxOverlap() {
+ return maxOverlap;
+ }
+
+ @Override
+ public void setMaxOverlap(int maxOverlap) {
+ this.maxOverlap = maxOverlap;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ @Override
+ public void setType(String type) {
+ this.type = type;
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/config/LangChain4JQwenConfiguration.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/config/LangChain4JQwenConfiguration.java
new file mode 100644
index 00000000000..66d4139515b
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/config/LangChain4JQwenConfiguration.java
@@ -0,0 +1,39 @@
+/*
+ * 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.component.langchain4j.tokenizer.config;
+
+public class LangChain4JQwenConfiguration extends LangChain4JConfiguration {
+ private String apiKey;
+ private String modelName;
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/SplitterTypes.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/SplitterTypes.java
new file mode 100644
index 00000000000..f1ff8e38b9b
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/SplitterTypes.java
@@ -0,0 +1,30 @@
+/*
+ * 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.component.langchain4j.tokenizer.util;
+
+public final class SplitterTypes {
+ public static final String WORD = "word";
+ public static final String SENTENCE = "sentence";
+ public static final String PARAGRAPH = "paragraph";
+ public static final String LINE = "line";
+ public static final String CHARACTER = "character";
+
+ private SplitterTypes() {
+
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/SplitterUtil.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/SplitterUtil.java
new file mode 100644
index 00000000000..2ae0474adcb
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/SplitterUtil.java
@@ -0,0 +1,117 @@
+/*
+ * 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.component.langchain4j.tokenizer.util;
+
+import dev.langchain4j.data.document.DocumentSplitter;
+import dev.langchain4j.data.document.splitter.DocumentByCharacterSplitter;
+import dev.langchain4j.data.document.splitter.DocumentByLineSplitter;
+import dev.langchain4j.data.document.splitter.DocumentByParagraphSplitter;
+import dev.langchain4j.data.document.splitter.DocumentBySentenceSplitter;
+import dev.langchain4j.data.document.splitter.DocumentByWordSplitter;
+import dev.langchain4j.model.Tokenizer;
+import dev.langchain4j.model.azure.AzureOpenAiTokenizer;
+import dev.langchain4j.model.dashscope.QwenTokenizer;
+import dev.langchain4j.model.openai.OpenAiTokenizer;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JConfiguration;
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JQwenConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public final class SplitterUtil {
+ private static final Logger LOG = LoggerFactory.getLogger(SplitterUtil.class);
+
+ private SplitterUtil() {
+
+ }
+
+ public static DocumentSplitter byName(String name, LangChain4JConfiguration configuration) {
+ assert name != null : "The splitter name must be provided";
+
+ int maxTokens = configuration.getMaxTokens();
+ int maxOverlap = configuration.getMaxOverlap();
+
+ String type = configuration.getType();
+
+ final Tokenizer tokenizer = buildTokenizer(configuration, type);
+
+ LOG.debug("Creating a {} splitter", name);
+ switch (name) {
+ case SplitterTypes.SENTENCE -> {
+ return new DocumentBySentenceSplitter(maxTokens, maxOverlap, tokenizer);
+ }
+ case SplitterTypes.PARAGRAPH -> {
+ return new DocumentByParagraphSplitter(maxTokens, maxOverlap, tokenizer);
+ }
+ case SplitterTypes.CHARACTER -> {
+ return new DocumentByCharacterSplitter(maxTokens, maxOverlap, tokenizer);
+ }
+ case SplitterTypes.WORD -> {
+ return new DocumentByWordSplitter(maxTokens, maxOverlap, tokenizer);
+ }
+ case SplitterTypes.LINE -> {
+ return new DocumentByLineSplitter(maxTokens, maxOverlap, tokenizer);
+ }
+ default -> throw new IllegalArgumentException("Unknown splitter name: " + name);
+ }
+ }
+
+ private static Tokenizer buildTokenizer(LangChain4JConfiguration configuration, String type) {
+ if (type == null) {
+ throw new RuntimeCamelException("Invalid tokenizer type: null");
+ }
+
+ return switch (type) {
+ case TokenizerTypes.OPEN_AI -> new OpenAiTokenizer();
+ case TokenizerTypes.AZURE -> new AzureOpenAiTokenizer();
+ case TokenizerTypes.QWEN -> createQwenTokenizer(configuration);
+ default -> throw new RuntimeCamelException("Unknown tokenizer type: " + type);
+ };
+ }
+
+ private static QwenTokenizer createQwenTokenizer(LangChain4JConfiguration configuration) {
+ if (configuration instanceof LangChain4JQwenConfiguration qwenConfiguration) {
+ return new QwenTokenizer(qwenConfiguration.getApiKey(), qwenConfiguration.getModelName());
+ }
+
+ throw new RuntimeCamelException(
+ "Invalid configuration type for the QwenTokenizer: "
+ + configuration.getClass().getSimpleName() +
+ ". Use LangChain4JQwenConfiguration");
+ }
+
+ public static String[] split(DocumentSplitter splitter, String body) {
+ if (splitter instanceof DocumentBySentenceSplitter ds) {
+ return ds.split(body);
+ }
+ if (splitter instanceof DocumentByParagraphSplitter dp) {
+ return dp.split(body);
+ }
+ if (splitter instanceof DocumentByCharacterSplitter dc) {
+ return dc.split(body);
+ }
+ if (splitter instanceof DocumentByWordSplitter dw) {
+ return dw.split(body);
+ }
+ if (splitter instanceof DocumentByLineSplitter dl) {
+ return dl.split(body);
+ }
+
+ throw new RuntimeCamelException("Unsupported splitter type: " + splitter.getClass().getSimpleName());
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/TokenizerTypes.java b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/TokenizerTypes.java
new file mode 100644
index 00000000000..82909a86324
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/main/java/org/apache/camel/component/langchain4j/tokenizer/util/TokenizerTypes.java
@@ -0,0 +1,28 @@
+/*
+ * 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.component.langchain4j.tokenizer.util;
+
+public final class TokenizerTypes {
+ public static final String OPEN_AI = "OPEN_AI";
+ public static final String AZURE = "AZURE";
+ public static final String QWEN = "QWEN";
+
+ private TokenizerTypes() {
+
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JLineTokenizerTest.java b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JLineTokenizerTest.java
new file mode 100644
index 00000000000..62e006ec23f
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JLineTokenizerTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+import org.junit.jupiter.api.Test;
+
+public class LangChain4JLineTokenizerTest extends LangChain4JTokenizerTestSupport {
+ @Test
+ public void testTokenizer() throws InterruptedException {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+
+ mock.expectedMessageCount(20);
+
+ template.sendBody("direct:start", TEXT);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:start")
+ .tokenize(tokenizer()
+ .byLine()
+ .maxTokens(1024)
+ .maxOverlap(10)
+ .using(LangChain4jTokenizerDefinition.TokenizerType.OPEN_AI)
+ .end())
+ .split().body()
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizerConfigTest.java b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizerConfigTest.java
new file mode 100644
index 00000000000..0f0f4174a89
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizerConfigTest.java
@@ -0,0 +1,63 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.langchain4j.tokenizer.config.LangChain4JQwenConfiguration;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+import org.junit.jupiter.api.Test;
+
+public class LangChain4JParagraphTokenizerConfigTest extends LangChain4JTokenizerTestSupport {
+
+ @Test
+ public void testTokenizer() throws InterruptedException {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+
+ mock.expectedMessageCount(4);
+
+ template.sendBody("direct:start", TEXT);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ final LangChain4JQwenConfiguration langChain4JConfiguration = new LangChain4JQwenConfiguration();
+
+ langChain4JConfiguration.setMaxTokens(500);
+ langChain4JConfiguration.setMaxOverlap(50);
+ langChain4JConfiguration.setType(LangChain4jTokenizerDefinition.TokenizerType.QWEN.name());
+ langChain4JConfiguration.setModelName("something");
+ langChain4JConfiguration.setApiKey("my-api-key");
+
+ from("direct:start")
+ .tokenize(tokenizer()
+ .byParagraph()
+ .configuration(langChain4JConfiguration)
+ .end())
+ .split().body()
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizerTest.java b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizerTest.java
new file mode 100644
index 00000000000..5173905def9
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JParagraphTokenizerTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+import org.junit.jupiter.api.Test;
+
+public class LangChain4JParagraphTokenizerTest extends LangChain4JTokenizerTestSupport {
+ @Test
+ public void testTokenizer() throws InterruptedException {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+
+ mock.expectedMessageCount(4);
+
+ template.sendBody("direct:start", TEXT);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:start")
+ .tokenize(tokenizer()
+ .byParagraph()
+ .maxTokens(1024)
+ .maxOverlap(10)
+ .using(LangChain4jTokenizerDefinition.TokenizerType.OPEN_AI)
+ .end())
+ .split().body()
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JSentenceTokenizerTest.java b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JSentenceTokenizerTest.java
new file mode 100644
index 00000000000..f8d906fb119
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JSentenceTokenizerTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+import org.junit.jupiter.api.Test;
+
+public class LangChain4JSentenceTokenizerTest extends LangChain4JTokenizerTestSupport {
+ @Test
+ public void testTokenizer() throws InterruptedException {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+
+ mock.expectedMessageCount(4);
+
+ template.sendBody("direct:start", TEXT);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:start")
+ .tokenize(tokenizer()
+ .bySentence()
+ .maxTokens(1024)
+ .maxOverlap(10)
+ .using(LangChain4jTokenizerDefinition.TokenizerType.OPEN_AI)
+ .end())
+ .split().body()
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JTokenizerTestSupport.java b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JTokenizerTestSupport.java
new file mode 100644
index 00000000000..93a53f8f690
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JTokenizerTestSupport.java
@@ -0,0 +1,36 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.camel.test.junit5.CamelTestSupport;
+
+public class LangChain4JTokenizerTestSupport extends CamelTestSupport {
+ protected static final String TEXT;
+
+ static {
+ try (InputStream resource = LangChain4JParagraphTokenizerTest.class.getResourceAsStream("/road-not-taken.txt")) {
+ assert resource != null;
+ TEXT = new String(resource.readAllBytes());
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JWordTokenizerTest.java b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JWordTokenizerTest.java
new file mode 100644
index 00000000000..6aa7ea5ea00
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/java/org/apache/camel/component/langchain4j/tokenizer/LangChain4JWordTokenizerTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.component.langchain4j.tokenizer;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+import org.junit.jupiter.api.Test;
+
+public class LangChain4JWordTokenizerTest extends LangChain4JTokenizerTestSupport {
+ @Test
+ public void testTokenizer() throws InterruptedException {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+
+ mock.expectedMessageCount(144);
+
+ template.sendBody("direct:start", TEXT);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ from("direct:start")
+ .tokenize(tokenizer()
+ .byWord()
+ .maxTokens(1024)
+ .maxOverlap(10)
+ .using(LangChain4jTokenizerDefinition.TokenizerType.OPEN_AI)
+ .end())
+ .split().body()
+ .to("mock:result");
+ }
+ };
+ }
+}
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/resources/log4j2.properties b/components/camel-ai/camel-langchain4j-tokenizer/src/test/resources/log4j2.properties
new file mode 100644
index 00000000000..fb17b4c2123
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/resources/log4j2.properties
@@ -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.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-langchain4j-tokenizer-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+
+#appender.out.type = Console
+#appender.out.name = out
+#appender.out.layout.type = PatternLayout
+#appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
+
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
+
+logger.camel-langchain4j-embeddings.name = org.apache.camel.component.langchain4j.embeddings
+logger.camel-langchain4j-embeddings.level = DEBUG
diff --git a/components/camel-ai/camel-langchain4j-tokenizer/src/test/resources/road-not-taken.txt b/components/camel-ai/camel-langchain4j-tokenizer/src/test/resources/road-not-taken.txt
new file mode 100644
index 00000000000..e6b7466ec77
--- /dev/null
+++ b/components/camel-ai/camel-langchain4j-tokenizer/src/test/resources/road-not-taken.txt
@@ -0,0 +1,23 @@
+Two roads diverged in a yellow wood,
+And sorry I could not travel both
+And be one traveler, long I stood
+And looked down one as far as I could
+To where it bent in the undergrowth;
+
+Then took the other, as just as fair,
+And having perhaps the better claim,
+Because it was grassy and wanted wear;
+Though as for that the passing there
+Had worn them really about the same,
+
+And both that morning equally lay
+In leaves no step had trodden black.
+Oh, I kept the first for another day!
+Yet knowing how way leads on to way,
+I doubted if I should ever come back.
+
+I shall be telling this with a sigh
+Somewhere ages and ages hence:
+Two roads diverged in a wood, and I—
+I took the one less traveled by,
+And that has made all the difference.
\ No newline at end of file
diff --git a/components/camel-ai/pom.xml b/components/camel-ai/pom.xml
index 30b7d33fa74..e8ee1c629ac 100644
--- a/components/camel-ai/pom.xml
+++ b/components/camel-ai/pom.xml
@@ -43,6 +43,7 @@
<module>camel-milvus</module>
<module>camel-pinecone</module>
<module>camel-qdrant</module>
+ <module>camel-langchain4j-tokenizer</module>
</modules>
</project>
diff --git a/core/camel-api/src/generated/java/org/apache/camel/spi/annotations/Tokenizer.java b/core/camel-api/src/generated/java/org/apache/camel/spi/annotations/Tokenizer.java
new file mode 100644
index 00000000000..d75bfc41b73
--- /dev/null
+++ b/core/camel-api/src/generated/java/org/apache/camel/spi/annotations/Tokenizer.java
@@ -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.
+ */
+package org.apache.camel.spi.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Target({ ElementType.TYPE })
+@ServiceFactory("tokenizer")
+public @interface Tokenizer {
+
+ String value();
+
+}
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/Tokenizer.java b/core/camel-api/src/main/java/org/apache/camel/spi/Tokenizer.java
new file mode 100644
index 00000000000..b41ee3f8bec
--- /dev/null
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/Tokenizer.java
@@ -0,0 +1,90 @@
+/*
+ * 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.spi;
+
+import org.apache.camel.Exchange;
+
+/**
+ * An interface for tokenizing text data. Typically used for machine learning, artificial intelligence and interacting
+ * with vector databases.
+ *
+ * Implementations of this interface should provide a way to configure the tokenizer, and then use that configuration to
+ * tokenize the data in the Exchange.
+ */
+public interface Tokenizer {
+
+ /**
+ * A nested interface representing the configuration options for this tokenizer.
+ *
+ * Implementors of this interface can set the maximum number of tokens, the maximum overlap between tokens, and the
+ * type of tokenization being performed.
+ */
+ interface Configuration {
+ /**
+ * Sets the maximum number of tokens to be produced by the tokenizer.
+ *
+ * @param maxTokens the new maximum number of tokens
+ */
+ void setMaxTokens(int maxTokens);
+
+ /**
+ * Sets the maximum overlap between tokens, where an overlap is defined as the number of characters that are
+ * common between two adjacent segments.
+ *
+ * @param maxOverlap the new maximum overlap
+ */
+ void setMaxOverlap(int maxOverlap);
+
+ /**
+ * Sets the type of tokenization being performed by this tokenizer. This can typically be specific to the
+ * implementation.
+ *
+ * @param type the tokenization type
+ */
+ void setType(String type);
+ }
+
+ /**
+ * Creates a new configuration for this tokenizer, with default values.
+ *
+ * @return a new Configuration object
+ */
+ Configuration newConfiguration();
+
+ /**
+ * Configures this tokenizer using the provided configuration options.
+ *
+ * @param configuration the configuration to use
+ */
+ void configure(Configuration configuration);
+
+ /**
+ * Returns the name of this tokenizer, which can be used for identification or logging purposes.
+ *
+ * @return the name of this tokenizer
+ */
+ String name();
+
+ /**
+ * Tokenizes the data in the provided Exchange using the current configuration options.
+ *
+ * @param exchange the Exchange to tokenize
+ * @return an array of tokens produced by the tokenizer
+ */
+ String[] tokenize(Exchange exchange);
+}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json
index db9a9eb74ac..b2a77cfeeae 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json
@@ -42,7 +42,7 @@
"discardOnAggregationFailure": { "index": 27, "kind": "attribute", "displayName": "Discard On Aggregation Failure", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Discards the aggregated message when aggregation failed (an exception was thrown from AggregationStrategy . This means the partly aggregated message is dropped an [...]
"forceCompletionOnStop": { "index": 28, "kind": "attribute", "displayName": "Force Completion On Stop", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Indicates to complete all current aggregated exchanges when the context is stopped" },
"completeAllOnStop": { "index": 29, "kind": "attribute", "displayName": "Complete All On Stop", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Indicates to wait to complete all current and partial (pending) aggregated exchanges when the context is stopped. This also means that we will wait for all pending exchanges which ar [...]
- "outputs": { "index": 30, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 30, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelAggregatedSize": { "index": 0, "kind": "exchangeProperty", "displayName": "Aggregated Size", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Number of exchanges that was grouped together." },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/circuitBreaker.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/circuitBreaker.json
index 193c654c2fe..1e0ead30245 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/circuitBreaker.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/circuitBreaker.json
@@ -19,7 +19,7 @@
"resilience4jConfiguration": { "index": 4, "kind": "element", "displayName": "Resilience4j Configuration", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.Resilience4jConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use Resilience4j with the given configuration." },
"faultToleranceConfiguration": { "index": 5, "kind": "element", "displayName": "Fault Tolerance Configuration", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.FaultToleranceConfigurationDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the circuit breaker to use MicroProfile Fault Tolerance with the given configuration." },
"onFallback": { "index": 6, "kind": "element", "displayName": "On Fallback", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.OnFallbackDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The fallback route path to execute that does not go over the network. This should be a static or cached result that can immediately be returned upon failure. If the fallback requires network connection then use onFallbackV [...]
- "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelResponseSuccessfulExecution": { "index": 0, "kind": "exchangeProperty", "displayName": "Response Successful Execution", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Whether the exchange was processed successfully by the circuit breaker" },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doCatch.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doCatch.json
index cea0355a240..416789fae4f 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doCatch.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doCatch.json
@@ -17,7 +17,7 @@
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"exception": { "index": 3, "kind": "element", "displayName": "Exception", "group": "common", "required": false, "type": "array", "javaType": "java.util.List<java.lang.String>", "deprecated": false, "autowired": false, "secret": false, "description": "The exception(s) to catch." },
"onWhen": { "index": 4, "kind": "element", "displayName": "On When", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.WhenDefinition", "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets an additional predicate that should be true before the onCatch is triggered. To be used for fine grained controlling whether a thrown exception should be intercepted by this exception type or not." },
- "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelExceptionCaught": { "index": 0, "kind": "exchangeProperty", "displayName": "Exception Caught", "label": "producer", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "autowired": false, "secret": false, "description": "Stores the caught exception due to a processing error of the current Exchange" },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doFinally.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doFinally.json
index 094fc172d4c..d4eb18e48b9 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doFinally.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doFinally.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelExceptionCaught": { "index": 0, "kind": "exchangeProperty", "displayName": "Exception Caught", "label": "producer", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "autowired": false, "secret": false, "description": "Stores the caught exception due to a processing error of the current Exchange" },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doTry.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doTry.json
index ecbee854488..db7fd3a740e 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doTry.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/doTry.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json
index afbd7939bbe..6c23b04c450 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json
@@ -17,6 +17,6 @@
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
"statusPropertyName": { "index": 4, "kind": "attribute", "displayName": "Status Property Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of exchange property to use for storing the status of the filtering. Setting this allows to know if the filter predicate evaluated as true or false." },
- "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json
index 628e37f83f9..d7a1392bc1c 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json
@@ -21,7 +21,7 @@
"completionEager": { "index": 6, "kind": "attribute", "displayName": "Completion Eager", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether to complete the idempotent consumer eager or when the exchange is done. If this option is true to complete eager, then the idempotent consumer will trigger its completion when [...]
"skipDuplicate": { "index": 7, "kind": "attribute", "displayName": "Skip Duplicate", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Sets whether to skip duplicates or not. The default behavior is to skip duplicates. A duplicate message would have the Exchange property org.apache.camel.Exchange#DUPLICATE_MESSAGE set to a Bool [...]
"removeOnFailure": { "index": 8, "kind": "attribute", "displayName": "Remove On Failure", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Sets whether to remove or keep the key on failure. The default behavior is to remove the key on failure." },
- "outputs": { "index": 9, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 9, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
},
"exchangeProperties": {
"CamelDuplicateMessage": { "index": 0, "kind": "exchangeProperty", "displayName": "Duplicate Message", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Whether this exchange is a duplicate detected by the Idempotent Consumer EIP" }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/intercept.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/intercept.json
index 5d834fa069b..c6c0f0e5c34 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/intercept.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/intercept.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptFrom.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptFrom.json
index d8ebe06bc28..300a4cc4ea7 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptFrom.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptFrom.json
@@ -16,7 +16,7 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"uri": { "index": 3, "kind": "attribute", "displayName": "Uri", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Intercept incoming messages from the uri or uri pattern. If this option is not configured, then all incoming messages is intercepted." },
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelInterceptedEndpoint": { "index": 0, "kind": "exchangeProperty", "displayName": "Intercepted Endpoint", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The endpoint URI that was intercepted" }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptSendToEndpoint.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptSendToEndpoint.json
index bea456d1bed..f41c1f5195a 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptSendToEndpoint.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/interceptSendToEndpoint.json
@@ -18,7 +18,7 @@
"uri": { "index": 3, "kind": "attribute", "displayName": "Uri", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Intercept sending to the uri or uri pattern." },
"skipSendToOriginalEndpoint": { "index": 4, "kind": "attribute", "displayName": "Skip Send To Original Endpoint", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set to true then the message is not sent to the original endpoint. By default (false) the message is both intercepted and then sent to the original endpoint." },
"afterUri": { "index": 5, "kind": "attribute", "displayName": "After Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "After sending to the endpoint then send the message to this uri which allows to process its result." },
- "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelInterceptedEndpoint": { "index": 0, "kind": "exchangeProperty", "displayName": "Intercepted Endpoint", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The endpoint URI that was intercepted" }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/kamelet.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/kamelet.json
index 3bfecf88e17..b27ac1a3f67 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/kamelet.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/kamelet.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"name": { "index": 3, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of the Kamelet (templateId\/routeId) to call. Options for the kamelet can be specified using uri syntax, eg mynamecount=4&type=gold." },
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadBalance.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadBalance.json
index ce2da300d4e..349712ef72f 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadBalance.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadBalance.json
@@ -16,7 +16,7 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"loadBalancerType": { "index": 3, "kind": "element", "displayName": "Load Balancer Type", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.LoadBalancerDefinition", "oneOf": [ "customLoadBalancer", "failoverLoadBalancer", "randomLoadBalancer", "roundRobinLoadBalancer", "stickyLoadBalancer", "topicLoadBalancer", "weightedLoadBalancer" ], "deprecated": false, "autowired": false, "secret": false, "description": "The load balancer to be used" },
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
"inheritErrorHandler": { "index": 5, "kind": "attribute", "displayName": "Inherit Error Handler", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether or not to inherit the configured error handler. The default value is true. You can use this to disable using the inherited error handler for a given DSL such as a load balancer where you wan [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json
index 5b66a61bf79..bd176b24e9f 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json
@@ -19,7 +19,7 @@
"copy": { "index": 4, "kind": "attribute", "displayName": "Copy", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the copy attribute is true, a copy of the input Exchange is used for each iteration. That means each iteration will start from a copy of the same message. By default loop will loop the same exchange all over, [...]
"doWhile": { "index": 5, "kind": "attribute", "displayName": "Do While", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enables the while loop that loops until the predicate evaluates to false or null." },
"breakOnShutdown": { "index": 6, "kind": "attribute", "displayName": "Break On Shutdown", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If the breakOnShutdown attribute is true, then the loop will not iterate until it reaches the end when Camel is shut down." },
- "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 7, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
},
"exchangeProperties": {
"CamelLoopIndex": { "index": 0, "kind": "exchangeProperty", "displayName": "Loop Index", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "Index of the current iteration (0 based)." },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/multicast.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/multicast.json
index fd0dc0c21b3..2d42f7f8ab8 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/multicast.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/multicast.json
@@ -27,7 +27,7 @@
"executorService": { "index": 12, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatic implied, and you do not have to enable that option as well." },
"onPrepare": { "index": 13, "kind": "attribute", "displayName": "On Prepare", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.Processor", "deprecated": false, "autowired": false, "secret": false, "description": "Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send, or any custom logic needed before the exchange is send." },
"shareUnitOfWork": { "index": 14, "kind": "attribute", "displayName": "Share Unit Of Work", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Multicast will by default not share unit of work between the parent exchange and each multicasted [...]
- "outputs": { "index": 15, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 15, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelMulticastIndex": { "index": 0, "kind": "exchangeProperty", "displayName": "Multicast Index", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "An index counter that increases for each Exchange being multicasted. The counter starts from 0." },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onCompletion.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onCompletion.json
index a0ad21ad60c..1d363618bf4 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onCompletion.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onCompletion.json
@@ -22,7 +22,7 @@
"executorService": { "index": 7, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatic implied, and you do not have to enable that option as well." },
"useOriginalMessage": { "index": 8, "kind": "attribute", "displayName": "Use Original Message", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input message body when an org.apache.camel.Exchange for this on completion. The original input message is defensively copied, and the copied message body is co [...]
"onWhen": { "index": 9, "kind": "element", "displayName": "On When", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.WhenDefinition", "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets an additional predicate that should be true before the onCompletion is triggered. To be used for fine grained controlling whether a completion callback should be invoked or not" },
- "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelOnCompletion": { "index": 0, "kind": "exchangeProperty", "displayName": "On Completion", "label": "producer", "required": false, "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "description": "Flag to mark that this exchange is currently being executed as onCompletion" }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json
index 474e7ea5d6b..0540bf618c7 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json
@@ -26,7 +26,7 @@
"onExceptionOccurredRef": { "index": 11, "kind": "attribute", "displayName": "On Exception Occurred Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that should be processed just after an exception occurred. Can be used to perform custom logging about the occurred exception at the exact time it happened. Importan [...]
"useOriginalMessage": { "index": 12, "kind": "attribute", "displayName": "Use Original Message", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message (original body and headers) when an org.apache.camel.Exchange is moved to the dead letter queue. Notice: this only applies when [...]
"useOriginalBody": { "index": 13, "kind": "attribute", "displayName": "Use Original Body", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message body (original body only) when an org.apache.camel.Exchange is moved to the dead letter queue. Notice: this only applies when all rede [...]
- "outputs": { "index": 14, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 14, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
},
"exchangeProperties": {
"CamelExceptionCaught": { "index": 0, "kind": "exchangeProperty", "displayName": "Exception Caught", "label": "producer", "required": false, "javaType": "java.lang.Exception", "deprecated": false, "autowired": false, "secret": false, "description": "Stores the caught exception due to a processing error of the current Exchange" },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onFallback.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onFallback.json
index cb020976b79..7e8b787f47e 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onFallback.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onFallback.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"fallbackViaNetwork": { "index": 3, "kind": "attribute", "displayName": "Fallback Via Network", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the fallback goes over the network. If the fallback will go over the network it is another possible point of failure. It is important to execute the fallback command on a sep [...]
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/otherwise.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/otherwise.json
index 5b449845c43..df8cbba9ab3 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/otherwise.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/otherwise.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pipeline.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pipeline.json
index 013d1b0b8e6..34f9fbb2fe1 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pipeline.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pipeline.json
@@ -15,6 +15,6 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json
index c35d0921036..1ff14d43ab1 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json
@@ -17,6 +17,6 @@
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
"resequencerConfig": { "index": 4, "kind": "element", "displayName": "Resequencer Config", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.config.ResequencerConfig", "oneOf": [ "batchConfig", "streamConfig" ], "deprecated": false, "autowired": false, "secret": false, "description": "To configure the resequencer in using either batch or stream configuration. Will by default use batch configuration." },
- "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/route.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/route.json
index d0a6cfe535b..5b354ead49d 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/route.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/route.json
@@ -33,6 +33,6 @@
"inputType": { "index": 18, "kind": "element", "displayName": "Input Type", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.InputTypeDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Declare the expected data type of the input message. If the actual message type is different at runtime, camel look for a required org.apache.camel.spi.Transformer and apply if exists. The type name co [...]
"outputType": { "index": 19, "kind": "element", "displayName": "Output Type", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.OutputTypeDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Declare the expected data type of the output message. If the actual message type is different at runtime, camel look for a required org.apache.camel.spi.Transformer and apply if exists. The type nam [...]
"input": { "index": 20, "kind": "element", "displayName": "Input", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.FromDefinition", "oneOf": [ "from" ], "deprecated": false, "autowired": false, "secret": false, "description": "Input to the route." },
- "outputs": { "index": 21, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint [...]
+ "outputs": { "index": 21, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/saga.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/saga.json
index e11814fbbaa..3dca896b9af 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/saga.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/saga.json
@@ -22,6 +22,6 @@
"compensation": { "index": 7, "kind": "element", "displayName": "Compensation", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.SagaActionUriDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The compensation endpoint URI that must be called to compensate all changes done in the route. The route corresponding to the compensation URI must perform compensation and complete without error. If errors occur dur [...]
"completion": { "index": 8, "kind": "element", "displayName": "Completion", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.SagaActionUriDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "The completion endpoint URI that will be called when the Saga is completed successfully. The route corresponding to the completion URI must perform completion tasks and terminate without error. If errors occur during com [...]
"option": { "index": 9, "kind": "element", "displayName": "Option", "group": "advanced", "label": "advanced", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.PropertyExpressionDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Allows to save properties of the current exchange in order to re-use them in a compensation\/completion callback route. Options are usually helpful e.g. to store and retrieve identifier [...]
- "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "ma [...]
+ "outputs": { "index": 10, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "lo [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json
index d3c031ece25..05e37bfcf41 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json
@@ -29,7 +29,7 @@
"executorService": { "index": 14, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatically implied, and you do not have to enable that option as well." },
"onPrepare": { "index": 15, "kind": "attribute", "displayName": "On Prepare", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.Processor", "deprecated": false, "autowired": false, "secret": false, "description": "Uses the Processor when preparing the org.apache.camel.Exchange to be sent. This can be used to deep-clone messages that should be sent, or any custom logic needed before the exchange is sent." },
"shareUnitOfWork": { "index": 16, "kind": "attribute", "displayName": "Share Unit Of Work", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Splitter will by default not share unit of work between the parent exchange and each split exchan [...]
- "outputs": { "index": 17, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercep [...]
+ "outputs": { "index": 17, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercep [...]
},
"exchangeProperties": {
"CamelSplitIndex": { "index": 0, "kind": "exchangeProperty", "displayName": "Split Index", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "description": "A split counter that increases for each Exchange being split. The counter starts from 0." },
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/step.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/step.json
index 00d3b27db0b..59f5b8a92e3 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/step.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/step.json
@@ -15,7 +15,7 @@
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
- "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "mar [...]
+ "outputs": { "index": 3, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "langChain4j", "loadBalance", "log [...]
},
"exchangeProperties": {
"CamelStepId": { "index": 0, "kind": "exchangeProperty", "displayName": "Step Id", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of the Step EIP" }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/tokenizer/langChain4j.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/tokenizer/langChain4j.json
new file mode 100644
index 00000000000..78eea7f2432
--- /dev/null
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/tokenizer/langChain4j.json
@@ -0,0 +1,23 @@
+{
+ "model": {
+ "kind": "model",
+ "name": "langChain4j",
+ "title": "LangChain4J Tokenizer",
+ "description": "Represents a tokenizer that uses LangChain4j for tokenization",
+ "deprecated": false,
+ "firstVersion": "4.8.0",
+ "label": "tokenizer,transformation,ai",
+ "javaType": "org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition",
+ "abstract": false,
+ "input": true,
+ "output": false
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
+ "description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
+ "disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
+ "maxTokens": { "index": 3, "kind": "attribute", "displayName": "Max Tokens", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1024", "description": "Sets the maximum number of tokens on each segment" },
+ "maxOverlap": { "index": 4, "kind": "attribute", "displayName": "Max Overlap", "group": "common", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Sets the maximum number of tokens that can overlap in each segment" },
+ "tokenizerType": { "index": 5, "kind": "attribute", "displayName": "Tokenizer Type", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.tokenizer.TokenizerType", "enum": [ "OPEN_AI", "AZURE", "QWEN" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "OPEN_AI", "description": "Sets the tokenizer type" }
+ }
+}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json
index 65811f1e3ee..ef003985109 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/whenSkipSendToEndpoint.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/whenSkipSendToEndpoint.json
index 5783a281070..1de8dc65a51 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/whenSkipSendToEndpoint.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/whenSkipSendToEndpoint.json
@@ -16,6 +16,6 @@
"description": { "index": 1, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" },
"disabled": { "index": 2, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
"expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "depre [...]
- "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
+ "outputs": { "index": 4, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List<org.apache.camel.model.ProcessorDefinition<java.lang.Object>>", "oneOf": [ "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "intercept [...]
}
}
diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
index 062cb6455b5..73054ac5bb8 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
+++ b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
@@ -84,6 +84,7 @@ jsonpath
jtaTransactionErrorHandler
kamelet
kubernetesServiceDiscovery
+langChain4j
language
loadBalance
loadBalancerConfiguration
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/tokenizer/jaxb.index b/core/camel-core-model/src/generated/resources/org/apache/camel/model/tokenizer/jaxb.index
new file mode 100644
index 00000000000..76266b4088e
--- /dev/null
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/tokenizer/jaxb.index
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+LangChain4jTokenizerDefinition
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java
index 396017ecab1..95e2d385af8 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/RouteBuilder.java
@@ -769,6 +769,27 @@ public abstract class RouteBuilder extends BuilderSupport implements RoutesBuild
lifecycleInterceptors.remove(interceptor);
}
+ /**
+ * A utility method allowing to build any tokenizer using a fluent syntax as shown in the next example:
+ *
+ * <pre>
+ * {@code
+ * from("jms:queue:orders")
+ * .tokenize(
+ * tokenizer()
+ * .byParagraph()
+ * .maxTokens(1024)
+ * .end())
+ * .to("qdrant:db");
+ * }
+ * </pre>
+ *
+ * @return an entry point to the builder of all supported tokenizers.
+ */
+ public TokenizerBuilderFactory tokenizer() {
+ return new TokenizerBuilderFactory();
+ }
+
// Implementation methods
// -----------------------------------------------------------------------
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/TokenizerBuilder.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/TokenizerBuilder.java
new file mode 100644
index 00000000000..6b96b2390c1
--- /dev/null
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/TokenizerBuilder.java
@@ -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.
+ */
+
+package org.apache.camel.builder;
+
+import org.apache.camel.model.TokenizerDefinition;
+
+/**
+ * {@code TokenizerBuilder} defines the contract of tokenizer builder.
+ */
+public interface TokenizerBuilder<T extends TokenizerDefinition> {
+
+ /**
+ * Ends the build of the tokenizer
+ *
+ * @return the tokenizer fully built.
+ */
+ T end();
+}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/TokenizerBuilderFactory.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/TokenizerBuilderFactory.java
new file mode 100644
index 00000000000..099422cb7ab
--- /dev/null
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/TokenizerBuilderFactory.java
@@ -0,0 +1,61 @@
+/*
+ * 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;
+
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+
+/**
+ * {@code TokenizerBuilderFactory} is a factory class of builder of all supported tokenizers.
+ */
+public class TokenizerBuilderFactory {
+
+ /**
+ * Creates a new tokenizer builder for a tokenizer that splits texts in segments separated by paragraphs
+ */
+ public LangChain4jTokenizerDefinition.ParagraphBuilder byParagraph() {
+ return new LangChain4jTokenizerDefinition.ParagraphBuilder();
+ }
+
+ /**
+ * Creates a new tokenizer builder for a tokenizer that splits texts in segments separated by line
+ */
+ public LangChain4jTokenizerDefinition.LineBuilder byLine() {
+ return new LangChain4jTokenizerDefinition.LineBuilder();
+ }
+
+ /**
+ * Creates a new tokenizer builder for a tokenizer that splits texts in segments separated by word
+ */
+ public LangChain4jTokenizerDefinition.WordBuilder byWord() {
+ return new LangChain4jTokenizerDefinition.WordBuilder();
+ }
+
+ /**
+ * Creates a new tokenizer builder for a tokenizer that splits texts in segments separated by sentence
+ */
+ public LangChain4jTokenizerDefinition.SentenceBuilder bySentence() {
+ return new LangChain4jTokenizerDefinition.SentenceBuilder();
+ }
+
+ /**
+ * Creates a new tokenizer builder for a tokenizer that splits texts in segments separated by character
+ */
+ public LangChain4jTokenizerDefinition.CharacterBuilder byCharacter() {
+ return new LangChain4jTokenizerDefinition.CharacterBuilder();
+ }
+}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
index 06642061e2a..d0bf710f423 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
@@ -4126,6 +4126,18 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
return asType();
}
+ /**
+ * This enables tokenization/chunking of blocks of text so that the elements of a message are separated in text
+ * segments as a composite message
+ *
+ * @param tokenizerDefinition The tokenizer
+ * @return the builder
+ */
+ public Type tokenize(TokenizerDefinition tokenizerDefinition) {
+ addOutput(tokenizerDefinition);
+ return asType();
+ }
+
// Properties
// -------------------------------------------------------------------------
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/TokenizerDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/TokenizerDefinition.java
new file mode 100644
index 00000000000..56721a66ea5
--- /dev/null
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/TokenizerDefinition.java
@@ -0,0 +1,79 @@
+/*
+ * 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.model;
+
+import jakarta.xml.bind.annotation.XmlTransient;
+
+import org.apache.camel.spi.Tokenizer;
+
+/**
+ * Represents a Camel tokenizer
+ */
+public abstract class TokenizerDefinition extends NoOutputDefinition<TokenizerDefinition> {
+ @XmlTransient
+ private String tokenizerName;
+
+ @XmlTransient
+ private Tokenizer.Configuration configuration;
+
+ public TokenizerDefinition() {
+ }
+
+ protected TokenizerDefinition(TokenizerDefinition source) {
+ this.tokenizerName = source.tokenizerName;
+ this.configuration = source.configuration;
+ }
+
+ /**
+ * Gets the tokenizer name
+ */
+ public String tokenizerName() {
+ return tokenizerName;
+ }
+
+ /**
+ * Sets the tokenizer name
+ */
+ public void setTokenizerName(String tokenizerName) {
+ this.tokenizerName = tokenizerName;
+ }
+
+ /**
+ * Gets the tokenizer configuration
+ */
+ public Tokenizer.Configuration configuration() {
+ return configuration;
+ }
+
+ /**
+ * Sets the tokenizer configuration
+ */
+ public void setConfiguration(Tokenizer.Configuration configuration) {
+ this.configuration = configuration;
+ }
+
+ @Override
+ public String getShortName() {
+ return "tokenizer";
+ }
+
+ @Override
+ public String getLabel() {
+ return "tokenizer";
+ }
+}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/tokenizer/LangChain4jTokenizerDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/tokenizer/LangChain4jTokenizerDefinition.java
new file mode 100644
index 00000000000..cd7805bc0d1
--- /dev/null
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/tokenizer/LangChain4jTokenizerDefinition.java
@@ -0,0 +1,217 @@
+/*
+ * 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.model.tokenizer;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlTransient;
+
+import org.apache.camel.builder.TokenizerBuilder;
+import org.apache.camel.model.TokenizerDefinition;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.Tokenizer;
+
+/**
+ * Represents a tokenizer that uses LangChain4j for tokenization
+ */
+@Metadata(firstVersion = "4.8.0", label = "tokenizer,transformation,ai", title = "LangChain4J Tokenizer")
+@XmlRootElement(name = "langChain4j")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class LangChain4jTokenizerDefinition extends TokenizerDefinition {
+
+ @XmlAttribute(required = true)
+ @Metadata(javaType = "java.lang.Integer", defaultValue = "1024")
+ private String maxTokens;
+
+ @XmlAttribute(required = true)
+ @Metadata(javaType = "java.lang.Integer", defaultValue = "0")
+ private String maxOverlap;
+
+ @XmlAttribute(required = true)
+ @Metadata(javaType = "org.apache.camel.model.tokenizer.TokenizerType", defaultValue = "OPEN_AI",
+ enums = "OPEN_AI,AZURE,QWEN")
+ private String tokenizerType;
+
+ public LangChain4jTokenizerDefinition() {
+
+ }
+
+ public LangChain4jTokenizerDefinition(LangChain4jTokenizerDefinition source) {
+ super(source);
+ this.maxTokens = source.maxTokens;
+ this.maxOverlap = source.maxOverlap;
+ this.tokenizerType = source.tokenizerType;
+ }
+
+ /**
+ * The maximum number of tokens on each segment
+ */
+ public String getMaxTokens() {
+ return maxTokens;
+ }
+
+ /**
+ * Sets the maximum number of tokens on each segment
+ */
+ public void setMaxTokens(String maxTokens) {
+ this.maxTokens = maxTokens;
+ }
+
+ /**
+ * Gets the maximum number of tokens that can overlap in each segment
+ */
+ public String getMaxOverlap() {
+ return maxOverlap;
+ }
+
+ /**
+ * Sets the maximum number of tokens that can overlap in each segment
+ */
+ public void setMaxOverlap(String maxOverlap) {
+ this.maxOverlap = maxOverlap;
+ }
+
+ /**
+ * Gets the tokenizer type
+ */
+ public String getTokenizerType() {
+ return tokenizerType;
+ }
+
+ /**
+ * Sets the tokenizer type
+ */
+ public void setTokenizerType(String tokenizerType) {
+ this.tokenizerType = tokenizerType;
+ }
+
+ private static String toName(String name) {
+ return "langchain4j-" + name;
+ }
+
+ @Override
+ public LangChain4jTokenizerDefinition copyDefinition() {
+ return new LangChain4jTokenizerDefinition(this);
+ }
+
+ @XmlTransient
+ public enum TokenizerType {
+ OPEN_AI,
+ AZURE,
+ QWEN
+ }
+
+ @XmlTransient
+ public static abstract class Builder implements TokenizerBuilder<LangChain4jTokenizerDefinition> {
+ private int maxTokens;
+ private int maxOverlap;
+ private TokenizerType tokenizerType;
+ private Tokenizer.Configuration configuration;
+
+ /**
+ * Sets the maximum number of tokens in each segment
+ */
+ public Builder maxTokens(int maxTokens) {
+ this.maxTokens = maxTokens;
+ return this;
+ }
+
+ /**
+ * Sets the maximum number of tokens that can overlap in each segment
+ */
+ public Builder maxOverlap(int maxOverlap) {
+ this.maxOverlap = maxOverlap;
+ return this;
+ }
+
+ /**
+ * Sets the tokenizer type. Must be one of TokenizerType.OPEN_AI (the default), TokenizerType.AZURE or
+ * TokenizerType.QWEN
+ */
+ public Builder using(TokenizerType tokenizer) {
+ this.tokenizerType = tokenizer;
+ return this;
+ }
+
+ public Builder configuration(Tokenizer.Configuration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ @Override
+ public LangChain4jTokenizerDefinition end() {
+ LangChain4jTokenizerDefinition tokenizer = new LangChain4jTokenizerDefinition();
+
+ if (configuration != null) {
+ tokenizer.setConfiguration(configuration);
+ } else {
+ tokenizer.setMaxTokens(Integer.toString(maxTokens));
+ tokenizer.setMaxOverlap(Integer.toString(maxOverlap));
+ tokenizer.setTokenizerType(tokenizerType.name());
+ }
+
+ tokenizer.setTokenizerName(name());
+
+ return tokenizer;
+ }
+
+ protected abstract String name();
+ }
+
+ @XmlTransient
+ public static class ParagraphBuilder extends Builder {
+ @Override
+ protected String name() {
+ return toName("paragraph");
+ }
+ }
+
+ @XmlTransient
+ public static class WordBuilder extends Builder {
+ @Override
+ protected String name() {
+ return toName("word");
+ }
+ }
+
+ @XmlTransient
+ public static class SentenceBuilder extends Builder {
+ @Override
+ protected String name() {
+ return toName("sentence");
+ }
+ }
+
+ @XmlTransient
+ public static class LineBuilder extends Builder {
+ @Override
+ protected String name() {
+ return toName("line");
+ }
+ }
+
+ @XmlTransient
+ public static class CharacterBuilder extends Builder {
+ @Override
+ protected String name() {
+ return toName("character");
+ }
+ }
+}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/tokenizer/package-info.java b/core/camel-core-model/src/main/java/org/apache/camel/model/tokenizer/package-info.java
new file mode 100644
index 00000000000..5a408856b12
--- /dev/null
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/tokenizer/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+/**
+ * The JAXB POJOs for the <a href="http://camel.apache.org/expression.html">Expression</a> and
+ * <a href="http://camel.apache.org/predicate.html">Predicate</a> plugins for the
+ * <a href="http://camel.apache.org/xml-configuration.html">XML Configuration</a>.
+ */
+@jakarta.xml.bind.annotation.XmlSchema(namespace = "http://camel.apache.org/schema/spring",
+ elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.apache.camel.model.tokenizer;
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/TokenizerProcessor.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/TokenizerProcessor.java
new file mode 100644
index 00000000000..35ae91e95d6
--- /dev/null
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/TokenizerProcessor.java
@@ -0,0 +1,108 @@
+/*
+ * 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.processor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.camel.AsyncCallback;
+import org.apache.camel.AsyncProcessor;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.Exchange;
+import org.apache.camel.Navigate;
+import org.apache.camel.Processor;
+import org.apache.camel.spi.IdAware;
+import org.apache.camel.spi.RouteIdAware;
+import org.apache.camel.spi.Tokenizer;
+import org.apache.camel.support.AsyncProcessorConverterHelper;
+import org.apache.camel.support.AsyncProcessorSupport;
+
+/**
+ * This implements the core processor for handling tokenization
+ */
+public class TokenizerProcessor extends AsyncProcessorSupport
+ implements Navigate<Processor>,
+ CamelContextAware, IdAware, RouteIdAware {
+
+ private final AsyncProcessor processor;
+ private final Tokenizer tokenizer;
+
+ private CamelContext camelContext;
+ private String id;
+ private String routeId;
+
+ public TokenizerProcessor(Processor processor, Tokenizer tokenizer) {
+ this.processor = AsyncProcessorConverterHelper.convert(processor);
+ this.tokenizer = tokenizer;
+ }
+
+ @Override
+ public boolean process(Exchange exchange, AsyncCallback callback) {
+ final String[] tokenized = tokenizer.tokenize(exchange);
+
+ exchange.getMessage().setBody(tokenized);
+ return processor.process(exchange, callback);
+
+ }
+
+ @Override
+ public List<Processor> next() {
+ if (!hasNext()) {
+ return null;
+ }
+ List<Processor> answer = new ArrayList<>(1);
+ answer.add(processor);
+ return answer;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return false;
+ }
+
+ @Override
+ public CamelContext getCamelContext() {
+ return camelContext;
+ }
+
+ @Override
+ public void setCamelContext(CamelContext camelContext) {
+ this.camelContext = camelContext;
+ }
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public String getRouteId() {
+ return routeId;
+ }
+
+ @Override
+ public void setRouteId(String routeId) {
+ this.routeId = routeId;
+ }
+}
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index 7849a6d8dc0..dba325b7d75 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -112,10 +112,12 @@ import org.apache.camel.model.WhenDefinition;
import org.apache.camel.model.WhenSkipSendToEndpointDefinition;
import org.apache.camel.model.WireTapDefinition;
import org.apache.camel.model.cloud.ServiceCallDefinition;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
import org.apache.camel.processor.InterceptEndpointProcessor;
import org.apache.camel.processor.Pipeline;
import org.apache.camel.processor.aggregate.AggregationStrategyBeanAdapter;
import org.apache.camel.processor.aggregate.AggregationStrategyBiFunctionAdapter;
+import org.apache.camel.reifier.tokenizer.LangChain4JTokenizerReifier;
import org.apache.camel.spi.ErrorHandlerAware;
import org.apache.camel.spi.ExecutorServiceManager;
import org.apache.camel.spi.IdAware;
@@ -347,6 +349,8 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
return new ResumableReifier(route, definition);
} else if (definition instanceof PausableDefinition) {
return new PausableReifier(route, definition);
+ } else if (definition instanceof LangChain4jTokenizerDefinition) {
+ return new LangChain4JTokenizerReifier(route, definition);
}
return null;
}
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/tokenizer/LangChain4JTokenizerReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/tokenizer/LangChain4JTokenizerReifier.java
new file mode 100644
index 00000000000..7fb788b236a
--- /dev/null
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/tokenizer/LangChain4JTokenizerReifier.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.reifier.tokenizer;
+
+import org.apache.camel.Route;
+import org.apache.camel.model.ProcessorDefinition;
+import org.apache.camel.model.TokenizerDefinition;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
+import org.apache.camel.spi.Tokenizer;
+
+public class LangChain4JTokenizerReifier extends TokenizerReifier<LangChain4jTokenizerDefinition> {
+ public LangChain4JTokenizerReifier(Route route, ProcessorDefinition definition) {
+ this(route, (LangChain4jTokenizerDefinition) definition);
+ }
+
+ public LangChain4JTokenizerReifier(Route route, TokenizerDefinition definition) {
+ super(route, (LangChain4jTokenizerDefinition) definition);
+ }
+
+ @Override
+ protected void configure(Tokenizer tokenizer) {
+ Tokenizer.Configuration configuration = definition.configuration();
+ if (configuration == null) {
+ configuration = tokenizer.newConfiguration();
+
+ configuration.setMaxOverlap(Integer.valueOf(definition.getMaxOverlap()));
+ configuration.setMaxTokens(Integer.valueOf(definition.getMaxTokens()));
+ configuration.setType(definition.getTokenizerType());
+ }
+
+ tokenizer.configure(configuration);
+ }
+}
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/tokenizer/TokenizerReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/tokenizer/TokenizerReifier.java
new file mode 100644
index 00000000000..ab5da3b4851
--- /dev/null
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/tokenizer/TokenizerReifier.java
@@ -0,0 +1,63 @@
+/*
+ * 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.reifier.tokenizer;
+
+import java.util.Optional;
+
+import org.apache.camel.Processor;
+import org.apache.camel.Route;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.model.TokenizerDefinition;
+import org.apache.camel.processor.TokenizerProcessor;
+import org.apache.camel.reifier.ProcessorReifier;
+import org.apache.camel.spi.FactoryFinder;
+import org.apache.camel.spi.Tokenizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public abstract class TokenizerReifier<T extends TokenizerDefinition> extends ProcessorReifier<T> {
+ private static final Logger LOG = LoggerFactory.getLogger(TokenizerReifier.class);
+ private static final String TOKENIZER_PATH = FactoryFinder.DEFAULT_PATH + "tokenizer/";
+
+ public TokenizerReifier(Route route, T definition) {
+ super(route, definition);
+ }
+
+ public Processor createProcessor() throws Exception {
+ Processor childProcessor = createChildProcessor(false);
+
+ final FactoryFinder factoryFinder
+ = camelContext.getCamelContextExtension().getFactoryFinder(TOKENIZER_PATH);
+
+ final Optional<Tokenizer> tokenize = factoryFinder.newInstance(
+ definition.tokenizerName(), Tokenizer.class);
+
+ if (tokenize.isEmpty()) {
+ throw new RuntimeCamelException(
+ "Cannot find a tokenizer named: " + definition.tokenizerName() + " in the classpath");
+ }
+
+ final Tokenizer tokenizer = tokenize.get();
+ LOG.info("Creating a tokenizer of type {}", tokenizer.getClass().getName());
+ configure(tokenizer);
+
+ return new TokenizerProcessor(childProcessor, tokenizer);
+ }
+
+ protected abstract void configure(Tokenizer tokenizer);
+}
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 938d2bee8cf..1a17e08f649 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -41,6 +41,7 @@ import org.apache.camel.model.errorhandler.*;
import org.apache.camel.model.language.*;
import org.apache.camel.model.loadbalancer.*;
import org.apache.camel.model.rest.*;
+import org.apache.camel.model.tokenizer.*;
import org.apache.camel.model.transformer.*;
import org.apache.camel.model.validator.*;
import org.apache.camel.spi.*;
@@ -2612,6 +2613,14 @@ public class ModelParser extends BaseParser {
}
return Optional.empty();
}
+ protected LangChain4jTokenizerDefinition doParseLangChain4jTokenizerDefinition() throws IOException, XmlPullParserException {
+ return doParse(new LangChain4jTokenizerDefinition(), (def, key, val) -> switch (key) {
+ case "maxOverlap": def.setMaxOverlap(val); yield true;
+ case "maxTokens": def.setMaxTokens(val); yield true;
+ case "tokenizerType": def.setTokenizerType(val); yield true;
+ default: yield processorDefinitionAttributeHandler().accept(def, key, val);
+ }, optionalIdentifiedDefinitionElementHandler(), noValueHandler());
+ }
protected CustomTransformerDefinition doParseCustomTransformerDefinition() throws IOException, XmlPullParserException {
return doParse(new CustomTransformerDefinition(), (def, key, val) -> switch (key) {
case "className": def.setClassName(val); yield true;
@@ -2772,6 +2781,7 @@ public class ModelParser extends BaseParser {
case "validate": return doParseValidateDefinition();
case "wireTap": return doParseWireTapDefinition();
case "serviceCall": return doParseServiceCallDefinition();
+ case "langChain4j": return doParseLangChain4jTokenizerDefinition();
default: return null;
}
}
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index 3639f664e94..17e9984d094 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -37,6 +37,7 @@ import org.apache.camel.model.errorhandler.*;
import org.apache.camel.model.language.*;
import org.apache.camel.model.loadbalancer.*;
import org.apache.camel.model.rest.*;
+import org.apache.camel.model.tokenizer.*;
import org.apache.camel.model.transformer.*;
import org.apache.camel.model.validator.*;
@@ -750,6 +751,9 @@ public class ModelWriter extends BaseWriter {
public void writeSecurityDefinition(SecurityDefinition def) throws IOException {
doWriteSecurityDefinition("security", def);
}
+ public void writeLangChain4jTokenizerDefinition(LangChain4jTokenizerDefinition def) throws IOException {
+ doWriteLangChain4jTokenizerDefinition("langChain4j", def);
+ }
public void writeTransformersDefinition(TransformersDefinition def) throws IOException {
doWriteTransformersDefinition("transformers", def);
}
@@ -3454,6 +3458,14 @@ public class ModelWriter extends BaseWriter {
doWriteVerbDefinitionElements(def);
endElement(name);
}
+ protected void doWriteLangChain4jTokenizerDefinition(String name, LangChain4jTokenizerDefinition def) throws IOException {
+ startElement(name);
+ doWriteProcessorDefinitionAttributes(def);
+ doWriteAttribute("tokenizerType", def.getTokenizerType());
+ doWriteAttribute("maxTokens", def.getMaxTokens());
+ doWriteAttribute("maxOverlap", def.getMaxOverlap());
+ endElement(name);
+ }
protected void doWriteCustomTransformerDefinition(String name, CustomTransformerDefinition def) throws IOException {
startElement(name);
doWriteTransformerDefinitionAttributes(def);
@@ -3696,6 +3708,7 @@ public class ModelWriter extends BaseWriter {
case "RestBindingDefinition" -> doWriteRestBindingDefinition("restBinding", (RestBindingDefinition) v);
case "RestDefinition" -> doWriteRestDefinition("rest", (RestDefinition) v);
case "RestsDefinition" -> doWriteRestsDefinition("rests", (RestsDefinition) v);
+ case "LangChain4jTokenizerDefinition" -> doWriteLangChain4jTokenizerDefinition("langChain4j", (LangChain4jTokenizerDefinition) v);
}
}
}
@@ -3780,6 +3793,7 @@ public class ModelWriter extends BaseWriter {
case "WhenDefinition" -> doWriteWhenDefinition("when", (WhenDefinition) v);
case "WireTapDefinition" -> doWriteWireTapDefinition("wireTap", (WireTapDefinition) v);
case "ServiceCallDefinition" -> doWriteServiceCallDefinition("serviceCall", (ServiceCallDefinition) v);
+ case "LangChain4jTokenizerDefinition" -> doWriteLangChain4jTokenizerDefinition("langChain4j", (LangChain4jTokenizerDefinition) v);
}
}
}
diff --git a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index 3f51a062f32..a4a468593a2 100644
--- a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++ b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -37,6 +37,7 @@ import org.apache.camel.model.errorhandler.*;
import org.apache.camel.model.language.*;
import org.apache.camel.model.loadbalancer.*;
import org.apache.camel.model.rest.*;
+import org.apache.camel.model.tokenizer.*;
import org.apache.camel.model.transformer.*;
import org.apache.camel.model.validator.*;
@@ -750,6 +751,9 @@ public class ModelWriter extends BaseWriter {
public void writeSecurityDefinition(SecurityDefinition def) throws IOException {
doWriteSecurityDefinition("security", def);
}
+ public void writeLangChain4jTokenizerDefinition(LangChain4jTokenizerDefinition def) throws IOException {
+ doWriteLangChain4jTokenizerDefinition("langChain4j", def);
+ }
public void writeTransformersDefinition(TransformersDefinition def) throws IOException {
doWriteTransformersDefinition("transformers", def);
}
@@ -3454,6 +3458,14 @@ public class ModelWriter extends BaseWriter {
doWriteVerbDefinitionElements(def);
endElement(name);
}
+ protected void doWriteLangChain4jTokenizerDefinition(String name, LangChain4jTokenizerDefinition def) throws IOException {
+ startElement(name);
+ doWriteProcessorDefinitionAttributes(def);
+ doWriteAttribute("tokenizerType", def.getTokenizerType());
+ doWriteAttribute("maxTokens", def.getMaxTokens());
+ doWriteAttribute("maxOverlap", def.getMaxOverlap());
+ endElement(name);
+ }
protected void doWriteCustomTransformerDefinition(String name, CustomTransformerDefinition def) throws IOException {
startElement(name);
doWriteTransformerDefinitionAttributes(def);
@@ -3696,6 +3708,7 @@ public class ModelWriter extends BaseWriter {
case "RestBindingDefinition" -> doWriteRestBindingDefinition("restBinding", (RestBindingDefinition) v);
case "RestDefinition" -> doWriteRestDefinition("rest", (RestDefinition) v);
case "RestsDefinition" -> doWriteRestsDefinition("rests", (RestsDefinition) v);
+ case "LangChain4jTokenizerDefinition" -> doWriteLangChain4jTokenizerDefinition("langChain4j", (LangChain4jTokenizerDefinition) v);
}
}
}
@@ -3780,6 +3793,7 @@ public class ModelWriter extends BaseWriter {
case "WhenDefinition" -> doWriteWhenDefinition("when", (WhenDefinition) v);
case "WireTapDefinition" -> doWriteWireTapDefinition("wireTap", (WireTapDefinition) v);
case "ServiceCallDefinition" -> doWriteServiceCallDefinition("serviceCall", (ServiceCallDefinition) v);
+ case "LangChain4jTokenizerDefinition" -> doWriteLangChain4jTokenizerDefinition("langChain4j", (LangChain4jTokenizerDefinition) v);
}
}
}
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index bf22beea493..b4995bda998 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -9,6 +9,7 @@
*** xref:djl-component.adoc[Deep Java Library]
*** xref:langchain4j-chat-component.adoc[LangChain4j Chat]
*** xref:langchain4j-embeddings-component.adoc[LangChain4j Embeddings]
+*** xref:langchain4j-tokenizer-component.adoc[LangChain4j Tokenizer]
*** xref:langchain4j-web-search-component.adoc[LangChain4j Web Search]
*** xref:milvus-component.adoc[Milvus]
*** xref:pinecone-component.adoc[Pinecone]
diff --git a/docs/components/modules/ROOT/pages/langchain4j-tokenizer-component.adoc b/docs/components/modules/ROOT/pages/langchain4j-tokenizer-component.adoc
new file mode 120000
index 00000000000..e82454f5ad5
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/langchain4j-tokenizer-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-ai/camel-langchain4j-tokenizer/src/main/docs/langchain4j-tokenizer-component.adoc
\ No newline at end of file
diff --git a/docs/components/modules/others/examples/json/langchain4j-tokenizer.json b/docs/components/modules/others/examples/json/langchain4j-tokenizer.json
new file mode 120000
index 00000000000..0549d308196
--- /dev/null
+++ b/docs/components/modules/others/examples/json/langchain4j-tokenizer.json
@@ -0,0 +1 @@
+../../../../../../components/camel-ai/camel-langchain4j-tokenizer/src/generated/resources/langchain4j-tokenizer.json
\ No newline at end of file
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 27c7ce2a92f..780f8a7646d 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -239,6 +239,7 @@ import org.apache.camel.model.rest.RestPropertyDefinition;
import org.apache.camel.model.rest.RestSecuritiesDefinition;
import org.apache.camel.model.rest.RestsDefinition;
import org.apache.camel.model.rest.SecurityDefinition;
+import org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition;
import org.apache.camel.model.transformer.CustomTransformerDefinition;
import org.apache.camel.model.transformer.DataFormatTransformerDefinition;
import org.apache.camel.model.transformer.EndpointTransformerDefinition;
@@ -8810,6 +8811,84 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
}
}
+ @YamlType(
+ nodes = {
+ "lang-chain4j",
+ "langChain4j"
+ },
+ types = org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition.class,
+ order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
+ displayName = "LangChain4J Tokenizer",
+ description = "Represents a tokenizer that uses LangChain4j for tokenization",
+ deprecated = false,
+ properties = {
+ @YamlProperty(name = "description", type = "string", description = "Sets the description of this node", displayName = "Description"),
+ @YamlProperty(name = "disabled", type = "boolean", description = "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime.", displayName = "Disabled"),
+ @YamlProperty(name = "id", type = "string", description = "Sets the id of this node", displayName = "Id"),
+ @YamlProperty(name = "inheritErrorHandler", type = "boolean"),
+ @YamlProperty(name = "maxOverlap", type = "number", required = true, defaultValue = "0", description = "Sets the maximum number of tokens that can overlap in each segment", displayName = "Max Overlap"),
+ @YamlProperty(name = "maxTokens", type = "number", required = true, defaultValue = "1024", description = "Sets the maximum number of tokens on each segment", displayName = "Max Tokens"),
+ @YamlProperty(name = "tokenizerType", type = "enum:OPEN_AI,AZURE,QWEN", defaultValue = "OPEN_AI", description = "Sets the tokenizer type", displayName = "Tokenizer Type")
+ }
+ )
+ public static class LangChain4jTokenizerDefinitionDeserializer extends YamlDeserializerBase<LangChain4jTokenizerDefinition> {
+ public LangChain4jTokenizerDefinitionDeserializer() {
+ super(LangChain4jTokenizerDefinition.class);
+ }
+
+ @Override
+ protected LangChain4jTokenizerDefinition newInstance() {
+ return new LangChain4jTokenizerDefinition();
+ }
+
+ @Override
+ protected boolean setProperty(LangChain4jTokenizerDefinition target, String propertyKey,
+ String propertyName, Node node) {
+ propertyKey = org.apache.camel.util.StringHelper.dashToCamelCase(propertyKey);
+ switch(propertyKey) {
+ case "disabled": {
+ String val = asText(node);
+ target.setDisabled(val);
+ break;
+ }
+ case "inheritErrorHandler": {
+ String val = asText(node);
+ target.setInheritErrorHandler(java.lang.Boolean.valueOf(val));
+ break;
+ }
+ case "maxOverlap": {
+ String val = asText(node);
+ target.setMaxOverlap(val);
+ break;
+ }
+ case "maxTokens": {
+ String val = asText(node);
+ target.setMaxTokens(val);
+ break;
+ }
+ case "tokenizerType": {
+ String val = asText(node);
+ target.setTokenizerType(val);
+ break;
+ }
+ case "id": {
+ String val = asText(node);
+ target.setId(val);
+ break;
+ }
+ case "description": {
+ String val = asText(node);
+ target.setDescription(val);
+ break;
+ }
+ default: {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
@YamlType(
nodes = "language",
types = org.apache.camel.model.language.LanguageExpression.class,
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
index c67370ff886..0b17472d7fb 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
@@ -234,6 +234,9 @@ public final class ModelDeserializersResolver implements YamlDeserializerResolve
case "org.apache.camel.model.cloud.KubernetesServiceCallServiceDiscoveryConfiguration": return new ModelDeserializers.KubernetesServiceCallServiceDiscoveryConfigurationDeserializer();
case "lzf": return new ModelDeserializers.LZFDataFormatDeserializer();
case "org.apache.camel.model.dataformat.LZFDataFormat": return new ModelDeserializers.LZFDataFormatDeserializer();
+ case "lang-chain4j": return new ModelDeserializers.LangChain4jTokenizerDefinitionDeserializer();
+ case "langChain4j": return new ModelDeserializers.LangChain4jTokenizerDefinitionDeserializer();
+ case "org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition": return new ModelDeserializers.LangChain4jTokenizerDefinitionDeserializer();
case "language": return new ModelDeserializers.LanguageExpressionDeserializer();
case "org.apache.camel.model.language.LanguageExpression": return new ModelDeserializers.LanguageExpressionDeserializer();
case "load-balance": return new ModelDeserializers.LoadBalanceDefinitionDeserializer();
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index 03dde1cc3f7..376288bf7f8 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -207,6 +207,9 @@
},
"serviceCall" : {
"$ref" : "#/items/definitions/org.apache.camel.model.cloud.ServiceCallDefinition"
+ },
+ "langChain4j" : {
+ "$ref" : "#/items/definitions/org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition"
}
}
},
@@ -15693,6 +15696,49 @@
},
"required" : [ "key" ]
},
+ "org.apache.camel.model.tokenizer.LangChain4jTokenizerDefinition" : {
+ "title" : "LangChain4J Tokenizer",
+ "description" : "Represents a tokenizer that uses LangChain4j for tokenization",
+ "type" : "object",
+ "additionalProperties" : false,
+ "properties" : {
+ "description" : {
+ "type" : "string",
+ "title" : "Description",
+ "description" : "Sets the description of this node"
+ },
+ "disabled" : {
+ "type" : "boolean",
+ "title" : "Disabled",
+ "description" : "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime."
+ },
+ "id" : {
+ "type" : "string",
+ "title" : "Id",
+ "description" : "Sets the id of this node"
+ },
+ "maxOverlap" : {
+ "type" : "number",
+ "title" : "Max Overlap",
+ "description" : "Sets the maximum number of tokens that can overlap in each segment",
+ "default" : "0"
+ },
+ "maxTokens" : {
+ "type" : "number",
+ "title" : "Max Tokens",
+ "description" : "Sets the maximum number of tokens on each segment",
+ "default" : "1024"
+ },
+ "tokenizerType" : {
+ "type" : "string",
+ "title" : "Tokenizer Type",
+ "description" : "Sets the tokenizer type",
+ "default" : "OPEN_AI",
+ "enum" : [ "OPEN_AI", "AZURE", "QWEN" ]
+ }
+ },
+ "required" : [ "maxOverlap", "maxTokens" ]
+ },
"org.apache.camel.model.transformer.CustomTransformerDefinition" : {
"type" : "object",
"additionalProperties" : false,
diff --git a/parent/pom.xml b/parent/pom.xml
index dbaa9a96fde..491e7aa7c8d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1743,6 +1743,11 @@
<artifactId>camel-langchain4j-embeddings</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-langchain4j-tokenizer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-langchain4j-web-search</artifactId>
diff --git a/tooling/spi-annotations/src/main/java/org/apache/camel/spi/annotations/Tokenizer.java b/tooling/spi-annotations/src/main/java/org/apache/camel/spi/annotations/Tokenizer.java
new file mode 100644
index 00000000000..d75bfc41b73
--- /dev/null
+++ b/tooling/spi-annotations/src/main/java/org/apache/camel/spi/annotations/Tokenizer.java
@@ -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.
+ */
+package org.apache.camel.spi.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Target({ ElementType.TYPE })
+@ServiceFactory("tokenizer")
+public @interface Tokenizer {
+
+ String value();
+
+}