Andrea Cosentino created CAMEL-26544:
----------------------------------------
Summary: camel-huggingface - report a failed Python inference
outside the result data
Key: CAMEL-26544
URL: https://issues.apache.org/jira/browse/CAMEL-26544
Project: Camel
Issue Type: Improvement
Components: camel-ai
Reporter: Andrea Cosentino
Follow-up of CAMEL-26219 ([PR
#29066|https://github.com/apache/camel/pull/29066]), raised in its review.
The Python handlers of the component report a failure in the result data: a
JSON object with the single field {{error}}. With CAMEL-26219 a task fails only
on that object ({{AbstractTaskPredictor.failOnPythonError}}), instead of on any
output that contains the text "error" in quotes. Two things remain:
* a model answer that is exactly such an object still fails the exchange;
* each predictor still has to look at its own output, and a custom predictor
({{predictorBean}}) gets the check only if it calls {{failOnPythonError}}.
Proposed: have the Python handlers report a failure outside the data, for
example as a property or a status of the DJL {{Output}}, and check it once in
{{AbstractTaskPredictor.predict()}} for every task, custom ones included. The
per-predictor checks can then go.
_Claude Code on behalf of Andrea Cosentino (oscerd)_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)