From dc821ffd1608e8421884db2e3bcf2162cee7609d Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Mon, 9 Dec 2024 09:32:07 +0900 Subject: [PATCH] Include the sessions plugin status key in return value --- .../core_plugins/sessions_python_tool/sessions_python_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/semantic_kernel/core_plugins/sessions_python_tool/sessions_python_plugin.py b/python/semantic_kernel/core_plugins/sessions_python_tool/sessions_python_plugin.py index 7467ac6cd03b..5ff153b0d7b6 100644 --- a/python/semantic_kernel/core_plugins/sessions_python_tool/sessions_python_plugin.py +++ b/python/semantic_kernel/core_plugins/sessions_python_tool/sessions_python_plugin.py @@ -200,7 +200,7 @@ async def execute_code(self, code: Annotated[str, "The valid Python code to exec ) response.raise_for_status() result = response.json()["properties"] - return f"Result:\n{result['result']}Stdout:\n{result['stdout']}Stderr:\n{result['stderr']}" + return f"Status:\n{result['status']}Result:\n{result['result']}Stdout:\n{result['stdout']}Stderr:\n{result['stderr']}" # noqa: E501 except HTTPStatusError as e: error_message = e.response.text if e.response.text else e.response.reason_phrase raise FunctionExecutionException(