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 14
14
15
15
import java .util .List ;
16
16
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 ;
17
23
import io .modelcontextprotocol .client .McpSyncClient ;
18
24
19
25
public class LocalMcpClient {
20
- private List <McpSyncClient > mcpSyncClients ;
26
+ private final List <McpSyncClient > mcpSyncClients ;
21
27
22
28
public LocalMcpClient (List <McpSyncClient > mcpSyncClients ) {
23
- this .mcpSyncClients = mcpSyncClients ;
29
+ this .mcpSyncClients = mcpSyncClients ;
24
30
}
25
31
32
+ @ Bean
33
+ public ToolCallbackProvider myTools (FunctionConfig functionConfig ) {
34
+ return MethodToolCallbackProvider .builder ().toolObjects (functionConfig ).build ();
35
+ }
26
36
}
You can’t perform that action at this time.
0 commit comments