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-jbang-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 62a7352  CAMEL-25517: langchain4j-chat keeps the order id in a 
variable (#107)
62a7352 is described below

commit 62a735221ae7f1f18d01b2f80a2702f4eb1f584e
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Oct 10 10:44:29 2026 +0200

    CAMEL-25517: langchain4j-chat keeps the order id in a variable (#107)
    
    Camel favours variables for the values a route keeps for itself.
    
    
    Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
 ai/langchain4j-chat/README.md                   | 2 +-
 ai/langchain4j-chat/langchain4j-chat.camel.yaml | 4 ++--
 ai/langchain4j-chat/metadata.json               | 2 +-
 camel-jbang-example-catalog.json                | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ai/langchain4j-chat/README.md b/ai/langchain4j-chat/README.md
index 8145c5e..f68e82a 100644
--- a/ai/langchain4j-chat/README.md
+++ b/ai/langchain4j-chat/README.md
@@ -46,7 +46,7 @@ seconds per reply; a larger model or a GPU is faster. Stop 
the container with `c
 - `langchain4j-chat` with `chatModel: "#chatModel"` sends the body as a single 
user message and replaces the
   body with the reply; `CamelLangChain4jChatInputTokenCount` and 
`...OutputTokenCount` say what it cost.
 - The prompt is built with the Simple language from the order fields; 
`${body[lines]}` prints the list of lines.
-- The order id is kept in an exchange property because the reply replaces the 
body.
+- The order id is kept in a variable because the reply replaces the body.
 
 ## Build it step by step
 
diff --git a/ai/langchain4j-chat/langchain4j-chat.camel.yaml 
b/ai/langchain4j-chat/langchain4j-chat.camel.yaml
index 04880bd..a20a226 100644
--- a/ai/langchain4j-chat/langchain4j-chat.camel.yaml
+++ b/ai/langchain4j-chat/langchain4j-chat.camel.yaml
@@ -24,7 +24,7 @@
         - unmarshal:
             json:
               library: Jackson
-        - setProperty:
+        - setVariable:
             name: orderId
             expression:
               simple:
@@ -43,4 +43,4 @@
               chatId: notifications
               chatModel: "#chatModel"
         - log:
-            message: "Notification for ${exchangeProperty.orderId} 
(${header.CamelLangChain4jChatInputTokenCount} in, 
${header.CamelLangChain4jChatOutputTokenCount} out): ${body}"
+            message: "Notification for ${variable.orderId} 
(${header.CamelLangChain4jChatInputTokenCount} in, 
${header.CamelLangChain4jChatOutputTokenCount} out): ${body}"
diff --git a/ai/langchain4j-chat/metadata.json 
b/ai/langchain4j-chat/metadata.json
index 0a5139a..577a99a 100644
--- a/ai/langchain4j-chat/metadata.json
+++ b/ai/langchain4j-chat/metadata.json
@@ -11,7 +11,7 @@
         ],
         "eips": [
             "setBody",
-            "setProperty",
+            "setVariable",
             "unmarshal"
         ],
         "languages": [
diff --git a/camel-jbang-example-catalog.json b/camel-jbang-example-catalog.json
index 073e052..f1fef16 100644
--- a/camel-jbang-example-catalog.json
+++ b/camel-jbang-example-catalog.json
@@ -59,7 +59,7 @@
             ],
             "eips": [
                 "setBody",
-                "setProperty",
+                "setVariable",
                 "unmarshal"
             ],
             "languages": [

Reply via email to