Using FunctionChoiceBehavior auto function calling filters to exclude functions #7600
-
I have an application that consists of multiple agents (I am not using the agents abstraction) that differ from each other only in the plugins they (should) have available to them. One is a general agent that can access all internet sites and functions via the WebScraper plugin I have created. The other agent should only have access to two of the functions within the WebScraper plugin which restrict it to news sites. I swap between the two agents by changing the I do this in an attempt to remove the two functions that I do not want it to have access to. However, my agent is still able to make calls to both of the functions listed within the excluded_functions. Am I misunderstanding how to use this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @ColtonBehannon, thanks for the question. If you want to exclude a function via the filters dictionary, you'll need to make sure you're supplying the correct fully qualified name. We use a hyphen ("-") to separate plugin names and function names. Therefore if you're hoping to exclude the plugin This is the code that is being called to filter out plugins or functions: |
Beta Was this translation helpful? Give feedback.
Hi @ColtonBehannon, thanks for the question. If you want to exclude a function via the filters dictionary, you'll need to make sure you're supplying the correct fully qualified name. We use a hyphen ("-") to separate plugin names and function names. Therefore if you're hoping to exclude the plugin
GeneralWebSearch
with the function nameReliableSources
, it should be written asGeneralWebSearch-ReliableSources
.This is the code that is being called to filter out plugins or functions:
https://github.com/microsoft/semantic-kernel/blob/a53b96a1ae066160872b3cad65387442995a788d/python/semantic_kernel/functions/kernel_function_extension.py#L368C5-L410C22