refactor(mcp): update to use Spring Boot autoconfiguration and rename tool callbacks
Update MCP examples to use Spring Boot autoconfiguration instead of manual configuration. Replace deprecated defaultTools method with defaultToolCallbacks across all examples. Update documentation to reflect these changes and provide more detailed configuration examples. - Update API from defaultTools to defaultToolCallbacks in all MCP examples - Update README files with more detailed configuration examples Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
@@ -34,7 +34,7 @@ public class Application {
|
||||
return args -> {
|
||||
|
||||
var chatClient = chatClientBuilder
|
||||
.defaultTools(new SyncMcpToolCallbackProvider(mcpClients))
|
||||
.defaultToolCallbacks(new SyncMcpToolCallbackProvider(mcpClients))
|
||||
.defaultAdvisors(new MessageChatMemoryAdvisor(new InMemoryChatMemory()))
|
||||
.build();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Application {
|
||||
|
||||
return args -> {
|
||||
var chatClient = chatClientBuilder
|
||||
.defaultTools(new SyncMcpToolCallbackProvider(mcpClients))
|
||||
.defaultToolCallbacks(new SyncMcpToolCallbackProvider(mcpClients))
|
||||
.build();
|
||||
System.out.println("Running predefined questions with AI model responses:\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user