Documentation
Table of Contents

Method AIGroupAsync

Namespace
IntentSharp.Extensions
Assembly
IntentSharp.dll

AIGroupAsync<T>(IEnumerable<T>, IntentClient, string, AIRequestOptions?, CancellationToken)

Groups the elements by the intent. Returns group labels chosen by the model mapped to the original objects.

public static Task<AIResult<Dictionary<string, List<T>>>> AIGroupAsync<T>(this IEnumerable<T> input, IntentClient client, string intent, AIRequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

input IEnumerable<T>
client IntentClient
intent string
options AIRequestOptions
cancellationToken CancellationToken

Returns

Task<AIResult<Dictionary<string, List<T>>>>

Type Parameters

T