[
https://issues.apache.org/jira/browse/CAMEL-24270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-24270.
---------------------------------
Resolution: Fixed
> Make AiToolSpecToLangChain4j public for reuse by downstream projects
> --------------------------------------------------------------------
>
> Key: CAMEL-24270
> URL: https://issues.apache.org/jira/browse/CAMEL-24270
> Project: Camel
> Issue Type: Improvement
> Components: camel-langchain4j-agent
> Affects Versions: 4.23.0
> Reporter: Jiri Ondrusek
> Assignee: Jiri Ondrusek
> Priority: Minor
> Fix For: 4.22.0
>
>
> AiToolSpecToLangChain4j in camel-langchain4j-agent is currently
> package-private. It provides the only utility for converting AiToolSpec (with
> its ParameterDef type mapping) to langchain4j ToolSpecification objects.
> Downstream projects like camel-quarkus need this same conversion when
> bridging iToolRegistry to langchain4j's ToolProvider SPI. Without public
> access, they must either duplicate the ~45 lines of type-mapping logic or
> use reflection.
> The proposed change is minimal:
> - final class AiToolSpecToLangChain4j → public final class
> AiToolSpecToLangChain4j
> - static ToolSpecification toToolSpecification(AiToolSpec) → public static
> - Add Javadoc on the class
> No behavioral change, no new API surface beyond exposing the existing
> utility. The internal buildSchema() method stays private.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)