Documentation
Table of Contents

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

input IEnumerable<T>
intent string
options AIRequestOptions
cancellationToken CancellationToken

Returns

Task<AIResult<List<T>>>

Type Parameters

T

Exceptions

InvalidOperationException

No client is ambient on this async flow.