This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 4064cbfc22f [create-pull-request] automated change (#1989)
4064cbfc22f is described below
commit 4064cbfc22f649b80ec0adb10c7c287771834f1b
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Sep 20 08:40:55 2026 +0200
[create-pull-request] automated change (#1989)
Co-authored-by: oscerd <[email protected]>
---
.../catalog/components/langchain4j-agent.json | 20 +++-
.../catalog/components/langchain4j-chat.json | 20 +++-
.../catalog/components/langchain4j-embeddings.json | 24 +++-
.../src/main/docs/langchain4j-agent.json | 48 ++++++++
.../LangChain4jAgentComponentConfiguration.java | 116 ++++++++++++++++++++
.../src/main/docs/langchain4j-chat.json | 48 ++++++++
.../LangChain4jChatComponentConfiguration.java | 117 ++++++++++++++++++++
.../src/main/docs/langchain4j-embeddings.json | 50 ++++++++-
...angChain4jEmbeddingsComponentConfiguration.java | 121 ++++++++++++++++++++-
.../ROOT/pages/starters/langchain4j-agent.adoc | 10 +-
.../ROOT/pages/starters/langchain4j-chat.adoc | 10 +-
.../pages/starters/langchain4j-embeddings.adoc | 12 +-
12 files changed, 581 insertions(+), 15 deletions(-)
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
index a6e92f73d9c..1cfc2c0837e 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-agent.json
@@ -37,7 +37,15 @@
"tags": { "index": 10, "kind": "property", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"autowiredEnabled": { "index": 11, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching [...]
"mcpClients": { "index": 12, "kind": "property", "displayName": "Mcp
Clients", "group": "advanced", "label": "advanced", "required": false, "type":
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Pre-built MCP (Model
Context Protocol) client inst [...]
- "mcpServer": { "index": 13, "kind": "property", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP server [...]
+ "mcpServer": { "index": 13, "kind": "property", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP server [...]
+ "baseUrl": { "index": 14, "kind": "property", "displayName": "Base Url",
"group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The URL of the
provider's API (http:\/\/localhost:11434 for a local Ollama), when the model is
cr [...]
+ "modelName": { "index": 15, "kind": "property", "displayName": "Model
Name", "group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The name of the model at
the provider (qwen2.5, gpt-4o-mini, ...), when the model is created [...]
+ "provider": { "index": 16, "kind": "property", "displayName": "Provider",
"group": "model", "label": "model", "required": false, "type": "enum",
"javaType": "java.lang.String", "enum": [ "ollama", "openai", "anthropic",
"azure-openai", "mistral", "gemini", "vertex-ai", "github", "hugging-face",
"bedrock" ], "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": [...]
+ "temperature": { "index": 17, "kind": "property", "displayName":
"Temperature", "group": "model", "label": "model", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The sampling temperature
of the model, when the model is created from the provider." },
+ "timeout": { "index": 18, "kind": "property", "displayName": "Timeout",
"group": "model", "label": "model", "required": false, "type": "duration",
"javaType": "java.time.Duration", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The request timeout of
the model (30s, 2m), when the model is created from the provider." },
+ "customProvider": { "index": 19, "kind": "property", "displayName":
"Custom Provider", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The fully qualified
class name of the LangChain4j model class o [...]
+ "modelProperties": { "index": 20, "kind": "property", "displayName":
"Model Properties", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "model.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "des [...]
+ "apiKey": { "index": 21, "kind": "property", "displayName": "Api Key",
"group": "security", "label": "model,security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The API key or access
token of the provider, when the model is cre [...]
},
"headers": {
"CamelLangChain4jAgentSystemMessage": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The system prompt.", "constantName":
"org.apache.camel.component.langchain4j.agent.api.Headers#SYSTEM_MESSAGE" },
@@ -69,6 +77,14 @@
"tags": { "index": 9, "kind": "parameter", "displayName": "Tags", "group":
"producer", "label": "", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Tags for discovering and
calling Camel route tools" },
"lazyStartProducer": { "index": 10, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produ [...]
"mcpClients": { "index": 11, "kind": "parameter", "displayName": "Mcp
Clients", "group": "advanced", "label": "advanced", "required": false, "type":
"array", "javaType": "java.util.List<dev.langchain4j.mcp.client.McpClient>",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "Pre-built MCP (Model
Context Protocol) client ins [...]
- "mcpServer": { "index": 12, "kind": "parameter", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP serve [...]
+ "mcpServer": { "index": 12, "kind": "parameter", "displayName": "Mcp
Server", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "mcpServer.", "multiValue": true, "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "MCP serve [...]
+ "baseUrl": { "index": 13, "kind": "parameter", "displayName": "Base Url",
"group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The URL of the
provider's API (http:\/\/localhost:11434 for a local Ollama), when the model is
c [...]
+ "modelName": { "index": 14, "kind": "parameter", "displayName": "Model
Name", "group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The name of the model at
the provider (qwen2.5, gpt-4o-mini, ...), when the model is created [...]
+ "provider": { "index": 15, "kind": "parameter", "displayName": "Provider",
"group": "model", "label": "model", "required": false, "type": "enum",
"javaType": "java.lang.String", "enum": [ "ollama", "openai", "anthropic",
"azure-openai", "mistral", "gemini", "vertex-ai", "github", "hugging-face",
"bedrock" ], "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField" [...]
+ "temperature": { "index": 16, "kind": "parameter", "displayName":
"Temperature", "group": "model", "label": "model", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The sampling temperature
of the model, when the model is created from the provider." },
+ "timeout": { "index": 17, "kind": "parameter", "displayName": "Timeout",
"group": "model", "label": "model", "required": false, "type": "duration",
"javaType": "java.time.Duration", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The request timeout of
the model (30s, 2m), when the model is created from the provider." },
+ "customProvider": { "index": 18, "kind": "parameter", "displayName":
"Custom Provider", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The fully qualified
class name of the LangChain4j model class [...]
+ "modelProperties": { "index": 19, "kind": "parameter", "displayName":
"Model Properties", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "model.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "de [...]
+ "apiKey": { "index": 20, "kind": "parameter", "displayName": "Api Key",
"group": "security", "label": "model,security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration",
"configurationField": "configuration", "description": "The API key or access
token of the provider, when the model is cr [...]
}
}
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-chat.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-chat.json
index ee31a56e0ed..4988c095c46 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-chat.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-chat.json
@@ -28,7 +28,15 @@
"configuration": { "index": 1, "kind": "property", "displayName":
"Configuration", "group": "producer", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"deprecated": false, "autowired": false, "secret": false, "description": "The
configuration." },
"lazyStartProducer": { "index": 2, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
"autowiredEnabled": { "index": 3, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
- "chatModel": { "index": 4, "kind": "property", "displayName": "Chat
Model", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.chat.ChatModel", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "Chat Model of type
dev.langchain4j.model.chat.Ch [...]
+ "chatModel": { "index": 4, "kind": "property", "displayName": "Chat
Model", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.chat.ChatModel", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "Chat Model of type
dev.langchain4j.model.chat.Ch [...]
+ "baseUrl": { "index": 5, "kind": "property", "displayName": "Base Url",
"group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The URL of the
provider's API (http:\/\/localhost:11434 for a local Ollama), when the model is
creat [...]
+ "modelName": { "index": 6, "kind": "property", "displayName": "Model
Name", "group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The name of the model at
the provider (qwen2.5, gpt-4o-mini, ...), when the model is created fro [...]
+ "provider": { "index": 7, "kind": "property", "displayName": "Provider",
"group": "model", "label": "model", "required": false, "type": "enum",
"javaType": "java.lang.String", "enum": [ "ollama", "openai", "anthropic",
"azure-openai", "mistral", "gemini", "vertex-ai", "github", "hugging-face",
"bedrock" ], "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "c [...]
+ "temperature": { "index": 8, "kind": "property", "displayName":
"Temperature", "group": "model", "label": "model", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The sampling temperature
of the model, when the model is created from the provider." },
+ "timeout": { "index": 9, "kind": "property", "displayName": "Timeout",
"group": "model", "label": "model", "required": false, "type": "duration",
"javaType": "java.time.Duration", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The request timeout of
the model (30s, 2m), when the model is created from the provider." },
+ "customProvider": { "index": 10, "kind": "property", "displayName":
"Custom Provider", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The fully qualified
class name of the LangChain4j model class of [...]
+ "modelProperties": { "index": 11, "kind": "property", "displayName":
"Model Properties", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "model.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "descr [...]
+ "apiKey": { "index": 12, "kind": "property", "displayName": "Api Key",
"group": "security", "label": "model,security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The API key or access
token of the provider, when the model is creat [...]
},
"headers": {
"CamelLangChain4jChatPromptTemplate": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The prompt Template.", "constantName":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatHeaders#PROMPT_TEMPLATE"
},
@@ -44,6 +52,14 @@
"chatId": { "index": 0, "kind": "path", "displayName": "Chat Id", "group":
"producer", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The id" },
"chatOperation": { "index": 1, "kind": "parameter", "displayName": "Chat
Operation", "group": "producer", "label": "", "required": true, "type": "enum",
"javaType":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatOperations",
"enum": [ "CHAT_SINGLE_MESSAGE", "CHAT_SINGLE_MESSAGE_WITH_PROMPT",
"CHAT_MULTIPLE_MESSAGES" ], "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "defaultValue": "CHAT_SINGLE_MESSAGE",
"configurationClass": "org.apache. [...]
"lazyStartProducer": { "index": 2, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
- "chatModel": { "index": 3, "kind": "parameter", "displayName": "Chat
Model", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.chat.ChatModel", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "Chat Model of type
dev.langchain4j.model.chat.C [...]
+ "chatModel": { "index": 3, "kind": "parameter", "displayName": "Chat
Model", "group": "advanced", "label": "advanced", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.chat.ChatModel", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "Chat Model of type
dev.langchain4j.model.chat.C [...]
+ "baseUrl": { "index": 4, "kind": "parameter", "displayName": "Base Url",
"group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The URL of the
provider's API (http:\/\/localhost:11434 for a local Ollama), when the model is
crea [...]
+ "modelName": { "index": 5, "kind": "parameter", "displayName": "Model
Name", "group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The name of the model at
the provider (qwen2.5, gpt-4o-mini, ...), when the model is created fr [...]
+ "provider": { "index": 6, "kind": "parameter", "displayName": "Provider",
"group": "model", "label": "model", "required": false, "type": "enum",
"javaType": "java.lang.String", "enum": [ "ollama", "openai", "anthropic",
"azure-openai", "mistral", "gemini", "vertex-ai", "github", "hugging-face",
"bedrock" ], "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": " [...]
+ "temperature": { "index": 7, "kind": "parameter", "displayName":
"Temperature", "group": "model", "label": "model", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The sampling temperature
of the model, when the model is created from the provider." },
+ "timeout": { "index": 8, "kind": "parameter", "displayName": "Timeout",
"group": "model", "label": "model", "required": false, "type": "duration",
"javaType": "java.time.Duration", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The request timeout of
the model (30s, 2m), when the model is created from the provider." },
+ "customProvider": { "index": 9, "kind": "parameter", "displayName":
"Custom Provider", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The fully qualified
class name of the LangChain4j model class of [...]
+ "modelProperties": { "index": 10, "kind": "parameter", "displayName":
"Model Properties", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "model.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "desc [...]
+ "apiKey": { "index": 11, "kind": "parameter", "displayName": "Api Key",
"group": "security", "label": "model,security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration",
"configurationField": "configuration", "description": "The API key or access
token of the provider, when the model is crea [...]
}
}
diff --git
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-embeddings.json
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-embeddings.json
index 874ce842d07..853d096d432 100644
---
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-embeddings.json
+++
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/langchain4j-embeddings.json
@@ -25,9 +25,17 @@
},
"componentProperties": {
"configuration": { "index": 0, "kind": "property", "displayName":
"Configuration", "group": "producer", "label": "", "required": false, "type":
"object", "javaType":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"deprecated": false, "autowired": false, "secret": false, "description": "The
configuration." },
- "embeddingModel": { "index": 1, "kind": "property", "displayName":
"Embedding Model", "group": "producer", "label": "", "required": true, "type":
"object", "javaType": "dev.langchain4j.model.embedding.EmbeddingModel",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The EmbeddingModel
engine [...]
+ "embeddingModel": { "index": 1, "kind": "property", "displayName":
"Embedding Model", "group": "producer", "label": "", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.embedding.EmbeddingModel",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The EmbeddingModel
engin [...]
"lazyStartProducer": { "index": 2, "kind": "property", "displayName":
"Lazy Start Producer", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Whether the producer should be started lazy (on the first message). By
starting lazy you can use this to allow CamelContext and routes to startup in
situations where a producer may otherwise fail [...]
- "autowiredEnabled": { "index": 3, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
+ "autowiredEnabled": { "index": 3, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
+ "baseUrl": { "index": 4, "kind": "property", "displayName": "Base Url",
"group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The URL of the
provider's API (http:\/\/localhost:11434 for a local Ollama), when the mo [...]
+ "modelName": { "index": 5, "kind": "property", "displayName": "Model
Name", "group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The name of the model
at the provider (qwen2.5, gpt-4o-mini, ...), when the model is [...]
+ "provider": { "index": 6, "kind": "property", "displayName": "Provider",
"group": "model", "label": "model", "required": false, "type": "enum",
"javaType": "java.lang.String", "enum": [ "ollama", "openai", "anthropic",
"azure-openai", "mistral", "gemini", "vertex-ai", "github", "hugging-face",
"bedrock" ], "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurati [...]
+ "temperature": { "index": 7, "kind": "property", "displayName":
"Temperature", "group": "model", "label": "model", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The sampling
temperature of the model, when the model is created from the provider." },
+ "timeout": { "index": 8, "kind": "property", "displayName": "Timeout",
"group": "model", "label": "model", "required": false, "type": "duration",
"javaType": "java.time.Duration", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The request timeout of
the model (30s, 2m), when the model is created from the provider." },
+ "customProvider": { "index": 9, "kind": "property", "displayName": "Custom
Provider", "group": "model (advanced)", "label": "model,advanced", "required":
false, "type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The fully qualified
class name of the LangChain4j mode [...]
+ "modelProperties": { "index": 10, "kind": "property", "displayName":
"Model Properties", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "model.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configurat [...]
+ "apiKey": { "index": 11, "kind": "property", "displayName": "Api Key",
"group": "security", "label": "model,security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The API key or access
token of the provider, when the mo [...]
},
"headers": {
"CamelLangChain4jEmbeddingsFinishReason": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "dev.langchain4j.model.output.FinishReason", "enum": [ "STOP",
"LENGTH", "TOOL_EXECUTION", "CONTENT_FILTER", "OTHER" ], "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
Finish Reason.", "constantName":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsHead
[...]
@@ -44,7 +52,15 @@
},
"properties": {
"embeddingId": { "index": 0, "kind": "path", "displayName": "Embedding
Id", "group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The id" },
- "embeddingModel": { "index": 1, "kind": "parameter", "displayName":
"Embedding Model", "group": "producer", "label": "", "required": true, "type":
"object", "javaType": "dev.langchain4j.model.embedding.EmbeddingModel",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The EmbeddingModel
engin [...]
- "lazyStartProducer": { "index": 2, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
+ "embeddingModel": { "index": 1, "kind": "parameter", "displayName":
"Embedding Model", "group": "producer", "label": "", "required": false, "type":
"object", "javaType": "dev.langchain4j.model.embedding.EmbeddingModel",
"deprecated": false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The EmbeddingModel engi
[...]
+ "lazyStartProducer": { "index": 2, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Whether the producer should be started
lazy (on the first message). By starting lazy you can use this to allow
CamelContext and routes to startup in situations where a produc [...]
+ "baseUrl": { "index": 3, "kind": "parameter", "displayName": "Base Url",
"group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The URL of the
provider's API (http:\/\/localhost:11434 for a local Ollama), when the m [...]
+ "modelName": { "index": 4, "kind": "parameter", "displayName": "Model
Name", "group": "model", "label": "model", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The name of the model
at the provider (qwen2.5, gpt-4o-mini, ...), when the model i [...]
+ "provider": { "index": 5, "kind": "parameter", "displayName": "Provider",
"group": "model", "label": "model", "required": false, "type": "enum",
"javaType": "java.lang.String", "enum": [ "ollama", "openai", "anthropic",
"azure-openai", "mistral", "gemini", "vertex-ai", "github", "hugging-face",
"bedrock" ], "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurat [...]
+ "temperature": { "index": 6, "kind": "parameter", "displayName":
"Temperature", "group": "model", "label": "model", "required": false, "type":
"number", "javaType": "java.lang.Double", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The sampling
temperature of the model, when the model is created from the provider." },
+ "timeout": { "index": 7, "kind": "parameter", "displayName": "Timeout",
"group": "model", "label": "model", "required": false, "type": "duration",
"javaType": "java.time.Duration", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The request timeout of
the model (30s, 2m), when the model is created from the provi [...]
+ "customProvider": { "index": 8, "kind": "parameter", "displayName":
"Custom Provider", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The fully qualified
class name of the LangChain4j mod [...]
+ "modelProperties": { "index": 9, "kind": "parameter", "displayName":
"Model Properties", "group": "model (advanced)", "label": "model,advanced",
"required": false, "type": "object", "javaType":
"java.util.Map<java.lang.String, java.lang.Object>", "prefix": "model.",
"multiValue": true, "deprecated": false, "autowired": false, "secret": false,
"configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configurat [...]
+ "apiKey": { "index": 10, "kind": "parameter", "displayName": "Api Key",
"group": "security", "label": "model,security", "required": false, "type":
"string", "javaType": "java.lang.String", "deprecated": false, "autowired":
false, "secret": true, "security": "secret", "configurationClass":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"configurationField": "configuration", "description": "The API key or access
token of the provider, when the m [...]
}
}
diff --git
a/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
b/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
index 1e8bd046c9e..efbe8ac6e7a 100644
---
a/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
+++
b/components-starter/camel-langchain4j-agent-starter/src/main/docs/langchain4j-agent.json
@@ -31,6 +31,12 @@
"description": "The agent factory to use for creating agents if no Agent
is provided. The option is a
org.apache.camel.component.langchain4j.agent.api.AgentFactory type.",
"sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
},
+ {
+ "name": "camel.component.langchain4j-agent.api-key",
+ "type": "java.lang.String",
+ "description": "The API key or access token of the provider, when the
model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-agent.autowired-enabled",
"type": "java.lang.Boolean",
@@ -38,6 +44,12 @@
"sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration",
"defaultValue": true
},
+ {
+ "name": "camel.component.langchain4j-agent.base-url",
+ "type": "java.lang.String",
+ "description": "The URL of the provider's API (http:\/\/localhost:11434
for a local Ollama), when the model is created from the provider. The
provider's default when not set.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-agent.compensate-on-tool-errors",
"type": "java.lang.Boolean",
@@ -51,6 +63,12 @@
"description": "The configuration. The option is a
org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration
type.",
"sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
},
+ {
+ "name": "camel.component.langchain4j-agent.custom-provider",
+ "type": "java.lang.String",
+ "description": "The fully qualified class name of the LangChain4j model
class of a provider that is not listed in provider
(dev.langchain4j.model.jlama.JlamaChatModel), created from the options here
through its builder() as a listed provider is. Set either provider or
customProvider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-agent.customizer.enabled",
"type": "java.lang.Boolean",
@@ -101,17 +119,47 @@
"description": "MCP server definitions in the form of mcpServer..=.
Supported properties: transportType (stdio, http or streamableHttp, default:
stdio), command (comma-separated, for stdio), url (for http\/streamableHttp),
environment.= (for stdio), timeout (in seconds, default: 60), logRequests,
logResponses, oauthProfile (OAuth profile for HTTP auth, requires camel-oauth).
This is a multi-value option with prefix: mcpServer.",
"sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
},
+ {
+ "name": "camel.component.langchain4j-agent.model-name",
+ "type": "java.lang.String",
+ "description": "The name of the model at the provider (qwen2.5,
gpt-4o-mini, ...), when the model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-agent.model-properties",
+ "type": "java.util.Map<java.lang.String,java.lang.Object>",
+ "description": "Provider-specific properties of the model, set on the
model's builder as they are (model.numPredict=512 for Ollama,
model.maxTokens=1024 for OpenAI), when the model is created from the provider.
This is a multi-value option with prefix: model.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-agent.output-class",
"type": "java.lang.Class<java.lang.Object>",
"description": "Java class to use for structured output. Camel derives
the JSON schema from the class and instructs the model to produce matching
JSON; the response body is left as a raw JSON string. Only supported in inline
agent creation mode: agentConfiguration must be set and neither agent nor
agentFactory may be configured. The class must be a POJO with public fields or
getters; simple types, enums, and collections are not supported. Mutually
exclusive with jsonSchema.",
"sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
},
+ {
+ "name": "camel.component.langchain4j-agent.provider",
+ "type": "java.lang.String",
+ "description": "The LangChain4j provider of the chat model that drives
the agent, to create the model from the options here (modelName, baseUrl,
apiKey, temperature, timeout, and provider-specific model. properties) instead
of a AgentConfiguration bean. The LangChain4j module of the provider
(dev.langchain4j:langchain4j-ollama, ...) must be on the classpath; Camel JBang
downloads it. Ignored when a AgentConfiguration is configured. For a provider
not listed, set customProvider instead.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-agent.tags",
"type": "java.lang.String",
"description": "Tags for discovering and calling Camel route tools",
"sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-agent.temperature",
+ "type": "java.lang.Double",
+ "description": "The sampling temperature of the model, when the model is
created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-agent.timeout",
+ "type": "java.time.Duration",
+ "description": "The request timeout of the model (30s, 2m), when the
model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.agent.springboot.LangChain4jAgentComponentConfiguration"
}
],
"hints": [],
diff --git
a/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
b/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
index 0ee565ac753..c12230c4648 100644
---
a/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
+++
b/components-starter/camel-langchain4j-agent-starter/src/main/java/org/apache/camel/component/langchain4j/agent/springboot/LangChain4jAgentComponentConfiguration.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.langchain4j.agent.springboot;
+import java.time.Duration;
import java.util.List;
import java.util.Map;
import dev.langchain4j.mcp.client.McpClient;
@@ -145,6 +146,57 @@ public class LangChain4jAgentComponentConfiguration
* mcpServer.
*/
private Map<String, Object> mcpServer;
+ /**
+ * The URL of the provider's API (http://localhost:11434 for a local
+ * Ollama), when the model is created from the provider. The provider's
+ * default when not set.
+ */
+ private String baseUrl;
+ /**
+ * The name of the model at the provider (qwen2.5, gpt-4o-mini, ...), when
+ * the model is created from the provider.
+ */
+ private String modelName;
+ /**
+ * The LangChain4j provider of the chat model that drives the agent, to
+ * create the model from the options here (modelName, baseUrl, apiKey,
+ * temperature, timeout, and provider-specific model. properties) instead
of
+ * a AgentConfiguration bean. The LangChain4j module of the provider
+ * (dev.langchain4j:langchain4j-ollama, ...) must be on the classpath;
Camel
+ * JBang downloads it. Ignored when a AgentConfiguration is configured. For
+ * a provider not listed, set customProvider instead.
+ */
+ private String provider;
+ /**
+ * The sampling temperature of the model, when the model is created from
the
+ * provider.
+ */
+ private Double temperature;
+ /**
+ * The request timeout of the model (30s, 2m), when the model is created
+ * from the provider.
+ */
+ private Duration timeout;
+ /**
+ * The fully qualified class name of the LangChain4j model class of a
+ * provider that is not listed in provider
+ * (dev.langchain4j.model.jlama.JlamaChatModel), created from the options
+ * here through its builder() as a listed provider is. Set either provider
+ * or customProvider.
+ */
+ private String customProvider;
+ /**
+ * Provider-specific properties of the model, set on the model's builder as
+ * they are (model.numPredict=512 for Ollama, model.maxTokens=1024 for
+ * OpenAI), when the model is created from the provider. This is a
+ * multi-value option with prefix: model.
+ */
+ private Map<String, Object> modelProperties;
+ /**
+ * The API key or access token of the provider, when the model is created
+ * from the provider.
+ */
+ private String apiKey;
public Agent getAgent() {
return agent;
@@ -257,4 +309,68 @@ public class LangChain4jAgentComponentConfiguration
public void setMcpServer(Map<String, Object> mcpServer) {
this.mcpServer = mcpServer;
}
+
+ public String getBaseUrl() {
+ return baseUrl;
+ }
+
+ public void setBaseUrl(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getProvider() {
+ return provider;
+ }
+
+ public void setProvider(String provider) {
+ this.provider = provider;
+ }
+
+ public Double getTemperature() {
+ return temperature;
+ }
+
+ public void setTemperature(Double temperature) {
+ this.temperature = temperature;
+ }
+
+ public Duration getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(Duration timeout) {
+ this.timeout = timeout;
+ }
+
+ public String getCustomProvider() {
+ return customProvider;
+ }
+
+ public void setCustomProvider(String customProvider) {
+ this.customProvider = customProvider;
+ }
+
+ public Map<String, Object> getModelProperties() {
+ return modelProperties;
+ }
+
+ public void setModelProperties(Map<String, Object> modelProperties) {
+ this.modelProperties = modelProperties;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
}
\ No newline at end of file
diff --git
a/components-starter/camel-langchain4j-chat-starter/src/main/docs/langchain4j-chat.json
b/components-starter/camel-langchain4j-chat-starter/src/main/docs/langchain4j-chat.json
index 46737a90af0..df2ea683e5d 100644
---
a/components-starter/camel-langchain4j-chat-starter/src/main/docs/langchain4j-chat.json
+++
b/components-starter/camel-langchain4j-chat-starter/src/main/docs/langchain4j-chat.json
@@ -13,6 +13,12 @@
}
],
"properties": [
+ {
+ "name": "camel.component.langchain4j-chat.api-key",
+ "type": "java.lang.String",
+ "description": "The API key or access token of the provider, when the
model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-chat.autowired-enabled",
"type": "java.lang.Boolean",
@@ -20,6 +26,12 @@
"sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration",
"defaultValue": true
},
+ {
+ "name": "camel.component.langchain4j-chat.base-url",
+ "type": "java.lang.String",
+ "description": "The URL of the provider's API (http:\/\/localhost:11434
for a local Ollama), when the model is created from the provider. The
provider's default when not set.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-chat.chat-model",
"type": "dev.langchain4j.model.chat.ChatModel",
@@ -39,6 +51,12 @@
"description": "The configuration. The option is a
org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration type.",
"sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
},
+ {
+ "name": "camel.component.langchain4j-chat.custom-provider",
+ "type": "java.lang.String",
+ "description": "The fully qualified class name of the LangChain4j model
class of a provider that is not listed in provider
(dev.langchain4j.model.jlama.JlamaChatModel), created from the options here
through its builder() as a listed provider is. Set either provider or
customProvider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-chat.customizer.enabled",
"type": "java.lang.Boolean",
@@ -56,6 +74,36 @@
"description": "Whether the producer should be started lazy (on the
first message). By starting lazy you can use this to allow CamelContext and
routes to startup in situations where a producer may otherwise fail during
starting and cause the route to fail being started. By deferring this startup
to be lazy then the startup failure can be handled during routing messages via
Camel's routing error handlers. Beware that when the first message is processed
then creating and starting the [...]
"sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration",
"defaultValue": false
+ },
+ {
+ "name": "camel.component.langchain4j-chat.model-name",
+ "type": "java.lang.String",
+ "description": "The name of the model at the provider (qwen2.5,
gpt-4o-mini, ...), when the model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-chat.model-properties",
+ "type": "java.util.Map<java.lang.String,java.lang.Object>",
+ "description": "Provider-specific properties of the model, set on the
model's builder as they are (model.numPredict=512 for Ollama,
model.maxTokens=1024 for OpenAI), when the model is created from the provider.
This is a multi-value option with prefix: model.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-chat.provider",
+ "type": "java.lang.String",
+ "description": "The LangChain4j provider of the chat model, to create
the model from the options here (modelName, baseUrl, apiKey, temperature,
timeout, and provider-specific model. properties) instead of a ChatModel bean.
The LangChain4j module of the provider (dev.langchain4j:langchain4j-ollama,
...) must be on the classpath; Camel JBang downloads it. Ignored when a
ChatModel is configured. For a provider not listed, set customProvider
instead.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-chat.temperature",
+ "type": "java.lang.Double",
+ "description": "The sampling temperature of the model, when the model is
created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-chat.timeout",
+ "type": "java.time.Duration",
+ "description": "The request timeout of the model (30s, 2m), when the
model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.chat.springboot.LangChain4jChatComponentConfiguration"
}
],
"hints": [],
diff --git
a/components-starter/camel-langchain4j-chat-starter/src/main/java/org/apache/camel/component/langchain4j/chat/springboot/LangChain4jChatComponentConfiguration.java
b/components-starter/camel-langchain4j-chat-starter/src/main/java/org/apache/camel/component/langchain4j/chat/springboot/LangChain4jChatComponentConfiguration.java
index a4388c6483b..08dc8540edb 100644
---
a/components-starter/camel-langchain4j-chat-starter/src/main/java/org/apache/camel/component/langchain4j/chat/springboot/LangChain4jChatComponentConfiguration.java
+++
b/components-starter/camel-langchain4j-chat-starter/src/main/java/org/apache/camel/component/langchain4j/chat/springboot/LangChain4jChatComponentConfiguration.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.langchain4j.chat.springboot;
+import java.time.Duration;
+import java.util.Map;
import dev.langchain4j.model.chat.ChatModel;
import org.apache.camel.component.langchain4j.chat.LangChain4jChatComponent;
import
org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration;
@@ -75,6 +77,57 @@ public class LangChain4jChatComponentConfiguration
* dev.langchain4j.model.chat.ChatModel type.
*/
private ChatModel chatModel;
+ /**
+ * The URL of the provider's API (http://localhost:11434 for a local
+ * Ollama), when the model is created from the provider. The provider's
+ * default when not set.
+ */
+ private String baseUrl;
+ /**
+ * The name of the model at the provider (qwen2.5, gpt-4o-mini, ...), when
+ * the model is created from the provider.
+ */
+ private String modelName;
+ /**
+ * The LangChain4j provider of the chat model, to create the model from the
+ * options here (modelName, baseUrl, apiKey, temperature, timeout, and
+ * provider-specific model. properties) instead of a ChatModel bean. The
+ * LangChain4j module of the provider (dev.langchain4j:langchain4j-ollama,
+ * ...) must be on the classpath; Camel JBang downloads it. Ignored when a
+ * ChatModel is configured. For a provider not listed, set customProvider
+ * instead.
+ */
+ private String provider;
+ /**
+ * The sampling temperature of the model, when the model is created from
the
+ * provider.
+ */
+ private Double temperature;
+ /**
+ * The request timeout of the model (30s, 2m), when the model is created
+ * from the provider.
+ */
+ private Duration timeout;
+ /**
+ * The fully qualified class name of the LangChain4j model class of a
+ * provider that is not listed in provider
+ * (dev.langchain4j.model.jlama.JlamaChatModel), created from the options
+ * here through its builder() as a listed provider is. Set either provider
+ * or customProvider.
+ */
+ private String customProvider;
+ /**
+ * Provider-specific properties of the model, set on the model's builder as
+ * they are (model.numPredict=512 for Ollama, model.maxTokens=1024 for
+ * OpenAI), when the model is created from the provider. This is a
+ * multi-value option with prefix: model.
+ */
+ private Map<String, Object> modelProperties;
+ /**
+ * The API key or access token of the provider, when the model is created
+ * from the provider.
+ */
+ private String apiKey;
public LangChain4jChatOperations getChatOperation() {
return chatOperation;
@@ -115,4 +168,68 @@ public class LangChain4jChatComponentConfiguration
public void setChatModel(ChatModel chatModel) {
this.chatModel = chatModel;
}
+
+ public String getBaseUrl() {
+ return baseUrl;
+ }
+
+ public void setBaseUrl(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getProvider() {
+ return provider;
+ }
+
+ public void setProvider(String provider) {
+ this.provider = provider;
+ }
+
+ public Double getTemperature() {
+ return temperature;
+ }
+
+ public void setTemperature(Double temperature) {
+ this.temperature = temperature;
+ }
+
+ public Duration getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(Duration timeout) {
+ this.timeout = timeout;
+ }
+
+ public String getCustomProvider() {
+ return customProvider;
+ }
+
+ public void setCustomProvider(String customProvider) {
+ this.customProvider = customProvider;
+ }
+
+ public Map<String, Object> getModelProperties() {
+ return modelProperties;
+ }
+
+ public void setModelProperties(Map<String, Object> modelProperties) {
+ this.modelProperties = modelProperties;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
}
\ No newline at end of file
diff --git
a/components-starter/camel-langchain4j-embeddings-starter/src/main/docs/langchain4j-embeddings.json
b/components-starter/camel-langchain4j-embeddings-starter/src/main/docs/langchain4j-embeddings.json
index e0732f5b24f..ae177bd6027 100644
---
a/components-starter/camel-langchain4j-embeddings-starter/src/main/docs/langchain4j-embeddings.json
+++
b/components-starter/camel-langchain4j-embeddings-starter/src/main/docs/langchain4j-embeddings.json
@@ -13,6 +13,12 @@
}
],
"properties": [
+ {
+ "name": "camel.component.langchain4j-embeddings.api-key",
+ "type": "java.lang.String",
+ "description": "The API key or access token of the provider, when the
model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-embeddings.autowired-enabled",
"type": "java.lang.Boolean",
@@ -20,12 +26,24 @@
"sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration",
"defaultValue": true
},
+ {
+ "name": "camel.component.langchain4j-embeddings.base-url",
+ "type": "java.lang.String",
+ "description": "The URL of the provider's API (http:\/\/localhost:11434
for a local Ollama), when the model is created from the provider. The
provider's default when not set.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-embeddings.configuration",
"type":
"org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration",
"description": "The configuration. The option is a
org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration
type.",
"sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
},
+ {
+ "name": "camel.component.langchain4j-embeddings.custom-provider",
+ "type": "java.lang.String",
+ "description": "The fully qualified class name of the LangChain4j model
class of a provider that is not listed in provider
(dev.langchain4j.model.jlama.JlamaChatModel), created from the options here
through its builder() as a listed provider is. Set either provider or
customProvider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
{
"name": "camel.component.langchain4j-embeddings.customizer.enabled",
"type": "java.lang.Boolean",
@@ -34,7 +52,7 @@
{
"name": "camel.component.langchain4j-embeddings.embedding-model",
"type": "dev.langchain4j.model.embedding.EmbeddingModel",
- "description": "The EmbeddingModel engine to use. The option is a
dev.langchain4j.model.embedding.EmbeddingModel type.",
+ "description": "The EmbeddingModel engine to use. Either this or a
provider is required. The option is a
dev.langchain4j.model.embedding.EmbeddingModel type.",
"sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
},
{
@@ -49,6 +67,36 @@
"description": "Whether the producer should be started lazy (on the
first message). By starting lazy you can use this to allow CamelContext and
routes to startup in situations where a producer may otherwise fail during
starting and cause the route to fail being started. By deferring this startup
to be lazy then the startup failure can be handled during routing messages via
Camel's routing error handlers. Beware that when the first message is processed
then creating and starting the [...]
"sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration",
"defaultValue": false
+ },
+ {
+ "name": "camel.component.langchain4j-embeddings.model-name",
+ "type": "java.lang.String",
+ "description": "The name of the model at the provider (qwen2.5,
gpt-4o-mini, ...), when the model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-embeddings.model-properties",
+ "type": "java.util.Map<java.lang.String,java.lang.Object>",
+ "description": "Provider-specific properties of the model, set on the
model's builder as they are (model.numPredict=512 for Ollama,
model.maxTokens=1024 for OpenAI), when the model is created from the provider.
This is a multi-value option with prefix: model.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-embeddings.provider",
+ "type": "java.lang.String",
+ "description": "The LangChain4j provider of the embedding model, to
create the model from the options here (modelName, baseUrl, apiKey,
temperature, timeout, and provider-specific model. properties) instead of a
EmbeddingModel bean. The LangChain4j module of the provider
(dev.langchain4j:langchain4j-ollama, ...) must be on the classpath; Camel JBang
downloads it. Ignored when a EmbeddingModel is configured. For a provider not
listed, set customProvider instead.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-embeddings.temperature",
+ "type": "java.lang.Double",
+ "description": "The sampling temperature of the model, when the model is
created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
+ },
+ {
+ "name": "camel.component.langchain4j-embeddings.timeout",
+ "type": "java.time.Duration",
+ "description": "The request timeout of the model (30s, 2m), when the
model is created from the provider.",
+ "sourceType":
"org.apache.camel.component.langchain4j.embeddings.springboot.LangChain4jEmbeddingsComponentConfiguration"
}
],
"hints": [],
diff --git
a/components-starter/camel-langchain4j-embeddings-starter/src/main/java/org/apache/camel/component/langchain4j/embeddings/springboot/LangChain4jEmbeddingsComponentConfiguration.java
b/components-starter/camel-langchain4j-embeddings-starter/src/main/java/org/apache/camel/component/langchain4j/embeddings/springboot/LangChain4jEmbeddingsComponentConfiguration.java
index 3f334d03be6..902cdcb6ab4 100644
---
a/components-starter/camel-langchain4j-embeddings-starter/src/main/java/org/apache/camel/component/langchain4j/embeddings/springboot/LangChain4jEmbeddingsComponentConfiguration.java
+++
b/components-starter/camel-langchain4j-embeddings-starter/src/main/java/org/apache/camel/component/langchain4j/embeddings/springboot/LangChain4jEmbeddingsComponentConfiguration.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.langchain4j.embeddings.springboot;
+import java.time.Duration;
+import java.util.Map;
import dev.langchain4j.model.embedding.EmbeddingModel;
import
org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration;
import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
@@ -42,8 +44,8 @@ public class LangChain4jEmbeddingsComponentConfiguration
*/
private LangChain4jEmbeddingsConfiguration configuration;
/**
- * The EmbeddingModel engine to use. The option is a
- * dev.langchain4j.model.embedding.EmbeddingModel type.
+ * The EmbeddingModel engine to use. Either this or a provider is required.
+ * The option is a dev.langchain4j.model.embedding.EmbeddingModel type.
*/
private EmbeddingModel embeddingModel;
/**
@@ -66,6 +68,57 @@ public class LangChain4jEmbeddingsComponentConfiguration
* etc.
*/
private Boolean autowiredEnabled = true;
+ /**
+ * The URL of the provider's API (http://localhost:11434 for a local
+ * Ollama), when the model is created from the provider. The provider's
+ * default when not set.
+ */
+ private String baseUrl;
+ /**
+ * The name of the model at the provider (qwen2.5, gpt-4o-mini, ...), when
+ * the model is created from the provider.
+ */
+ private String modelName;
+ /**
+ * The LangChain4j provider of the embedding model, to create the model
from
+ * the options here (modelName, baseUrl, apiKey, temperature, timeout, and
+ * provider-specific model. properties) instead of a EmbeddingModel bean.
+ * The LangChain4j module of the provider
+ * (dev.langchain4j:langchain4j-ollama, ...) must be on the classpath;
Camel
+ * JBang downloads it. Ignored when a EmbeddingModel is configured. For a
+ * provider not listed, set customProvider instead.
+ */
+ private String provider;
+ /**
+ * The sampling temperature of the model, when the model is created from
the
+ * provider.
+ */
+ private Double temperature;
+ /**
+ * The request timeout of the model (30s, 2m), when the model is created
+ * from the provider.
+ */
+ private Duration timeout;
+ /**
+ * The fully qualified class name of the LangChain4j model class of a
+ * provider that is not listed in provider
+ * (dev.langchain4j.model.jlama.JlamaChatModel), created from the options
+ * here through its builder() as a listed provider is. Set either provider
+ * or customProvider.
+ */
+ private String customProvider;
+ /**
+ * Provider-specific properties of the model, set on the model's builder as
+ * they are (model.numPredict=512 for Ollama, model.maxTokens=1024 for
+ * OpenAI), when the model is created from the provider. This is a
+ * multi-value option with prefix: model.
+ */
+ private Map<String, Object> modelProperties;
+ /**
+ * The API key or access token of the provider, when the model is created
+ * from the provider.
+ */
+ private String apiKey;
public LangChain4jEmbeddingsConfiguration getConfiguration() {
return configuration;
@@ -99,4 +152,68 @@ public class LangChain4jEmbeddingsComponentConfiguration
public void setAutowiredEnabled(Boolean autowiredEnabled) {
this.autowiredEnabled = autowiredEnabled;
}
+
+ public String getBaseUrl() {
+ return baseUrl;
+ }
+
+ public void setBaseUrl(String baseUrl) {
+ this.baseUrl = baseUrl;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getProvider() {
+ return provider;
+ }
+
+ public void setProvider(String provider) {
+ this.provider = provider;
+ }
+
+ public Double getTemperature() {
+ return temperature;
+ }
+
+ public void setTemperature(Double temperature) {
+ this.temperature = temperature;
+ }
+
+ public Duration getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(Duration timeout) {
+ this.timeout = timeout;
+ }
+
+ public String getCustomProvider() {
+ return customProvider;
+ }
+
+ public void setCustomProvider(String customProvider) {
+ this.customProvider = customProvider;
+ }
+
+ public Map<String, Object> getModelProperties() {
+ return modelProperties;
+ }
+
+ public void setModelProperties(Map<String, Object> modelProperties) {
+ this.modelProperties = modelProperties;
+ }
+
+ public String getApiKey() {
+ return apiKey;
+ }
+
+ public void setApiKey(String apiKey) {
+ this.apiKey = apiKey;
+ }
}
\ No newline at end of file
diff --git
a/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-agent.adoc
b/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-agent.adoc
index d79f0deaeba..7f495393df2 100644
--- a/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-agent.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-agent.adoc
@@ -34,7 +34,7 @@ See the
https://docs.langchain4j.dev/tutorials/spring-boot-integration[LangChain
integration documentation] for provider configuration, and the component
documentation for
creating and configuring a Camel agent.
-The starter supports 15 options, which are listed below.
+The starter supports 23 options, which are listed below.
[width="100%",cols="2,5,^1,2",options="header"]
|===
@@ -42,9 +42,12 @@ The starter supports 15 options, which are listed below.
| camel.component.langchain4j-agent.agent | The agent to use for the
component. The option is a
org.apache.camel.component.langchain4j.agent.api.Agent type. | | Agent
| camel.component.langchain4j-agent.agent-configuration | AgentConfiguration
used by Camel to create the agent internally. When set, Camel creates an
AgentWithMemory if a ChatMemoryProvider is configured, otherwise an
AgentWithoutMemory. If an agentFactory is also configured, the factory takes
precedence. The option is a
org.apache.camel.component.langchain4j.agent.api.AgentConfiguration type. | |
AgentConfiguration
| camel.component.langchain4j-agent.agent-factory | The agent factory to use
for creating agents if no Agent is provided. The option is a
org.apache.camel.component.langchain4j.agent.api.AgentFactory type. | |
AgentFactory
+| camel.component.langchain4j-agent.api-key | The API key or access token of
the provider, when the model is created from the provider. | | String
| camel.component.langchain4j-agent.autowired-enabled | Whether autowiring is
enabled. This is used for automatic autowiring options (the option must be
marked as autowired) by looking up in the registry to find if there is a single
instance of matching type, which then gets configured on the component. This
can be used for automatic configuring JDBC data sources, JMS connection
factories, AWS Clients, etc. | true | Boolean
+| camel.component.langchain4j-agent.base-url | The URL of the provider's API
(http://localhost:11434 for a local Ollama), when the model is created from the
provider. The provider's default when not set. | | String
| camel.component.langchain4j-agent.compensate-on-tool-errors | Whether
LangChain4j should compensate when a tool execution fails. Only supported in
inline agent creation mode (agentConfiguration without agent or agentFactory).
URI value overrides the same option on the agentConfiguration bean. | false |
Boolean
| camel.component.langchain4j-agent.configuration | The configuration. The
option is a
org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration
type. | | LangChain4jAgentConfiguration
+| camel.component.langchain4j-agent.custom-provider | The fully qualified
class name of the LangChain4j model class of a provider that is not listed in
provider (dev.langchain4j.model.jlama.JlamaChatModel), created from the options
here through its builder() as a listed provider is. Set either provider or
customProvider. | | String
| camel.component.langchain4j-agent.enabled | Whether to enable auto
configuration of the langchain4j-agent component. This is enabled by default. |
| Boolean
| camel.component.langchain4j-agent.execute-tools-concurrently | Whether
multiple tools requested in a single LLM turn are executed concurrently. Camel
route tools run on isolated exchange copies. Only supported in inline agent
creation mode (agentConfiguration without agent or agentFactory). URI value
overrides the same option on the agentConfiguration bean. | false | Boolean
| camel.component.langchain4j-agent.json-schema | JSON schema for structured
output validation. Only supported in inline agent creation mode:
agentConfiguration must be set and neither agent nor agentFactory may be
configured. Mutually exclusive with outputClass. | | String
@@ -52,6 +55,11 @@ The starter supports 15 options, which are listed below.
| camel.component.langchain4j-agent.max-tool-calling-round-trips | Maximum
number of tool-calling round trips allowed per request. Each round trip is one
LLM call plus execution of the tools requested in that call. Set to 0 to leave
unset and use the LangChain4j default. Only supported in inline agent creation
mode (agentConfiguration without agent or agentFactory). URI value overrides
the same option on the agentConfiguration bean. | 0 | Integer
| camel.component.langchain4j-agent.mcp-clients | Pre-built MCP (Model Context
Protocol) client instances for external tool integration. Reference beans from
the registry, e.g., #myMcpClient1,#myMcpClient2 | | McpClient>
| camel.component.langchain4j-agent.mcp-server | MCP server definitions in the
form of mcpServer..=. Supported properties: transportType (stdio, http or
streamableHttp, default: stdio), command (comma-separated, for stdio), url (for
http/streamableHttp), environment.= (for stdio), timeout (in seconds, default:
60), logRequests, logResponses, oauthProfile (OAuth profile for HTTP auth,
requires camel-oauth). This is a multi-value option with prefix: mcpServer. |
| Object>
+| camel.component.langchain4j-agent.model-name | The name of the model at the
provider (qwen2.5, gpt-4o-mini, ...), when the model is created from the
provider. | | String
+| camel.component.langchain4j-agent.model-properties | Provider-specific
properties of the model, set on the model's builder as they are
(model.numPredict=512 for Ollama, model.maxTokens=1024 for OpenAI), when the
model is created from the provider. This is a multi-value option with prefix:
model. | | Object>
| camel.component.langchain4j-agent.output-class | Java class to use for
structured output. Camel derives the JSON schema from the class and instructs
the model to produce matching JSON; the response body is left as a raw JSON
string. Only supported in inline agent creation mode: agentConfiguration must
be set and neither agent nor agentFactory may be configured. The class must be
a POJO with public fields or getters; simple types, enums, and collections are
not supported. Mutually exclu [...]
+| camel.component.langchain4j-agent.provider | The LangChain4j provider of the
chat model that drives the agent, to create the model from the options here
(modelName, baseUrl, apiKey, temperature, timeout, and provider-specific model.
properties) instead of a AgentConfiguration bean. The LangChain4j module of the
provider (dev.langchain4j:langchain4j-ollama, ...) must be on the classpath;
Camel JBang downloads it. Ignored when a AgentConfiguration is configured. For
a provider not listed [...]
| camel.component.langchain4j-agent.tags | Tags for discovering and calling
Camel route tools | | String
+| camel.component.langchain4j-agent.temperature | The sampling temperature of
the model, when the model is created from the provider. | | Double
+| camel.component.langchain4j-agent.timeout | The request timeout of the model
(30s, 2m), when the model is created from the provider. | | Duration
|===
diff --git a/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-chat.adoc
b/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-chat.adoc
index a1296a32ba2..de3451e84ac 100644
--- a/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-chat.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-chat.adoc
@@ -37,15 +37,23 @@ option can be omitted. See the
https://docs.langchain4j.dev/tutorials/spring-boot-integration[LangChain4j
Spring Boot integration documentation]
for provider starters, properties, and compatible versions.
-The starter supports 6 options, which are listed below.
+The starter supports 14 options, which are listed below.
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
+| camel.component.langchain4j-chat.api-key | The API key or access token of
the provider, when the model is created from the provider. | | String
| camel.component.langchain4j-chat.autowired-enabled | Whether autowiring is
enabled. This is used for automatic autowiring options (the option must be
marked as autowired) by looking up in the registry to find if there is a single
instance of matching type, which then gets configured on the component. This
can be used for automatic configuring JDBC data sources, JMS connection
factories, AWS Clients, etc. | true | Boolean
+| camel.component.langchain4j-chat.base-url | The URL of the provider's API
(http://localhost:11434 for a local Ollama), when the model is created from the
provider. The provider's default when not set. | | String
| camel.component.langchain4j-chat.chat-model | Chat Model of type
dev.langchain4j.model.chat.ChatModel. The option is a
dev.langchain4j.model.chat.ChatModel type. | | ChatModel
| camel.component.langchain4j-chat.chat-operation | Operation in case of
Endpoint of type CHAT. The value is one of the values of
org.apache.camel.component.langchain4j.chat.LangChain4jChatOperations |
chat-single-message | LangChain4jChatOperations
| camel.component.langchain4j-chat.configuration | The configuration. The
option is a
org.apache.camel.component.langchain4j.chat.LangChain4jChatConfiguration type.
| | LangChain4jChatConfiguration
+| camel.component.langchain4j-chat.custom-provider | The fully qualified class
name of the LangChain4j model class of a provider that is not listed in
provider (dev.langchain4j.model.jlama.JlamaChatModel), created from the options
here through its builder() as a listed provider is. Set either provider or
customProvider. | | String
| camel.component.langchain4j-chat.enabled | Whether to enable auto
configuration of the langchain4j-chat component. This is enabled by default. |
| Boolean
| camel.component.langchain4j-chat.lazy-start-producer | Whether the producer
should be started lazy (on the first message). By starting lazy you can use
this to allow CamelContext and routes to startup in situations where a producer
may otherwise fail during starting and cause the route to fail being started.
By deferring this startup to be lazy then the startup failure can be handled
during routing messages via Camel's routing error handlers. Beware that when
the first message is proce [...]
+| camel.component.langchain4j-chat.model-name | The name of the model at the
provider (qwen2.5, gpt-4o-mini, ...), when the model is created from the
provider. | | String
+| camel.component.langchain4j-chat.model-properties | Provider-specific
properties of the model, set on the model's builder as they are
(model.numPredict=512 for Ollama, model.maxTokens=1024 for OpenAI), when the
model is created from the provider. This is a multi-value option with prefix:
model. | | Object>
+| camel.component.langchain4j-chat.provider | The LangChain4j provider of the
chat model, to create the model from the options here (modelName, baseUrl,
apiKey, temperature, timeout, and provider-specific model. properties) instead
of a ChatModel bean. The LangChain4j module of the provider
(dev.langchain4j:langchain4j-ollama, ...) must be on the classpath; Camel JBang
downloads it. Ignored when a ChatModel is configured. For a provider not
listed, set customProvider instead. | | String
+| camel.component.langchain4j-chat.temperature | The sampling temperature of
the model, when the model is created from the provider. | | Double
+| camel.component.langchain4j-chat.timeout | The request timeout of the model
(30s, 2m), when the model is created from the provider. | | Duration
|===
diff --git
a/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-embeddings.adoc
b/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-embeddings.adoc
index 473a9826dc5..06aa8c88cfb 100644
--- a/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-embeddings.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/starters/langchain4j-embeddings.adoc
@@ -36,14 +36,22 @@ endpoint option can be omitted. See the
https://docs.langchain4j.dev/tutorials/spring-boot-integration[LangChain4j
Spring Boot integration documentation]
for provider starters, properties, and compatible versions.
-The starter supports 5 options, which are listed below.
+The starter supports 13 options, which are listed below.
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
+| camel.component.langchain4j-embeddings.api-key | The API key or access token
of the provider, when the model is created from the provider. | | String
| camel.component.langchain4j-embeddings.autowired-enabled | Whether
autowiring is enabled. This is used for automatic autowiring options (the
option must be marked as autowired) by looking up in the registry to find if
there is a single instance of matching type, which then gets configured on the
component. This can be used for automatic configuring JDBC data sources, JMS
connection factories, AWS Clients, etc. | true | Boolean
+| camel.component.langchain4j-embeddings.base-url | The URL of the provider's
API (http://localhost:11434 for a local Ollama), when the model is created from
the provider. The provider's default when not set. | | String
| camel.component.langchain4j-embeddings.configuration | The configuration.
The option is a
org.apache.camel.component.langchain4j.embeddings.LangChain4jEmbeddingsConfiguration
type. | | LangChain4jEmbeddingsConfiguration
-| camel.component.langchain4j-embeddings.embedding-model | The EmbeddingModel
engine to use. The option is a dev.langchain4j.model.embedding.EmbeddingModel
type. | | EmbeddingModel
+| camel.component.langchain4j-embeddings.custom-provider | The fully qualified
class name of the LangChain4j model class of a provider that is not listed in
provider (dev.langchain4j.model.jlama.JlamaChatModel), created from the options
here through its builder() as a listed provider is. Set either provider or
customProvider. | | String
+| camel.component.langchain4j-embeddings.embedding-model | The EmbeddingModel
engine to use. Either this or a provider is required. The option is a
dev.langchain4j.model.embedding.EmbeddingModel type. | | EmbeddingModel
| camel.component.langchain4j-embeddings.enabled | Whether to enable auto
configuration of the langchain4j-embeddings component. This is enabled by
default. | | Boolean
| camel.component.langchain4j-embeddings.lazy-start-producer | Whether the
producer should be started lazy (on the first message). By starting lazy you
can use this to allow CamelContext and routes to startup in situations where a
producer may otherwise fail during starting and cause the route to fail being
started. By deferring this startup to be lazy then the startup failure can be
handled during routing messages via Camel's routing error handlers. Beware that
when the first message is [...]
+| camel.component.langchain4j-embeddings.model-name | The name of the model at
the provider (qwen2.5, gpt-4o-mini, ...), when the model is created from the
provider. | | String
+| camel.component.langchain4j-embeddings.model-properties | Provider-specific
properties of the model, set on the model's builder as they are
(model.numPredict=512 for Ollama, model.maxTokens=1024 for OpenAI), when the
model is created from the provider. This is a multi-value option with prefix:
model. | | Object>
+| camel.component.langchain4j-embeddings.provider | The LangChain4j provider
of the embedding model, to create the model from the options here (modelName,
baseUrl, apiKey, temperature, timeout, and provider-specific model. properties)
instead of a EmbeddingModel bean. The LangChain4j module of the provider
(dev.langchain4j:langchain4j-ollama, ...) must be on the classpath; Camel JBang
downloads it. Ignored when a EmbeddingModel is configured. For a provider not
listed, set customProvider [...]
+| camel.component.langchain4j-embeddings.temperature | The sampling
temperature of the model, when the model is created from the provider. | |
Double
+| camel.component.langchain4j-embeddings.timeout | The request timeout of the
model (30s, 2m), when the model is created from the provider. | | Duration
|===