File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
python/semantic_kernel/agents/open_ai Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1209,10 +1209,19 @@ def _get_tools(
12091209 if agent .tools :
12101210 tools .extend (agent .tools )
12111211
1212- # TODO(evmattso): make sure to respect filters on FCB
1213- if kernel .plugins :
1214- funcs = kernel .get_full_list_of_function_metadata ()
1215- tools .extend ([kernel_function_metadata_to_response_function_call_format (f ) for f in funcs ])
1212+ if not function_choice_behavior .enable_kernel_functions :
1213+ return tools
1214+
1215+ if not kernel .plugins :
1216+ return tools
1217+
1218+ funcs = (
1219+ kernel .get_list_of_function_metadata (function_choice_behavior .filters )
1220+ if function_choice_behavior .filters
1221+ else kernel .get_full_list_of_function_metadata ()
1222+ )
1223+
1224+ tools .extend ([kernel_function_metadata_to_response_function_call_format (f ) for f in funcs ])
12161225
12171226 return tools
12181227
You can’t perform that action at this time.
0 commit comments