AgentFileSkillScript.RunAsync 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.
Runs the script with the given arguments.
public override System.Threading.Tasks.Task<object?> RunAsync(Microsoft.Agents.AI.AgentSkill skill, System.Text.Json.JsonElement? arguments, IServiceProvider? serviceProvider, System.Threading.CancellationToken cancellationToken = default);
override this.RunAsync : Microsoft.Agents.AI.AgentSkill * Nullable<System.Text.Json.JsonElement> * IServiceProvider * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
Public Overrides Function RunAsync (skill As AgentSkill, arguments As Nullable(Of JsonElement), serviceProvider As IServiceProvider, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Parameters
- skill
- AgentSkill
The skill that owns this script.
- arguments
- Nullable<JsonElement>
Raw JSON arguments for script execution, preserving the original format (object or array) sent by the caller.
- serviceProvider
- IServiceProvider
Optional service provider for dependency injection.
- cancellationToken
- CancellationToken
Cancellation token.
Returns
The script execution result.