Method AIMapAsync
- Namespace
- IntentSharp.Extensions
- Assembly
- IntentSharp.dll
AIMapAsync<TIn, TOut>(IEnumerable<TIn>, string, AIRequestOptions?, CancellationToken)
Transforms each element into a TOut with the ambient client. The result has the same length
and order as the input; a length mismatch fails verification.
public static Task<AIResult<List<TOut>>> AIMapAsync<TIn, TOut>(this IEnumerable<TIn> input, string intent, AIRequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
inputIEnumerable<TIn>intentstringoptionsAIRequestOptionscancellationTokenCancellationToken
Returns
- Task<AIResult<List<TOut>>>
Type Parameters
TInTOut
Exceptions
- InvalidOperationException
No client is ambient on this async flow.