Repository navigation
.Net: Use type to represent python code execution result - #11931
Merged
SergeyMenshykh merged 8 commits intoMay 7, 2025
Merged
SergeyMenshykh merged 8 commits into
SergeyMenshykh merged 8 commits into
Conversation
Mark Wallace (markwallace-microsoft)
approved these changes
May 7, 2025
westey (westey-m)
approved these changes
May 7, 2025
SergeyMenshykh
enabled auto-merge
May 7, 2025 16:48
SergeyMenshykh
had a problem deploying
to
integration
May 7, 2025 18:35 — with
GitHub Actions
Failure
jcruzmot-te
pushed a commit
to thousandeyes/aia-semantic-kernel
that referenced
this pull request
Sep 15, 2025
…1931) ### Motivation, Context and Description This PR introduces a new type, `SessionsPythonCodeExecutionResult`, to represent the Python code execution result and refactors the `SessionsPythonPlugin.ExecuteCodeAsync` method to return this type instead of a string. This should allow access to the result in a structured way for scenarios where the result needs to be processed further, for example, in the auto function invocation filters. At the same time, the type overloads the `ToString()` method to be used in scenarios where the result needs to be a string, for example when the function is invoked as part of rendering a prompt template. Contributes to: microsoft#10070
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation, Context and Description
This PR introduces a new type,
SessionsPythonCodeExecutionResult, to represent the Python code execution result and refactors theSessionsPythonPlugin.ExecuteCodeAsyncmethod to return this type instead of a string. This should allow access to the result in a structured way for scenarios where the result needs to be processed further, for example, in the auto function invocation filters. At the same time, the type overloads theToString()method to be used in scenarios where the result needs to be a string, for example when the function is invoked as part of rendering a prompt template.Contributes to: #10070