oscerd commented on PR #29066:
URL: https://github.com/apache/camel/pull/29066#issuecomment-6603157837
On the review from davsclaus:
Thanks for the review. Both remarks are addressed. `maxHistoryMessages` now
defaults to 50 messages (`0` for no limit), and the component page has a
sentence pointing long-running conversations to it, as a history that outgrows
the context of the model makes every message of that conversation fail until
the history is cleared. The PR description no longer says that the endpoint DSL
needs to be regenerated.
On the review from Croway:
Thanks for the thorough review. The three points marked for this PR, and the
other inline comments, are addressed in the new commit.
On the points that could be follow-ups:
- Overlapping turns on the same memory ID: agreed. A history is read in
`prepareInput`, outside the predictor lock, and written back in
`processOutput`, so two turns prepared before either is processed lose one of
them, and a `CamelChatClearHistory` sent during a turn is undone when the turn
writes the old history back. This was there before the PR and is not changed
here. I propose it as a follow-up, for example with a lock per memory ID around
the whole turn.
- The error signal inside the result data: agreed that a model answer that
is exactly `{"error": "..."}`, with no other field, still fails the exchange.
Reporting the failure outside the data, for example as a property of the DJL
`Output` that `predict()` checks once, changes the protocol of every Python
handler, so I propose it as a follow-up rather than in this PR.
- Efficiency: text-to-image now looks at the first byte and decodes the
output as text only when it starts with `{`, so an image is no longer turned
into a String. `failOnPythonError` now parses an output only when it starts
with an `error` field (spaces allowed after the brace), so other JSON outputs
are not parsed into a tree. That also means zero-shot with `autoSelect=false`
parses its output once.
_Claude Code on behalf of Andrea Cosentino (oscerd)_
--
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]