Currently, the tool-call lifecycle is managed internally by each concrete ChatModel implementation.
The ToolCallAdvisor allows you to manage this lifecycle as a part of the Advisor chains. The latter provides clear visibility for the tool request and response messages, allowing manipulation and storing of those messages in Memory. This is a requirement for many AI and Agentic use cases.
When the ToolCallAdvisor is added to the chain (e.g. ChatClient.advisors(ToolCallAdsvior.builder()...), it disables the low-level ChatMemory tool handling implementations. The proposal is to auto-register the ToolCallAdvisor by default when there are registered ChatClient Tools or tool callbacks.
Also a the toolcall advisor should disable its internal conversation memory support if there are ChatMemory advisors registered after it in the chain.
Currently, the tool-call lifecycle is managed internally by each concrete ChatModel implementation.
The ToolCallAdvisor allows you to manage this lifecycle as a part of the Advisor chains. The latter provides clear visibility for the tool request and response messages, allowing manipulation and storing of those messages in Memory. This is a requirement for many AI and Agentic use cases.
When the ToolCallAdvisor is added to the chain (e.g. ChatClient.advisors(ToolCallAdsvior.builder()...), it disables the low-level ChatMemory tool handling implementations. The proposal is to auto-register the ToolCallAdvisor by default when there are registered ChatClient Tools or tool callbacks.
Also a the toolcall advisor should disable its internal conversation memory support if there are ChatMemory advisors registered after it in the chain.