This is an automated email from the ASF dual-hosted git repository.
fmariani 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 955305c94f63 Update langchain4j to 1.8.0 and fix agent MCP test
955305c94f63 is described below
commit 955305c94f639621740d443f60c87dd8905d272c
Author: Croway <[email protected]>
AuthorDate: Thu Oct 30 09:42:08 2025 +0100
Update langchain4j to 1.8.0 and fix agent MCP test
---
.../agent/integration/LangChain4jAgentMcpToolsIT.java | 10 +++++-----
parent/pom.xml | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git
a/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/integration/LangChain4jAgentMcpToolsIT.java
b/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/integration/LangChain4jAgentMcpToolsIT.java
index 6335d723bc81..2ad87bfddc59 100644
---
a/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/integration/LangChain4jAgentMcpToolsIT.java
+++
b/components/camel-ai/camel-langchain4j-agent/src/test/java/org/apache/camel/component/langchain4j/agent/integration/LangChain4jAgentMcpToolsIT.java
@@ -73,7 +73,6 @@ public class LangChain4jAgentMcpToolsIT extends
CamelTestSupport {
protected void setupResources() throws Exception {
super.setupResources();
chatModel = OLLAMA != null ? ModelHelper.loadChatModel(OLLAMA) :
ModelHelper.loadFromEnv();
- chatModel = ModelHelper.loadFromEnv();
// Initialize tempDirPat
tempDirPath = tempDir.toString();
@@ -99,9 +98,10 @@ public class LangChain4jAgentMcpToolsIT extends
CamelTestSupport {
mockEndpoint.assertIsSatisfied();
assertNotNull(response, "AI response should not be null");
assertTrue(response.toLowerCase().contains("read"),
- "Response should indicate the possibility of reading a file");
+ "Response should indicate the possibility of reading a file
but was: " + response);
assertFalse(response.toLowerCase().contains("edit"),
- "Response should indicate the possibility of editing a file
because edit_file is not part of the filtered MCP tools");
+ "Response should indicate the possibility of editing a file
because edit_file is not part of the filtered MCP tools but was: "
+ + response);
}
@Test
@@ -116,7 +116,7 @@ public class LangChain4jAgentMcpToolsIT extends
CamelTestSupport {
mockEndpoint.assertIsSatisfied();
assertNotNull(response, "AI response should not be null");
assertTrue(response.toLowerCase().contains("camel-mcp-test.txt"),
- "Response should contain our file");
+ "Response should contain our file but was: " + response);
}
@Test
@@ -130,7 +130,7 @@ public class LangChain4jAgentMcpToolsIT extends
CamelTestSupport {
mockEndpoint.assertIsSatisfied();
assertNotNull(response, "AI response should not be null");
assertTrue(response.toLowerCase().contains(TEST_FILE_CONTENT.toLowerCase()),
- "Response should contain the content of our file");
+ "Response should contain the content of our file but was: " +
response);
}
private McpClient createMcpClient() {
diff --git a/parent/pom.xml b/parent/pom.xml
index b8ae16212125..202edb690d05 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -344,10 +344,10 @@
<keycloak-client-version>26.0.7</keycloak-client-version>
<kubernetes-client-version>7.4.0</kubernetes-client-version>
<kudu-version>1.18.0</kudu-version>
- <langchain4j-version>1.7.1</langchain4j-version>
+ <langchain4j-version>1.8.0</langchain4j-version>
<!-- remove this one when all langchain4j artifacts are made final -->
- <langchain4j-beta-version>1.7.1-beta14</langchain4j-beta-version> <!--
dependencies in beta version are still in tech preview mode in the Langchain4j
project -->
-
<langchain4j-community-version>1.7.1-beta14</langchain4j-community-version>
<!-- version for Langchain4j community dependencies :
https://github.com/langchain4j/langchain4j-community-->
+ <langchain4j-beta-version>1.8.0-beta15</langchain4j-beta-version> <!--
dependencies in beta version are still in tech preview mode in the Langchain4j
project -->
+
<langchain4j-community-version>1.8.0-beta15</langchain4j-community-version>
<!-- version for Langchain4j community dependencies :
https://github.com/langchain4j/langchain4j-community-->
<leveldbjni-version>1.8</leveldbjni-version>
<leveldb-api-version>0.12</leveldb-api-version>
<leveldb-version>0.12</leveldb-version>