[
https://issues.apache.org/jira/browse/CAMEL-26878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-26878:
--------------------------------
Description:
Follow-up from the local-model benchmark (qwen3.6, r32), route-batch-file step
2: append each line that cannot be read to rejects/<file name>, one per line.
In 4 of the 5 runs whose route was written, the rejected lines ran together.
Three routes wrote to a file endpoint with fileExist Append and no appendChars.
One set appendChars to a real line break in the YAML, which the endpoint uri
drops: the run logged file://rejects?appendChars=&fileExist=Append. The model
read the options of the file component in 5 runs, and saw appendChars only once
(with optionsFilter append).
* A write of a route with a file producer (to: or toD:) with fileExist Append
and no appendChars now gets a note: each message is added right after the one
before, with nothing between them. To write one message per line, add
appendChars, written in the YAML as below (the file component turns the two
characters \n into a line break). ftp, ftps and sftp have no appendChars.
{code:yaml}
- to:
uri: file
parameters:
directoryName: rejects
fileName: "${file:name}"
fileExist: Append
appendChars: "\\n"
{code}
* An appendChars that adds nothing gets a note too: a line break in the YAML
(appendChars: "\n"), or \n in a toD with ${...}, which the toD reads as Simple
and turns into a line break that the uri drops (%5Cn works there).
was:
Follow-up from the local-model benchmark (qwen3.6, r32), route-batch-file step
2: append each line that cannot be read to rejects/<file name>, one per line.
The routes wrote to a file endpoint with fileExist Append and no appendChars,
so the rejected lines ran together, and the step failed in all 7 runs. The
model read the options of the file component in 5 runs, and saw appendChars
only once (with optionsFilter append).
* A write of a route with a file, ftp, ftps or sftp producer with fileExist
Append and no appendChars now gets a note: each message is added right after
the one before, with nothing between them; to write one message per line, set
appendChars to \n.
> camel-jbang - AI tools: a write that appends messages to a file without a
> separator gets a note
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-26878
> URL: https://issues.apache.org/jira/browse/CAMEL-26878
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> Follow-up from the local-model benchmark (qwen3.6, r32), route-batch-file
> step 2: append each line that cannot be read to rejects/<file name>, one per
> line. In 4 of the 5 runs whose route was written, the rejected lines ran
> together. Three routes wrote to a file endpoint with fileExist Append and no
> appendChars. One set appendChars to a real line break in the YAML, which the
> endpoint uri drops: the run logged
> file://rejects?appendChars=&fileExist=Append. The model read the options of
> the file component in 5 runs, and saw appendChars only once (with
> optionsFilter append).
> * A write of a route with a file producer (to: or toD:) with fileExist Append
> and no appendChars now gets a note: each message is added right after the one
> before, with nothing between them. To write one message per line, add
> appendChars, written in the YAML as below (the file component turns the two
> characters \n into a line break). ftp, ftps and sftp have no appendChars.
> {code:yaml}
> - to:
> uri: file
> parameters:
> directoryName: rejects
> fileName: "${file:name}"
> fileExist: Append
> appendChars: "\\n"
> {code}
> * An appendChars that adds nothing gets a note too: a line break in the YAML
> (appendChars: "\n"), or \n in a toD with ${...}, which the toD reads as
> Simple and turns into a line break that the uri drops (%5Cn works there).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)