Documentation
Table of Contents

Method AISortAsync

Namespace
IntentSharp.Extensions
Assembly
IntentSharp.dll

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

Orders the elements according to the intent, using the ambient client. Every element appears exactly once.

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