Method AIFilterAsync
- Namespace
- IntentSharp.Extensions
- Assembly
- IntentSharp.dll
AIFilterAsync<T>(IEnumerable<T>, string, AIRequestOptions?, CancellationToken)
Keeps the elements that satisfy the intent, using the ambient client. The original objects are returned unchanged.
public static Task<AIResult<List<T>>> AIFilterAsync<T>(this IEnumerable<T> input, string intent, AIRequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
inputIEnumerable<T>intentstringoptionsAIRequestOptionscancellationTokenCancellationToken
Returns
- Task<AIResult<List<T>>>
Type Parameters
T
Exceptions
- InvalidOperationException
No client is ambient on this async flow.