Documentation
Table of Contents

Method AIMapValuesAsync

Namespace
IntentSharp.Extensions
Assembly
IntentSharp.dll

AIMapValuesAsync<TKey, TIn, TOut>(IDictionary<TKey, TIn>, IntentClient, string, AIRequestOptions?, CancellationToken)

Transforms a dictionary's values, keeping its keys. Missing or extra keys fail verification, and so does a null value unless TOut is a Nullable<T> value type.

public static Task<AIResult<Dictionary<TKey, TOut>>> AIMapValuesAsync<TKey, TIn, TOut>(this IDictionary<TKey, TIn> input, IntentClient client, string intent, AIRequestOptions? options = null, CancellationToken cancellationToken = default) where TKey : notnull

Parameters

input IDictionary<TKey, TIn>
client IntentClient
intent string
options AIRequestOptions
cancellationToken CancellationToken

Returns

Task<AIResult<Dictionary<TKey, TOut>>>

Type Parameters

TKey
TIn
TOut