Documentation
Table of Contents

Method AISortAsync

Namespace
IntentSharp.Extensions
Assembly
IntentSharp.dll

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

Orders the elements according to the intent. The model returns a permutation of indices; every element appears exactly once.

public static Task<AIResult<List<T>>> AISortAsync<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<List<T>>>

Type Parameters

T