[
https://issues.apache.org/jira/browse/CAMEL-25863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18129142#comment-18129142
]
Claus Ibsen commented on CAMEL-25863:
-------------------------------------
Merged in PR https://github.com/apache/camel/pull/28143 (21f1f7ce187b).
_Claude Code on behalf of davsclaus_
> camel-langchain4j-chat - the docs say that the body is the message and the
> answer replaces it, with an example that keeps the data
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-25863
> URL: https://issues.apache.org/jira/browse/CAMEL-25863
> Project: Camel
> Issue Type: Improvement
> Components: camel-langchain4j-chat
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.24.0
>
>
> The langchain4j-chat page does not say what happens to the body: the
> component sends it as the user message, and the answer of the model replaces
> it. A route that classifies data (a ticket, a review) and goes on with that
> data loses it, and a model that writes such a route reads the answer where it
> expects the data.
> Found in a benchmark of Oct 19-20 2026 (an example that classifies support
> tickets with a local model): in 10 of 12 runs the body became the model's
> answer ("Dear Customer, ..."), and the route then failed on
> {{${body[ticketId]}}}. No run used {{variableSend}}/{{variableReceive}} of
> the {{to}}, which keep the data and give the answer in a variable.
> Also:
> * The only prompt example is Java with a template {{Create a recipe for a
> {{dishType}} ...}}. In YAML and XML routes, {{name}} is a property
> placeholder of Camel, resolved before the route runs: 5 runs copied the form
> and got "Property with key [...] not found" on every reload.
> * The error for a missing template says "The promptTemplate is a required
> header", without the name of the header,
> {{CamelLangChain4jChatPromptTemplate}}.
> Proposal:
> * A section "The body is the message, and the answer replaces it", with an
> example in Java, XML and YAML that builds the prompt in a variable and
> receives the answer in another (variableSend, variableReceive), so the body
> stays as it was.
> * The section on templates names the header and says that {{name}} is a
> property placeholder in YAML, XML and properties files.
> * The error names the header.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)