Documentation
Table of Contents

Method AIAsync

Namespace
IntentSharp.Extensions
Assembly
IntentSharp.dll

AIAsync(object?, string, AIRequestOptions?, CancellationToken)

Applies the intent to the value with the ambient client and returns text.

public static Task<AIResult<string>> AIAsync(this object? input, string intent, AIRequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

input object
intent string
options AIRequestOptions
cancellationToken CancellationToken

Returns

Task<AIResult<string>>

Exceptions

InvalidOperationException

No client is ambient on this async flow.

AIAsync<T>(object?, string, AIRequestOptions?, CancellationToken)

Applies the intent to the value with the ambient client and returns a verified T.

public static Task<AIResult<T>> AIAsync<T>(this object? input, string intent, AIRequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

input object
intent string
options AIRequestOptions
cancellationToken CancellationToken

Returns

Task<AIResult<T>>

Type Parameters

T

Exceptions

InvalidOperationException

No client is ambient on this async flow.