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
When defining tools from Java methods, the callback logic fails if the method is not public or if it's located in a non-public class.
Environment
Spring AI: 1.0.0-SNAPSHOT
Java: 23
Expected behavior
Even if the class/method is not public, I'd expect the tool callback logic to work. It's good practice not to define tool methods as public, and make sure they are only used as part of an LLM workflow.
Bug description
When defining tools from Java methods, the callback logic fails if the method is not public or if it's located in a non-public class.
Environment
Spring AI: 1.0.0-SNAPSHOT
Java: 23
Expected behavior
Even if the class/method is not public, I'd expect the tool callback logic to work. It's good practice not to define tool methods as public, and make sure they are only used as part of an LLM workflow.
I have a solution suggestion. See MethodToolCallback.java. A working example is available here.
Minimal Complete Reproducible example
Example reproducing the issue is available here (check the
/chat/method/non-public
endpoint).The text was updated successfully, but these errors were encountered: