Method RunIntentAsync
- Namespace
- IntentSharp.Catalog
- Assembly
- IntentSharp.Catalog.dll
RunIntentAsync<T>(object?, IntentRuntime, string, CancellationToken)
Runs the intent name on input with runtime and returns a verified T.
public static Task<AIResult<T>> RunIntentAsync<T>(this object? input, IntentRuntime runtime, string name, CancellationToken cancellationToken = default)
Parameters
inputobjectruntimeIntentRuntimenamestringcancellationTokenCancellationToken
Returns
- Task<AIResult<T>>
Type Parameters
T
RunIntentAsync(object?, IntentRuntime, string, CancellationToken)
Runs the intent name on input with runtime and returns the verified result as JSON.
public static Task<AIResult<JsonNode>> RunIntentAsync(this object? input, IntentRuntime runtime, string name, CancellationToken cancellationToken = default)
Parameters
inputobjectruntimeIntentRuntimenamestringcancellationTokenCancellationToken
Returns
- Task<AIResult<JsonNode>>
RunIntentAsync<T>(object?, string, CancellationToken)
Runs the intent name with the ambient runtime (see IntentScope) and returns a verified T.
public static Task<AIResult<T>> RunIntentAsync<T>(this object? input, string name, CancellationToken cancellationToken = default)
Parameters
inputobjectnamestringcancellationTokenCancellationToken
Returns
- Task<AIResult<T>>
Type Parameters
T
RunIntentAsync(object?, string, CancellationToken)
Runs the intent name with the ambient runtime (see IntentScope) and returns the verified result as JSON.
public static Task<AIResult<JsonNode>> RunIntentAsync(this object? input, string name, CancellationToken cancellationToken = default)
Parameters
inputobjectnamestringcancellationTokenCancellationToken
Returns
- Task<AIResult<JsonNode>>