File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
backend/src/main/java/ch/xxx/aidoclibchat/usecase/service Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1414
1515import java .util .List ;
1616
17+ import org .springframework .ai .support .ToolCallbacks ;
18+ import org .springframework .ai .tool .ToolCallback ;
19+ import org .springframework .ai .tool .ToolCallbackProvider ;
20+ import org .springframework .context .annotation .Bean ;
21+
22+ import ch .xxx .aidoclibchat .adapter .config .FunctionConfig ;
1723import io .modelcontextprotocol .client .McpSyncClient ;
1824
1925public class LocalMcpClient {
20- private List <McpSyncClient > mcpSyncClients ;
26+ private final List <McpSyncClient > mcpSyncClients ;
2127
2228 public LocalMcpClient (List <McpSyncClient > mcpSyncClients ) {
23- this .mcpSyncClients = mcpSyncClients ;
29+ this .mcpSyncClients = mcpSyncClients ;
2430 }
2531
32+ @ Bean
33+ public ToolCallbackProvider myTools (FunctionConfig functionConfig ) {
34+ return MethodToolCallbackProvider .builder ().toolObjects (functionConfig ).build ();
35+ }
2636}
You can’t perform that action at this time.
0 commit comments