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 d4d1fab  CAMEL-24422: docling-langchain4j-rag sets allowFilePathSource 
on its docling calls (#109)
d4d1fab is described below

commit d4d1fabe8aa6570c792f9cd81aedc24c2fc5e833
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Oct 10 11:00:13 2026 +0200

    CAMEL-24422: docling-langchain4j-rag sets allowFilePathSource on its 
docling calls (#109)
    
    Since Camel 4.23 camel-docling reads a file path in the message body only 
with allowFilePathSource=true;
    without it the example failed at its first docling call with "Message body 
looks like a file path but
    allowFilePathSource is disabled".
    
    
    Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
    
    Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
---
 ai/docling-langchain4j-rag/README.md                    | 5 +++--
 ai/docling-langchain4j-rag/docling-langchain4j-rag.yaml | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ai/docling-langchain4j-rag/README.md 
b/ai/docling-langchain4j-rag/README.md
index 4c8f368..f6e6ad0 100644
--- a/ai/docling-langchain4j-rag/README.md
+++ b/ai/docling-langchain4j-rag/README.md
@@ -62,8 +62,9 @@ Stop the example with `ctrl` + `c` and the services with 
`camel infra stop docli
   component picks it up as the one chat model in the registry.
 - `document-analysis-workflow` is the main route: a `file` consumer on 
`documents` with `include` for the
   supported extensions. The body becomes the file's absolute path, the 
`docling` endpoint with
-  `CONVERT_TO_MARKDOWN` sends it to the Docling service and returns the 
Markdown, which is kept in a
-  variable. A `setBody` builds the prompt around it, `langchain4j-chat` sends 
it to the model, a
+  `CONVERT_TO_MARKDOWN` (and `allowFilePathSource`, as Docling reads a path in 
the body only when told to,
+  since Camel 4.23) sends it to the Docling service and returns the Markdown, 
which is kept in a variable.
+  A `setBody` builds the prompt around it, `langchain4j-chat` sends it to the 
model, a
   Groovy `script` assembles the report from the answer and the Markdown, and a 
`file` producer writes it to
   `output` under the source name plus `_analysis.md`. A last script deletes 
the source file.
 - `document-qa-api` is `platform-http` on `POST /api/ask`: a script finds the 
newest file in `documents`,
diff --git a/ai/docling-langchain4j-rag/docling-langchain4j-rag.yaml 
b/ai/docling-langchain4j-rag/docling-langchain4j-rag.yaml
index c06c563..27889e0 100644
--- a/ai/docling-langchain4j-rag/docling-langchain4j-rag.yaml
+++ b/ai/docling-langchain4j-rag/docling-langchain4j-rag.yaml
@@ -41,6 +41,7 @@
             parameters:
               operationId: CONVERT_TO_MARKDOWN
               contentInBody: true
+              allowFilePathSource: true
               doclingServeUrl: "{{docling.serve.url}}"
               useDoclingServe: true
         - log:
@@ -190,6 +191,7 @@
                       parameters:
                         operationId: CONVERT_TO_MARKDOWN
                         contentInBody: true
+                        allowFilePathSource: true
                         doclingServeUrl: "{{docling.serve.url}}"
                         useDoclingServe: true
                   - setVariable:
@@ -277,6 +279,7 @@
                   parameters:
                     operationId: CONVERT_TO_MARKDOWN
                     contentInBody: true
+                    allowFilePathSource: true
                     doclingServeUrl: "{{docling.serve.url}}"
                     useDoclingServe: true
               - setBody:
@@ -356,6 +359,7 @@
             parameters:
               operationId: EXTRACT_STRUCTURED_DATA
               contentInBody: true
+              allowFilePathSource: true
               doclingServeUrl: "{{docling.serve.url}}"
               outputFormat: json
               useDoclingServe: true

Reply via email to