Documentation
Table of Contents

Method AIReduceAsync

Namespace
IntentSharp.Extensions
Assembly
IntentSharp.dll

AIReduceAsync<TIn, TOut>(IEnumerable<TIn>, string, AIRequestOptions?, CancellationToken)

Reduces the whole collection to a single TOut (a summary, a total, a verdict), using the ambient client.

public static Task<AIResult<TOut>> AIReduceAsync<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<TOut>>

Type Parameters

TIn
TOut

Exceptions

InvalidOperationException

No client is ambient on this async flow.