mirror of
https://github.com/microsoft/semantic-kernel.git
synced 2026-10-12 02:19:06 +00:00
### Motivation and Context Closes #1469 There are scenarios where the basic_planner prompt results in a valid plan surrounded by additional text. This renders the plan unable to be json deserialized. This PR addresses this scenario. Note that it does NOT address malformed json. ### Description - added a regex in basic_planner.execute_plan_async that grabs only json blocks. See screenshot below of it ignoring additional, non-json text. - Added dependency on `regex` pip package (`re` package does not support regex recursion) Co-authored-by: Shawn Callegari <[email protected]>