semantic-kernel
semantic-kernel copied to clipboard
Fix replacing for variables
Motivation and Context
We had a problem with SKFunctionInput
when these are arrays. For example, the output was [$variable1,$variable2]
. These were not replaced with the actual values.
Description
Replaced the logic to only get one variable with a regex solution to replace all variables in the inner text. Now all values will be replaced correctly.
Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines (https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions (https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions) verified with
dotnet format
- [x] All unit tests pass, and I have added new tests where possible (excluding unrelated already broken unit tests)
- [x] I didn't break anyone :smile:
@microsoft-github-policy-service agree
Thanks for the PR @Sy0xFF -- we're in the process of refactoring things here, see https://github.com/microsoft/semantic-kernel/pull/523. I'll incorporate this fix with those changes.
as per @lemillermicrosoft the fix will be integrated into #523