Documentation
Table of Contents

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

input IEnumerable<TIn>
intent string
options AIRequestOptions
cancellationToken CancellationToken

Returns

Task<AIResult<List<TOut>>>

Type Parameters

TIn
TOut

Exceptions

InvalidOperationException

No client is ambient on this async flow.