Otavio Rodolfo Piske created CAMEL-22510:
--------------------------------------------

             Summary: camel-langchain4j-agent: avoid leaking internal data types
                 Key: CAMEL-22510
                 URL: https://issues.apache.org/jira/browse/CAMEL-22510
             Project: Camel
          Issue Type: Improvement
          Components: camel-ai, camel-langchain4j-agent
    Affects Versions: 4.15.0, 4.14.1
            Reporter: Otavio Rodolfo Piske


Currently, using the {{camel-ai}} chat components (e.g., 
{{{}camel-langchain4j-agent{}}}) with common data types like {{InputStream}} 
requires significant boilerplate from the end-user. Users are often forced to 
use {{.convertBodyTo(String.class)}} or manually construct provider-specific 
message objects (like LangChain's {{{}UserMessage{}}}), which is not intuitive 
and hides the power of Camel's type conversion system.

As noted by [~davsclaus], _"convertBodyTo should not be commonly in use, and 
not something end users would use when using different components. It's there 
for some more advanced and specific use-cases."_

The AI components should be enhanced to work seamlessly with common message 
payloads, especially {{{}InputStream{}}}, which is a frequent output from 
components like {{{}camel-file{}}}, {{{}camel-ftp{}}}, {{{}camel-http{}}}, etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to