You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/07/08 14:02:22 UTC

(camel) branch chore/upgrade-watsonx-ai-0.22 created (now 5e3763a264b8)

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

davsclaus pushed a change to branch chore/upgrade-watsonx-ai-0.22
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 5e3763a264b8 chore: Upgrade IBM WatsonX AI SDK from 0.21.0 to 0.22.0

This branch includes the following new commits:

     new 5e3763a264b8 chore: Upgrade IBM WatsonX AI SDK from 0.21.0 to 0.22.0

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/01: chore: Upgrade IBM WatsonX AI SDK from 0.21.0 to 0.22.0

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch chore/upgrade-watsonx-ai-0.22
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5e3763a264b839a494b513cb881fba6ba5c93df8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Jul 8 16:02:06 2026 +0200

    chore: Upgrade IBM WatsonX AI SDK from 0.21.0 to 0.22.0
    
    API changes: embedding() -> embed(), inputs() -> returnInputs()
    
    Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
    Signed-off-by: Claus Ibsen <cl...@gmail.com>
---
 .../camel/component/ibm/watsonx/ai/handler/EmbeddingHandler.java     | 2 +-
 .../apache/camel/component/ibm/watsonx/ai/handler/RerankHandler.java | 5 ++---
 parent/pom.xml                                                       | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/EmbeddingHandler.java b/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/EmbeddingHandler.java
index dede78850f86..d131c692057e 100644
--- a/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/EmbeddingHandler.java
+++ b/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/EmbeddingHandler.java
@@ -67,7 +67,7 @@ public class EmbeddingHandler extends AbstractWatsonxAiHandler {
 
         // Call the service
         EmbeddingService service = endpoint.getEmbeddingService();
-        EmbeddingResponse response = service.embedding(inputs, paramsBuilder.build());
+        EmbeddingResponse response = service.embed(inputs, paramsBuilder.build());
 
         // Extract embedding vectors from response
         List<List<Float>> embeddings = response.results().stream()
diff --git a/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/RerankHandler.java b/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/RerankHandler.java
index e051372d8519..dca2444eb14f 100644
--- a/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/RerankHandler.java
+++ b/components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/RerankHandler.java
@@ -75,10 +75,9 @@ public class RerankHandler extends AbstractWatsonxAiHandler {
         }
         if (topN != null) {
             paramsBuilder.topN(topN);
-            // TODO: remove the following with the next sdk release
-            paramsBuilder.inputs(config.getReturnDocuments() != null ? config.getReturnDocuments() : false);
+            paramsBuilder.returnInputs(config.getReturnDocuments() != null && config.getReturnDocuments());
         } else if (config.getReturnDocuments() != null) {
-            paramsBuilder.inputs(config.getReturnDocuments());
+            paramsBuilder.returnInputs(config.getReturnDocuments());
         }
 
         // Call the service
diff --git a/parent/pom.xml b/parent/pom.xml
index d68f4fd662c0..44eb90c63a0d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -236,7 +236,7 @@
         <ibm-cos-sdk-version>2.15.1</ibm-cos-sdk-version>
         <ibm-secrets-manager-version>2.0.28</ibm-secrets-manager-version>
         <ibm-watson-sdk-version>16.2.0</ibm-watson-sdk-version>
-        <ibm-watsonx-ai-sdk-version>0.21.0</ibm-watsonx-ai-sdk-version>
+        <ibm-watsonx-ai-sdk-version>0.22.0</ibm-watsonx-ai-sdk-version>
         <ibm-watsonx-data-sdk-version>0.9.0</ibm-watsonx-data-sdk-version>
         <ical4j-version>4.3.0</ical4j-version>
         <icu4j-version>78.3</icu4j-version>