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
inputIEnumerable<T>clientIntentClientintentstringoptionsAIRequestOptionscancellationTokenCancellationToken
Returns
- Task<AIResult<Dictionary<string, List<T>>>>
Type Parameters
T