microsoft/semantic-kernel

Basic planner returns String instead of a FunctionResult as the response

Closed this issue · 1 comments

In Basic planner (/python/semantic_kernel/planners/basic_planner.py), it returns a String value as the response. Is it possible to return the FunctionResult object as it is without converting it into a String? Because in my case, I am trying to return an object of another class. Since the returning value is a string, I am unable to return it. It only returns the object name and the address as a string. But without the string conversion, it returns the FunctionResult and can access the object or whatever the returning content via the returned object.
plan = await planner.create_plan(request, self.kernel)
resp = await planner.execute_plan(plan, self.kernel)
print(f"Strategy Code2: {resp.value.strategy_code}")

Original Implementation:
image

After str conversion:
image

Hi @sachithaabey, we're going to be deprecating this planner in the next week or so, before we get to a Python v1 SDK. This planner is not supported in dotnet, and we're working towards parity. Please be aware that the action planner and stepwise planner will also be deprecated. Please have a look at the function calling stepwise planner in the meantime.