Description
The data-extract-langchain4j example in camel-quarkus-examples fails to compile on the camel-quarkus-main branch after CAMEL-23860 (commit apache/camel@cb12bcd9a7) changed Agent.chat() return type from String to Result<String>.
Error
DataExtractAgent is not abstract and does not override abstract method
chat(AiAgentBody<?>,ToolProvider) in Agent
return type java.lang.String is not compatible with
dev.langchain4j.service.Result<java.lang.String>
Fix
DataExtractAgent.chat() needs to return Result<String> instead of String, wrapping the result via Result.<String>builder().content(...).build().
Affected CI
camel-main branch: Examples Tests - group-01
Description
The
data-extract-langchain4jexample incamel-quarkus-examplesfails to compile on thecamel-quarkus-mainbranch after CAMEL-23860 (commit apache/camel@cb12bcd9a7) changedAgent.chat()return type fromStringtoResult<String>.Error
Fix
DataExtractAgent.chat()needs to returnResult<String>instead ofString, wrapping the result viaResult.<String>builder().content(...).build().Affected CI
camel-mainbranch: Examples Tests - group-01