davsclaus opened a new pull request, #108:
URL: https://github.com/apache/camel-jbang-examples/pull/108

   [CAMEL-25517](https://issues.apache.org/jira/browse/CAMEL-25517)
   
   Camel favours variables for the values a route keeps for itself. 
`ai/docling-langchain4j-rag` kept the file name, the Markdown, the analysis, 
the question and the lookup result in exchange properties; it now uses 
`setVariable`, `${variable.x}`, and `exchange.getVariable` / 
`exchange.setVariable` in the Groovy scripts (`resolvePropertyPlaceholders` for 
the configuration stays).
   
   One example per PR, as #104 to #107.
   
   Checked end to end with Docling (`camel infra run docling`, docling-serve 
v1.35.0) and Ollama `granite4:3b`, on Camel 4.23.0-SNAPSHOT:
   - a document dropped in `documents` is converted, analysed and written to 
`output/sample-test.md_analysis.md` (the name from 
`${variable.originalFileName}`);
   - `/api/ask` answers from the document when one is there (*"Apache Camel 
supports various Domain Specific Languages (DSLs) including Java DSL, XML 
Configuration, YAML DSL, and Groovy DSL."*), and says *"No documents found in 
directory"* when there is none - the two branches of the Groovy `documentFound` 
variable.
   
   **Found on the way, not part of this PR:** on the current 4.23 snapshot the 
example fails at its first `docling` call with *"Message body looks like a file 
path but allowFilePathSource is disabled"*: camel-docling no longer reads a 
file path from the body unless `allowFilePathSource=true`. The checks above ran 
with that option added locally; the fix for it gets its own PR.
   
   `camel validate yaml --canonical` reports nothing; the example has no Citrus 
test (`ciSkip`, it needs the services and a local model).
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to