SessionsPythonPlugin.ExecuteCodeAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Executes the provided Python code. Start and end the code snippet with double quotes to define it as a string. Insert \n within the string wherever a new line should appear. Add spaces directly after \n sequences to replicate indentation. Use "" to include double quotes within the code without ending the string. Keep everything in a single line; the \n sequences will represent line breaks when the string is processed or displayed.
[Microsoft.SemanticKernel.KernelFunction]
public System.Threading.Tasks.Task<string> ExecuteCodeAsync(string code);
[<Microsoft.SemanticKernel.KernelFunction>]
member this.ExecuteCodeAsync : string -> System.Threading.Tasks.Task<string>
Public Function ExecuteCodeAsync (code As String) As Task(Of String)
Parameters
- code
- String
The valid Python code to execute.
Returns
The result of the Python code execution.
- Attributes