mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
Python: Fix parameter propagation bug in Plan Object Model (#2388)
### Motivation and Context Initially called out and fixed by @joowon-dm-snu in https://github.com/microsoft/semantic-kernel/pull/2223 This PR closes [#2094](https://github.com/microsoft/semantic-kernel/issues/2094) There was a bug in the Plan Object Model that propagates the name of the step parameter to the next step. It should be propagating the parameter's value ### Description In addition to making the code change to fix the bug, also added a unit test that covers the changed code. Below image shows the before and after of the test with the fix.  ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄 Co-authored-by: Abby Harrison <[email protected]>
This commit is contained in:
co-authored by
Abby Harrison
parent
274c4fd410
commit
b9c77f45e7
@@ -410,7 +410,7 @@ class Plan(SKFunctionBase):
|
||||
|
||||
expanded_value = self.expand_from_variables(variables, param_var)
|
||||
if expanded_value.lower() == param_var.lower():
|
||||
step_variables.set(param_var, expanded_value)
|
||||
step_variables.set(param_var, step.parameters._variables[param_var])
|
||||
elif variables.contains_key(param_var):
|
||||
step_variables.set(param_var, variables[param_var])
|
||||
elif self._state.contains_key(param_var):
|
||||
|
||||
Reference in New Issue
Block a user