Skip to content

[camel-main] data-extract-langchain4j example fails after Agent.chat() return type change #8880

Description

@JiriOndrusek

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions