Python: FunctionCallingStepwisePlanner ignoring passed excluded_functions #9284
-
I know there are changes with the planner happening, but I currently still use the function calling stepwise planner and am experiencing an issue where my passed list of excluded functions are being ignored. If I include
after instantiating the planner I get the correct list of excluded functions both times. However, when I generate the plan with planner._generate_plan() it is only excluding the sequential_planner-create_plan function. The ramifications of this are that if a user selects only a subset of the functions to use that are available in the kernel, then the planner will create a plan that ignores this and pretends that all functions will be available leading to a broken or incorrect execution. I think this is happening as a result of this line of the _generate_plan method but it could also just be that I am using it incorrectly. Please let me know if this is intended and I am just using it incorrectly. The only workaround I can think of would be a separate kernel with only the configured plugins/functions available for the planner. Here is the relevant code.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@moonbox3 any ideas? |
Beta Was this translation helpful? Give feedback.
Hi @ColtonBehannon, that line you pointed to in _generate_plan does look indeed to be an issue. We should be concatenating the hard-coded excluded plugin with whatever else is included in
self.options.excluded_plugins
.The only thing I can think of to immediately unblock you, unless you want to raise a PR to fix the issue, is to override the generate plan method, and tailor it to work as you expect. Something like this: