Table of Contents

API: UniDataGen.Generation.Foundry

The Azure AI Foundry value provider.

public sealed class FoundryValueProvider : IValueProvider, IDisposable
{
    public FoundryValueProvider(
        FoundrySettings settings,
        HttpClient? httpClient = null,
        TokenCredential? credential = null,
        string? apiKey = null,
        string apiVersion = "2024-10-21",
        ILogger? logger = null);

    public Task<IReadOnlyList<IReadOnlyDictionary<string, object?>>> GenerateAsync(ValueRequest request, CancellationToken cancellationToken);
}

GenerateAsync builds a structured-output request from the entity's semantic attributes, calls the Foundry chat deployment, and coerces each returned value to its CDM type. When no API key is supplied, it authenticates with DefaultAzureCredential.

Helpers

Type Purpose
FoundryPromptBuilder Builds the system and user prompts and the JSON schema.
CdmTypeCoercion Coerces a JSON value to the CLR type implied by a CDM data type.