You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
The FunctionInvokingFunctionCallback and MethodInvokingFunctionCallback classes have package-scoped constructors, meaning that it's not possible to instantiate them outside their package. As a consequence, the only way to get instances is via Reflection or via the DefaultFunctionCallbackBuilder. Among the other things, this issue impacts custom implementations of FunctionCallback.Builder.
Environment
Spring AI: 1.0.0-SNAPSHOT
Java: 23
Expected behavior
The FunctionInvokingFunctionCallback and MethodInvokingFunctionCallback classes can be instantiated outside their package.
Minimal Complete Reproducible example
See the consequence of this issue here, where Reflection had to be used to instantiate FunctionInvokingFunctionCallback (example) and MethodInvokingFunctionCallback (example).
The text was updated successfully, but these errors were encountered:
ThomasVitale
added a commit
to ThomasVitale/spring-ai
that referenced
this issue
Jan 3, 2025
* Make constructor in MethodInvokingFunctionCallback public.
* Make constructor in FunctionInvokingFunctionCallback public.
* Make JSON Schema Generation strategy in MethodInvokingFunctionCallback more customizable.
Fixesspring-projectsgh-2032
Signed-off-by: Thomas Vitale <[email protected]>
Bug description
The
FunctionInvokingFunctionCallback
andMethodInvokingFunctionCallback
classes have package-scoped constructors, meaning that it's not possible to instantiate them outside their package. As a consequence, the only way to get instances is via Reflection or via theDefaultFunctionCallbackBuilder
. Among the other things, this issue impacts custom implementations ofFunctionCallback.Builder
.Environment
Spring AI: 1.0.0-SNAPSHOT
Java: 23
Expected behavior
The
FunctionInvokingFunctionCallback
andMethodInvokingFunctionCallback
classes can be instantiated outside their package.Minimal Complete Reproducible example
See the consequence of this issue here, where Reflection had to be used to instantiate
FunctionInvokingFunctionCallback
(example) andMethodInvokingFunctionCallback
(example).The text was updated successfully, but these errors were encountered: